etracker Code (Version 4.1)
To use etracker and the connected capability to record basic data like visitors and page views, a special tracking code is required. This has to be integrated into all of the pages which are to be measured. It must be positioned between the openingtag and closingtag. In principle, all data of this concept will be compiled in a single account based around one domain (e.g. http://www.xyz.de).
Each of these domain accounts is assigned a security code of up to six characters (also called ‘Account Key 1’). The etracker code is set up as shown in the following. The individually personalised code may vary in parts. The following tracking code needs to be integrated into all of the pages which are to be monitored with the corresponding security code of the domain account. Account Key 1 is inserted for the placeholders ‘XXXXX’ into the second last line of code of the tracking code.
The parameter block of the tracking code (code line 6 to 13) contains elementary parameters for controlling etracker. Using and individually customising parameters is described in the following chapters.
Note: The parameters et_tval, et_tonr, et_tsale and et_basket are only recommended for websites with the primary target of lead generation or similar. For eCommerce Sites on the other hand, we recommend transferring baskets and orders via special eCommerce Events.
Alongside conventional page requests, the tracking code can also be requested dynamically when the page content changes dynamically, e.g. with Ajax functionality. Here, the ‘et_eC_Wrapper’ function is used. If there is dynamic content on a physical page with its own URL, which, for example, loads further information or additional form fields later on and you want to, for example, split the one-page checkout in the funnel analysis into individual steps, a virtual page call should be generated with the help of the wrapper function. In a similar way, other dynamic content can be transferred like category overview pages, which load more products from this category the further down the page you scroll down. The format for the wrapper function looks as follows:
The trigger for the function can can be specified individually. In the upper example, the function will be executed when you click on a HTML object (onmousedown).
ExternalInterface.call("et_eC_Wrapper", "Account-Key1", "pagename", "areas", "url");
Note: The wrapper function encodes the values independently, meaning that they can be entered in plaintext.