Versions Compared

Key

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

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

})();

...