1. Home
  2. Integration & Setup
  3. Practice tips & guid...
  4. Sample Concept for eComme...
  5. Integrating etracker Code

Integrating etracker Code

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.

<!-- Copyright (c) 2000-2020 etracker GmbH. All rights reserved. -->
<!-- This material may not be reproduced, displayed, modified or distributed -->
<!-- without the express prior written permission of the copyright holder. -->
<!-- etracker tracklet 4.1 -->
<script type="text/javascript">
// var et_pagename = "";
// var et_areas = "";
// var et_url = "";
// var et_tval = "";
// var et_tonr = "";
// var et_tsale = 0;
// var et_basket = "";
<script id="_etLoader" type="text/javascript" charset="UTF-8" data-secure-code="XXXXX" src="//static.etracker.com/code/e.js"></script>
<!-- etracker tracklet 4.1 end -->

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.

Wrapper Functions

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).

For Flash:

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.