With the wrapper, page impressions can also be tracked without expressly opening a website.
Integrating the wrapper
The wrapper is delivered with the default JavaScript code of etracker and can be integrated as follows:
<script type="text/javascript">
function testCall(pagename)
{
et_eC_Wrapper({et_et: accountkey1, et_pagename: pagename});
}
</script>
The ‘testCall’ function can then be called using any JavaScript event, for example:
onclick="testCall(pagename)"
The wrapper function can also be called directly without the TestCall function, as follows:
onmousedown="et_eC_Wrapper({et_et: accountkey1, et_pagename: Index-Site});"
So that the call of the wrapper function by the blocked etracker code does not bring about a JavaScript error e.g. by excluding counting, please use the following function:
If(typeof(_etracker) === "object") {
et_eC_Wrapper(…);
}
Wrapper parameters
‘Account key 1’, the first parameter of the function must contain the Account Key 1 of the etracker Analytics account. The second parameter contains an optional JavaScript object with the following optional variables:
Variable | Type | Importance | Description |
---|---|---|---|
et_pagename | String | Page name | Unique name of the page. |
et_areas | String | Area name | Designation of the page area. |
et_tval | Float | Total order value | Order status for sales targets: 0 = Lead 1 = Sale 2 = Full reversal |
et_tonr | String | Order number | Distinct order number (without commas or semicolons) |
et_tsale | Integer | Order status | Order status for sales targets: 0 = Lead 1 = Sale 2 = Full reversal |
et_basket | String | Shopping basket | Parameter provided by the shop system for assigning basket items (ArtNr,ArtName,ArtGroup,Number,Price) |
All object variables are optional. If they are not set explicitly, the values entered in the parameter block of the tracking code will be applied. The following call generates the same data as the original call via the tracking code:
<script type="text/javascript">et_eC_Wrapper('Account-Key 1');</script>
Example of a complete call:
<script type="text/javascript">
et_eC_Wrapper(
{
et_et: accountkey,
et_pagename:'Landingpage',
et_ilevel:2,
cc_attributes:{"Attribute name1":"Attribute value1",
"Attributname2": ["Attribute value2a", true]},
}
);
</script>