- 31 Oct 2024
- DarkLight
Advertiser MasterTag
- Updated on 31 Oct 2024
- DarkLight
The MasterTag (also referred to as the Journey Tag), is a JavaScript library containing all functions required for our tracking solution. This script should be unconditionally appended to every page on your site, including the Confirmation page.
You should not append this to any page that displays or processes payment information or otherwise personally identifiable information.
This should be done as late as possible, for example, by placing the HTML script element just above the closing body tag and declaring it as defer="defer"
.
One of the script’s functions is to create a first-party cookie upon a customer landing on your site. Based on the value of the awc=
parameter appended to your URL by our redirect, the value of this cookie will be set.
For example, awc=1001_1403695822_a430d81e22c9e8687f423efcf024fbaa
.
It is therefore vital that you pass this parameter and value pair on if you are issuing an immediate redirect or, in any other way, manipulating the URL.
Script Template
https://www.dwin1.com/{{advertiserId}}.js
{{advertiserId}}
must be replaced by your program’s Advertiser ID. This value is also commonly referred to as the program’s MID or Merchant ID.
Example #1 - HTML Script Implementation
<script defer="defer" src="https://www.dwin1.com/1001.js" type="text/javascript"></script>
Example #2 - JavaScript Append Implementation
var awMastertag = document.createElement("script");
awMastertag.setAttribute("defer", "defer");
awMastertag.src = "https://www.dwin1.com/1001.js";
awMastertag.type = "text/javascript";
document.getElementsByTagName("body")[0].appendChild(awMastertag);