Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

Eatms-Container

Introduction


The eatms container can be used to identify and recognize the user and to integrate further dynamic code. For this purpose, the corresponding JavaScript code must be installed on each page.

Note

The eatms.js script should be written at the end of the "<body>" element and not inside the "<head>" element to ensure frictionless functionality of the website.

If the eatms-container is also to be used to play out tags, it is important to enrich it with the necessary additional information. Examples of this would be the campaign ID, the product, the landing page or the confirmation of the user's consent.

Campaign -> "&campaign_id="

Product -> "&product="

Page -> "&page="

Category → "&category="

Consent -> "&disable_tags=false"

Consent not given -> "&disable_tags=true"

JavaScript-Code

JavaScript-Code

<script src="//SUB-DOMAIN*/trck/etms/eatms.js?campaign_id=CAMPAIGN_ID**"></script>

*the placeholder "SUB-DOMAIN" and “CAMPAIGN_ID” must be replaced with the correct domain of the affiliate program.

**the placeholder "CAMPAIGN_ID" must be replaced with the correct campaign_id of the affiliate program.

Example eatms-container with additional information

JavaScript-Code

<script src="//SUB-DOMAIN/trck/etms/eatms.js?campaign_id=1&product=&page=landingpage&disable_tags=true"></script>

Conversion-Trackingcode

Introduction

This tracking code is responsible for capturing the conversion / order and is to be output on the order completion checkout page. 

JavaScript-Code

(function() { 

    var campaign_id = 'CAMPAIGN_ID';

    var trigger_id = 'TRIGGER_ID';

    var token = 'ORDERTOKEN'; 

    var turnover = 'TURNOVER';

    var descr = 'DESCRIPTION';

    var currency = 'EUR';

    var storageKey = 'emid';

    var trackingDomain = 'SUB-DOMAIN';

    /* please insert the EMID here which was previously transfered to you via GET-Parameter to the landingpage */

    /* if you are not able to store and insert the EMID here, please leave this line as it is */

    var emid = null;

    var attribution = '1';


   var trackingUrl = ‘https://'+trackingDomain+'/trck/etrack/?campaign_id='+campaign_id+'&trigger_id='+trigger_id+'&token='+token+'&descr='+descr+'&currency='+currency+'&turnover='+turnover+'&attribution='+attribution+'&t=js';


emid = emid || window.localStorage[storageKey];

if(emid) {

  trackingUrl += '&emid='+emid;

}


var req = new XMLHttpRequest;req.withCredentials = true;req.open("GET",

trackingUrl),req.send(),req.onreadystatechange = function () { (req.readyState === 4) ?

eval(req.response) : null };

})();

Variable description

At the beginning of the code, the variables are initialized. The values highlighted in red must be replaced by the corresponding values. The variables are filled according to the table:

VARIABLE

BESCHREIBUNG

CAMPAIGN_ID

The campaign ID is stored here.

TRIGGER_ID

The trigger ID is stored here.


TOKEN

The order number / order ID is stored here.

TURNOVER

The net order value is stored here. This may result in the commission for the publisher.

DESC

A description can be entered here.

CURRENCY

The current currency is stored here.


This is used, for example, if a store is operated in Switzerland, but sells its goods in €. If the field is left empty, the currency setting of the partner program is used.

STORAGEKEY

The local storage key where the EMID is located is stored here.

TRACKINGDOMAIN

The domain of the partner platform is stored here.

ATTRIBUTION

Here the attribution of the order is stored. The value is transferred in decimal format and a point as separator. (50% = 0.50)

EMID

Is filled with the value of the parameter emid, which is transferred from easy.affiliate to the landing page via the clicklink.