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.

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.

...

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>

...

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 };

})();

...