Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Conversion-Trackingcode

Introduction

This tracking code is responsible for capturing the conversion / order and is to be output on the order completion 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.

  • No labels