General implementation rules
These rules apply to every collector tag, whatever type of tag you implement: the tags described in The Eulerian tagging plan (Client-Side) as well as those placed through a tag manager.
Variable types
Every value (text and numeric) must be in double or single quotes. The values true and false are not allowed.
EA_push(["param1", "valeur1", "amount", "23.00"]);
To show that a value is null or not applicable, use "-" and not "0". An empty value is also accepted if the parameter should not be taken into account.
Parameter array syntax
- Parameters are passed as key / value pairs, so the total number of items in the array must always be even.
- You cannot pass a list of values for a single parameter: declare as many parameters as there are values.
- The syntax must follow standard JavaScript.
/* ERROR: comma at the end of the list */
EA_push([ 'clef1', 'valeur1', 'clef2', 'valeur2', ]);
/* ERROR: comma at the start of the list */
EA_push([ ,'clef1', 'valeur1', 'clef2', 'valeur2' ]);
/* ERROR: missing comma between clef2 and valeur2 */
EA_push([ 'clef1', 'valeur1', 'clef2' 'valeur2' ]);
/* ERROR: double comma */
EA_push([ 'clef1', 'valeur1', 'clef2',, 'valeur2' ]);
/* VALID */
EA_push([ 'clef1', 'valeur1', 'clef2', 'valeur2' ]);
Value rules
Numeric values
- Decimal separator: full stop (not a comma),
"20.45"and not"20,45" - Amounts at face value, not in cents,
"1002"and not"1 002" - Always including VAT, never excluding VAT
EA_push(["amount", "20.45"]);
Text values
- No HTML codes (e.g.
>is not allowed) - Replace accented characters (common in French text):
é è ê ë→e/à â→a/ù ü û→u/ô→o/ï î→i/ç→c - Spaces replaced by
_ - Other special characters replaced by
- - Everything in lower case
Call context
The collector tag must always be placed inside the <body> tag, otherwise it will not run.
The noscript tag and the image / iframe format
The <noscript> tag provides fallback content for browsers that cannot (or will not) run JavaScript.
- If the script runs correctly, the
<noscript>tag is ignored. - If JavaScript is disabled, the
<noscript>tag takes over and hits and conversions are counted normally.
Required parameters
| Parameter | Role |
|---|---|
&url= | URL of the current page (at least the domain name). If the value does not match the domain, no data will be counted. |
&rf= | Referrer of the current page, used to capture and categorise natural traffic. |
| Cachebuster | Random value to insert in the URI to prevent caching: //domain.client.tld/collector/-/VALEUR_ALEATOIRE.html |
Customisation
You can add as many parameters as you like through key-value pairs in the iframe or image URL:
&cle1=valeur1&cle2=valeur2&cle3=valeur3
Some native JavaScript parameters have a different name in the noscript / iframe / image format:
| Standard JS format | iframe / image format |
|---|---|
path | urlp |
scartcumul | sccumul |
currency | cur |
prdref | prdrX |
prdname | prdnX |
prdquantity | prdqX |
prdamount | prdaX |
prdparam | prdpXkY and prdpXdY |
isearchengine | eise |
isearchkey | eiskX |
isearchdata | eisdX |
actionref | actr |
error | pgerr |