Table of Contents

Analytics: Installing DataFeedWatch Tag in Google Tag Manager

DataFeedWatch Updated by DataFeedWatch

To install DataFeedWatch Tag in Google Tag Manager, follow the steps below:

Create a Variable:

  1. In Google Tag Manager, go to Variables
  2. To create a new one, in User-Defined Variables section click New
  3. Change the name to dfwTrackerVar, and click on the image below it
  4. From the list of variable types, select Custom JavaScript
  5. In the new window, paste the following code, and hit Save
function() {
function e() {
function e() {
return Math.floor(65536 * (1 + Math.random())).toString(16).substring(1)
}
return "dfwt" + e() + e() + e() + e() + e() + e()
}

function r(e, r) {
function n(e) {
0 === e.indexOf('"') && (e = e.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\"));
try {
return e.replace(/\+/g, " ")
} catch (r) {}
return ""
}
if (i(r)) {
var o = new Date;
return o.setTime(o.getTime() + 63072e6), t.cookie = e + "=" + r + ("; expires=" + o.toUTCString()) + "; path=/"
}
for (var c, f, d, a = e ? void 0 : {}, u = t.cookie ? t.cookie.split("; ") : [], l = 0, k = u.length; k > l; l++) {
if (c = u[l].split("="), f = c.shift(), d = c.join("="), e && e === f) {
a = n(d);
break
}!e && i(d = n(d)) && (a[f] = d)
}
return a
}

function i(e) {
return null === e ? !1 : void 0 !== e
}
var t = document,
n = "_dfwt",
o = /dfw_tracker=([0-9a-zA-Z\-\_]+)/.exec(location.href);
if (null !== o && i(o[1]) && (o = o[1]), "string" == typeof o) {
var c = r(n);
i(c) || (c = e(), r(n, c));
return c + "-" + o
}
}

Edit Your Universal Analytics Tag:

  1. In Google Tag Manager, go to Tags
  2. To open your current Universal Analytics Tag, click on it, and click on Tag Configuration
    Note that this should be the Tag declared in the installation process in DataFeedWatch.
  3. Click More Settings > Custom Dimensions > Add Custom Dimension
  4. Set Index to the custom dimension index from the installation page in DataFeedWatch, and Dimension Value to {{dfwTrackerVar}}
    You'll find the custom dimension index in the last step of our installation.
  5. Hit Save
  6. To publish the new settings, click Submit > Publish
  7. To check the results, click Validate in the installation process in DataFeedWatch
  8. Click Finish to save your changes and complete the process
    Now you'll need to wait a minute before we collect your data. We'll show you the details in your Analytics dashboard as soon as we get some product data.

Contact

Powered by HelpDocs (opens in a new tab)

Powered by HelpDocs (opens in a new tab)