Skip to content

Instantly share code, notes, and snippets.

@dyroffk
Last active August 23, 2017 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dyroffk/4b020ef6708e464237de588d25742943 to your computer and use it in GitHub Desktop.
Save dyroffk/4b020ef6708e464237de588d25742943 to your computer and use it in GitHub Desktop.
Adobe Omniture Unminified
/*
Start ActivityMap Module
The following module enables ActivityMap tracking in Adobe Analytics. ActivityMap
allows you to view data overlays on your links and content to understand how
users engage with your web site. If you do not intend to use ActivityMap, you
can remove the following block of code from your AppMeasurement.js file.
Additional documentation on how to configure ActivityMap is available at:
https://marketing.adobe.com/resources/help/en_US/analytics/activitymap/getting-started-admins.html
*/
function AppMeasurement_Module_ActivityMap(f) {
function g(a, d) {
var b, c, n;
if (a && d && (b = e.c[d] || (e.c[d] = d.split(","))))
for (n = 0; n < b.length && (c = b[n++]);)
if (-1 < a.indexOf(c)) return null;
p = 1;
return a
}
function q(a, d, b, c, e) {
var g, h;
if (a.dataset && (h = a.dataset[d])) g = h;
else if (a.getAttribute)
if (h = a.getAttribute("data-" + b)) g = h;
else if (h = a.getAttribute(b)) g = h;
if (!g && f.useForcedLinkTracking && e && (g = "", d = a.onclick ? "" + a.onclick : "")) {
b = d.indexOf(c);
var l, k;
if (0 <= b) {
for (b += 10; b < d.length && 0 <= "= \t\r\n".indexOf(d.charAt(b));) b++;
if (b < d.length) {
h = b;
for (l = k = 0; h < d.length && (";" != d.charAt(h) || l);) l ? d.charAt(h) != l || k ? k = "\\" == d.charAt(h) ? !k : 0 : l = 0 : (l = d.charAt(h), '"' != l && "'" != l && (l = 0)), h++;
if (d = d.substring(b, h)) a.e = new Function("s", "var e;try{s.w." + c + "=" + d + "}catch(e){}"), a.e(f)
}
}
}
return g || e && f.w[c]
}
function r(a, d, b) {
var c;
return (c = e[d](a, b)) && (p ? (p = 0, c) : g(k(c), e[d + "Exclusions"]))
}
function s(a, d, b) {
var c;
if (a && !(1 === (c = a.nodeType) && (c = a.nodeName) && (c = c.toUpperCase()) && t[c]) && (1 === a.nodeType && (c = a.nodeValue) && (d[d.length] = c), b.a ||
b.t || b.s || !a.getAttribute || ((c = a.getAttribute("alt")) ? b.a = c : (c = a.getAttribute("title")) ? b.t = c : "IMG" == ("" + a.nodeName).toUpperCase() && (c = a.getAttribute("src") || a.src) && (b.s = c)), (c = a.childNodes) && c.length))
for (a = 0; a < c.length; a++) s(c[a], d, b)
}
function k(a) {
if (null == a || void 0 == a) return a;
try {
return a.replace(RegExp("^[\\s\\n\\f\\r\\t\t-\r \u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u205f\u3000\ufeff]+", "mg"), "").replace(RegExp("[\\s\\n\\f\\r\\t\t-\r \u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u205f\u3000\ufeff]+$",
"mg"), "").replace(RegExp("[\\s\\n\\f\\r\\t\t-\r \u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u205f\u3000\ufeff]{1,}", "mg"), " ").substring(0, 254)
} catch (d) {}
}
var e = this;
e.s = f;
var _window = window;
_window.s_c_in || (_window.s_c_il = [], _window.s_c_in = 0);
e._il = _window.s_c_il;
e._in = _window.s_c_in;
e._il[e._in] = e;
_window.s_c_in++;
e._c = "s_m";
e.c = {};
var p = 0,
t = {
SCRIPT: 1,
STYLE: 1,
LINK: 1,
CANVAS: 1
};
e._g = function () {
var a, d, b, c = f.contextData,
e = f.linkObject;
(a = f.pageName || f.pageURL) && (d = r(e, "link", f.linkName)) && (b = r(e, "region")) && (c["a.activitymap.page"] = a.substring(0,
255), c["a.activitymap.link"] = 128 < d.length ? d.substring(0, 128) : d, c["a.activitymap.region"] = 127 < b.length ? b.substring(0, 127) : b, c["a.activitymap.pageIDType"] = f.pageName ? 1 : 0)
};
e.link = function (a, d) {
var b;
if (d) b = g(k(d), e.linkExclusions);
else if ((b = a) && !(b = q(a, "sObjectId", "s-object-id", "s_objectID", 1))) {
var c, f;
(f = g(k(a.innerText || a.textContent), e.linkExclusions)) || (s(a, c = [], b = {
a: void 0,
t: void 0,
s: void 0
}), (f = g(k(c.join("")))) || (f = g(k(b.a ? b.a : b.t ? b.t : b.s ? b.s : void 0))) || !(c = (c = a.tagName) && c.toUpperCase ? c.toUpperCase() :
"") || ("INPUT" == c || "SUBMIT" == c && a.value ? f = g(k(a.value)) : "IMAGE" == c && a.src && (f = g(k(a.src)))));
b = f
}
return b
};
e.region = function (a) {
for (var d, b = e.regionIDAttribute || "id"; a && (a = a.parentNode);) {
if (d = q(a, b, b, b)) return d;
if ("BODY" == a.nodeName) return "BODY"
}
}
}
/* End ActivityMap Module */
/*
============== DO NOT ALTER ANYTHING BELOW THIS LINE ! ===============
AppMeasurement for JavaScript version: 2.3.0
Copyright 1996-2016 Adobe, Inc. All Rights Reserved
More info available at http://www.adobe.com/marketing-cloud.html
*/
function AppMeasurement(r) {
var appMeasurement = this;
appMeasurement.version = "2.3.0";
var _window = window;
// s_c_il => Instance List
// s_c_in => Instance Number
_window.s_c_in || (_window.s_c_il = [], _window.s_c_in = 0);
appMeasurement._il = _window.s_c_il;
appMeasurement._in = _window.s_c_in;
appMeasurement._il[appMeasurement._in] = appMeasurement;
_window.s_c_in++;
appMeasurement._c = "s_c";
var p = _window.AppMeasurement.Pb;
p || (p = null);
var n = _window,
m, s;
try {
for (m = n.parent, s = n.location; m && m.location && s && "" + m.location != "" + s && n.location && "" + m.location != "" + n.location && m.location.host == s.host;) n = m, m = n.parent
} catch (u) {}
appMeasurement.F = function (a) {
try {
console.log(a)
} catch (b) {}
};
appMeasurement.Ma = function (a) {
return "" + parseInt(a) == "" + a
};
appMeasurement.replace = function (a, b, d) {
return !a ||
0 > a.indexOf(b) ? a : a.split(b).join(d)
};
appMeasurement.escape = function (c) {
var b, d;
if (!c) return c;
c = encodeURIComponent(c);
for (b = 0; 7 > b; b++) d = "+~!*()'".substring(b, b + 1), 0 <= c.indexOf(d) && (c = appMeasurement.replace(c, d, "%" + d.charCodeAt(0).toString(16).toUpperCase()));
return c
};
appMeasurement.unescape = function (c) {
if (!c) return c;
c = 0 <= c.indexOf("+") ? appMeasurement.replace(c, "+", " ") : c;
try {
return decodeURIComponent(c)
} catch (b) {}
return unescape(c)
};
appMeasurement.wb = function () {
var c = _window.location.hostname,
b = appMeasurement.fpCookieDomainPeriods,
d;
b || (b = appMeasurement.cookieDomainPeriods);
if (c && !appMeasurement.Ea && !/^[0-9.]+$/.test(c) &&
(b = b ? parseInt(b) : 2, b = 2 < b ? b : 2, d = c.lastIndexOf("."), 0 <= d)) {
for (; 0 <= d && 1 < b;) d = c.lastIndexOf(".", d - 1), b--;
appMeasurement.Ea = 0 < d ? c.substring(d) : c
}
return appMeasurement.Ea
};
//
// Cookie Read
//
appMeasurement.c_r = appMeasurement.cookieRead = function (c) {
c = appMeasurement.escape(c);
var b = " " + appMeasurement._document.cookie,
d = b.indexOf(" " + c + "="),
f = 0 > d ? d : b.indexOf(";", d);
c = 0 > d ? "" : appMeasurement.unescape(b.substring(d + 2 + c.length, 0 > f ? b.length : f));
return "[[B]]" != c ? c : ""
};
//
// Cookie Write
//
appMeasurement.c_w = appMeasurement.cookieWrite = function (cookieName, cookieValue, expiry) {
console.log("Writing cookie: " + cookieName + ": " + cookieValue);
var f = appMeasurement.wb(),
cookieLifetime = appMeasurement.cookieLifetime,
g;
var documentCookie = "";
cookieValue = "" + cookieValue;
cookieLifetime = cookieLifetime ? ("" + cookieLifetime).toUpperCase() : "";
expiry && "SESSION" != cookieLifetime && "NONE" != cookieLifetime && ((g = "" != cookieValue ? parseInt(cookieLifetime ? cookieLifetime : 0) : -60) ?
(expiry = new Date, expiry.setTime(expiry.getTime() + 1E3 * g)) :
1 == expiry && (expiry = new Date, g = expiry.getYear(), expiry.setYear(g + 5 + (1900 > g ? 1900 : 0))));
return cookieName && "NONE" != cookieLifetime ?
(documentCookie = appMeasurement.escape(cookieName) + "=" +
appMeasurement.escape("" != cookieValue ? cookieValue : "[[B]]") +
"; path=/" + (expiry && "SESSION" != cookieLifetime ? "; expires=" + expiry.toGMTString() : "") +
(f ? "; domain=" + f : ""),
appMeasurement._document.cookie = documentCookie,
console.log("Desired cookie: " + documentCookie +
"\nCookie after write: " + appMeasurement.cookieRead(cookieName) +
"\nDocument cookie " + appMeasurement._document.cookie),
appMeasurement.cookieRead(cookieName) == cookieValue) : 0
};
appMeasurement.L = [];
appMeasurement.ia = function (c, b, d) {
if (appMeasurement.Fa) return 0;
appMeasurement.maxDelay || (appMeasurement.maxDelay = 250);
var f = 0,
e = (new Date).getTime() + appMeasurement.maxDelay,
g = appMeasurement._document.visibilityState,
h = ["webkitvisibilitychange", "visibilitychange"];
g || (g = appMeasurement._document.webkitVisibilityState);
if (g && "prerender" == g) {
if (!appMeasurement.ja)
for (appMeasurement.ja = 1, d = 0; d < h.length; d++) appMeasurement._document.addEventListener(h[d], function () {
var c = appMeasurement._document.visibilityState;
c || (c = appMeasurement._document.webkitVisibilityState);
"visible" == c && (appMeasurement.ja = 0, appMeasurement.delayReady())
});
f = 1;
e = 0
} else d || appMeasurement.p("_d") && (f = 1);
f && (appMeasurement.L.push({
m: c,
a: b,
t: e
}), appMeasurement.ja || setTimeout(appMeasurement.delayReady, appMeasurement.maxDelay));
return f
};
appMeasurement.delayReady = function () {
var c = (new Date).getTime(),
b = 0,
d;
for (appMeasurement.p("_d") ? b = 1 : appMeasurement.xa(); 0 < appMeasurement.L.length;) {
d = appMeasurement.L.shift();
if (b && !d.t && d.t > c) {
appMeasurement.L.unshift(d);
setTimeout(appMeasurement.delayReady, parseInt(appMeasurement.maxDelay / 2));
break
}
appMeasurement.Fa = 1;
appMeasurement[d.m].apply(appMeasurement, d.a);
appMeasurement.Fa = 0
}
};
// Change report suites
appMeasurement.setAccount = appMeasurement.sa = function (rsid) {
var b, d;
if (!appMeasurement.ia("setAccount", arguments))
if (appMeasurement.account = rsid, appMeasurement.allAccounts)
for (b = appMeasurement.allAccounts.concat(rsid.split(",")), appMeasurement.allAccounts = [], b.sort(), d = 0; d < b.length; d++) 0 != d && b[d - 1] == b[d] || appMeasurement.allAccounts.push(b[d]);
else appMeasurement.allAccounts = rsid.split(",")
};
appMeasurement.foreachVar = function (c, b) {
var d, f, e, g, h = "";
e = f = "";
if (appMeasurement.lightProfileID) d = appMeasurement.P, (h = appMeasurement.lightTrackVars) && (h = "," + h + "," + appMeasurement.na.join(",") + ",");
else {
d = appMeasurement.g;
if (appMeasurement.pe || appMeasurement.linkType) h = appMeasurement.linkTrackVars, f = appMeasurement.linkTrackEvents,
appMeasurement.pe && (e = appMeasurement.pe.substring(0, 1).toUpperCase() + appMeasurement.pe.substring(1), appMeasurement[e] && (h = appMeasurement[e].Nb, f = appMeasurement[e].Mb));
h && (h = "," + h + "," + appMeasurement.H.join(",") + ",");
f && h && (h += ",events,")
}
b && (b = "," + b + ",");
for (f = 0; f < d.length; f++) e = d[f], (g = appMeasurement[e]) && (!h || 0 <= h.indexOf("," + e + ",")) && (!b || 0 <= b.indexOf("," + e + ",")) && c(e, g)
};
appMeasurement.r = function (c, b, d, f, e) {
var g = "",
h, l, k, q, m = 0;
"contextData" == c && (c = "c");
if (b) {
for (h in b)
if (!(Object.prototype[h] || e && h.substring(0, e.length) != e) && b[h] && (!d || 0 <= d.indexOf("," + (f ? f + "." : "") + h + ","))) {
k = !1;
if (m)
for (l = 0; l < m.length; l++) h.substring(0,
m[l].length) == m[l] && (k = !0);
if (!k && ("" == g && (g += "&" + c + "."), l = b[h], e && (h = h.substring(e.length)), 0 < h.length))
if (k = h.indexOf("."), 0 < k) l = h.substring(0, k), k = (e ? e : "") + l + ".", m || (m = []), m.push(k), g += appMeasurement.r(l, b, d, f, k);
else if ("boolean" == typeof l && (l = l ? "true" : "false"), l) {
if ("retrieveLightData" == f && 0 > e.indexOf(".contextData.")) switch (k = h.substring(0, 4), q = h.substring(4), h) {
case "transactionID":
h = "xact";
break;
case "channel":
h = "ch";
break;
case "campaign":
h = "v0";
break;
default:
appMeasurement.Ma(q) && ("prop" == k ? h = "c" + q : "eVar" == k ? h = "v" +
q : "list" == k ? h = "l" + q : "hier" == k && (h = "h" + q, l = l.substring(0, 255)))
}
g += "&" + appMeasurement.escape(h) + "=" + appMeasurement.escape(l)
}
}
"" != g && (g += "&." + c)
}
return g
};
appMeasurement.usePostbacks = 0;
appMeasurement.zb = function () {
var c = "",
b, d, f, e, g, h, l, k, q = "",
m = "",
n = e = "";
if (appMeasurement.lightProfileID) b = appMeasurement.P, (q = appMeasurement.lightTrackVars) && (q = "," + q + "," + appMeasurement.na.join(",") + ",");
else {
b = appMeasurement.g;
if (appMeasurement.pe || appMeasurement.linkType) q = appMeasurement.linkTrackVars, m = appMeasurement.linkTrackEvents, appMeasurement.pe && (e = appMeasurement.pe.substring(0, 1).toUpperCase() + appMeasurement.pe.substring(1), appMeasurement[e] && (q = appMeasurement[e].Nb, m = appMeasurement[e].Mb));
q && (q = "," + q + "," + appMeasurement.H.join(",") + ",");
m && (m = "," + m + ",", q && (q +=
",events,"));
appMeasurement.events2 && (n += ("" != n ? "," : "") + appMeasurement.events2)
}
if (appMeasurement.visitor && appMeasurement.visitor.getCustomerIDs) {
e = p;
if (g = appMeasurement.visitor.getCustomerIDs())
for (d in g) Object.prototype[d] || (f = g[d], "object" == typeof f && (e || (e = {}), f.id && (e[d + ".id"] = f.id), f.authState && (e[d + ".as"] = f.authState)));
e && (c += appMeasurement.r("cid", e))
}
appMeasurement.AudienceManagement && appMeasurement.AudienceManagement.isReady() && (c += appMeasurement.r("d", appMeasurement.AudienceManagement.getEventCallConfigParams()));
for (d = 0; d < b.length; d++) {
e = b[d];
g = appMeasurement[e];
f = e.substring(0, 4);
h = e.substring(4);
g || ("events" == e && n ? (g = n, n =
"") : "marketingCloudOrgID" == e && appMeasurement.visitor && (g = appMeasurement.visitor.marketingCloudOrgID));
if (g && (!q || 0 <= q.indexOf("," + e + ","))) {
switch (e) {
case "customerPerspective":
e = "cp";
break;
case "marketingCloudOrgID":
e = "mcorgid";
break;
case "supplementalDataID":
e = "sdid";
break;
case "timestamp":
e = "ts";
break;
case "dynamicVariablePrefix":
e = "D";
break;
case "visitorID":
e = "vid";
break;
case "marketingCloudVisitorID":
e = "mid";
break;
case "analyticsVisitorID":
e = "aid";
break;
case "audienceManagerLocationHint":
e = "aamlh";
break;
case "audienceManagerBlob":
e =
"aamb";
break;
case "authState":
e = "as";
break;
case "pageURL":
e = "g";
255 < g.length && (appMeasurement.pageURLRest = g.substring(255), g = g.substring(0, 255));
break;
case "pageURLRest":
e = "-g";
break;
case "referrer":
e = "r";
break;
case "vmk":
case "visitorMigrationKey":
e = "vmt";
break;
case "visitorMigrationServer":
e = "vmf";
appMeasurement.ssl && appMeasurement.visitorMigrationServerSecure && (g = "");
break;
case "visitorMigrationServerSecure":
e = "vmf";
!appMeasurement.ssl && appMeasurement.visitorMigrationServer && (g = "");
break;
case "charSet":
e = "ce";
break;
case "visitorNamespace":
e = "ns";
break;
case "cookieDomainPeriods":
e =
"cdp";
break;
case "cookieLifetime":
e = "cl";
break;
case "variableProvider":
e = "vvp";
break;
case "currencyCode":
e = "cc";
break;
case "channel":
e = "ch";
break;
case "transactionID":
e = "xact";
break;
case "campaign":
e = "v0";
break;
case "latitude":
e = "lat";
break;
case "longitude":
e = "lon";
break;
case "resolution":
e = "s";
break;
case "colorDepth":
e = "c";
break;
case "javascriptVersion":
e = "j";
break;
case "javaEnabled":
e = "v";
break;
case "cookiesEnabled":
e = "k";
break;
case "browserWidth":
e = "bw";
break;
case "browserHeight":
e = "bh";
break;
case "connectionType":
e = "ct";
break;
case "homepage":
e = "hp";
break;
case "events":
n && (g += ("" != g ? "," : "") + n);
if (m)
for (h = g.split(","), g = "", f = 0; f < h.length; f++) l = h[f], k = l.indexOf("="), 0 <= k && (l = l.substring(0, k)), k = l.indexOf(":"), 0 <= k && (l = l.substring(0, k)), 0 <= m.indexOf("," + l + ",") && (g += (g ? "," : "") + h[f]);
break;
case "events2":
g = "";
break;
case "contextData":
c += appMeasurement.r("c", appMeasurement[e], q, e);
g = "";
break;
case "lightProfileID":
e = "mtp";
break;
case "lightStoreForSeconds":
e = "mtss";
appMeasurement.lightProfileID || (g = "");
break;
case "lightIncrementBy":
e =
"mti";
appMeasurement.lightProfileID || (g = "");
break;
case "retrieveLightProfiles":
e = "mtsr";
break;
case "deleteLightProfiles":
e = "mtsd";
break;
case "retrieveLightData":
appMeasurement.retrieveLightProfiles && (c += appMeasurement.r("mts", appMeasurement[e], q, e));
g = "";
break;
default:
appMeasurement.Ma(h) && ("prop" == f ? e = "c" + h : "eVar" == f ? e = "v" + h : "list" == f ? e = "l" + h : "hier" == f && (e = "h" + h, g = g.substring(0, 255)))
}
g && (c += "&" + e + "=" + ("pev" != e.substring(0, 3) ? appMeasurement.escape(g) : g))
}
"pev3" == e && appMeasurement.e && (c += appMeasurement.e)
}
return c
};
appMeasurement.D = function (a) {
var b = a.tagName;
if ("undefined" != "" + a.Sb || "undefined" != "" + a.Ib && "HTML" !=
("" + a.Ib).toUpperCase()) return "";
b = b && b.toUpperCase ? b.toUpperCase() : "";
"SHAPE" == b && (b = "");
b && (("INPUT" == b || "BUTTON" == b) && a.type && a.type.toUpperCase ? b = a.type.toUpperCase() : !b && a.href && (b = "A"));
return b
};
appMeasurement.Ia = function (a) {
var b = _window.location,
d = a.href ? a.href : "",
f, e, g;
f = d.indexOf(":");
e = d.indexOf("?");
g = d.indexOf("/");
d && (0 > f || 0 <= e && f > e || 0 <= g && f > g) && (e = a.protocol && 1 < a.protocol.length ? a.protocol : b.protocol ? b.protocol : "", f = b.pathname.lastIndexOf("/"), d = (e ? e + "//" : "") + (a.host ? a.host : b.host ? b.host : "") + ("/" != d.substring(0,
1) ? b.pathname.substring(0, 0 > f ? 0 : f) + "/" : "") + d);
return d
};
appMeasurement.M = function (c) {
var b = appMeasurement.D(c),
d, f, e = "",
g = 0;
return b && (d = c.protocol, f = c.onclick, !c.href || "A" != b && "AREA" != b || f && d && !(0 > d.toLowerCase().indexOf("javascript")) ? f ? (e = appMeasurement.replace(appMeasurement.replace(appMeasurement.replace(appMeasurement.replace("" + f, "\r", ""), "\n", ""), "\t", ""), " ", ""), g = 2) : "INPUT" == b || "SUBMIT" == b ? (c.value ? e = c.value : c.innerText ? e = c.innerText : c.textContent && (e = c.textContent), g = 3) : "IMAGE" == b && c.src && (e = c.src) : e = appMeasurement.Ia(c), e) ? {
id: e.substring(0, 100),
type: g
} : 0
};
appMeasurement.Qb = function (c) {
for (var b =
appMeasurement.D(c), d = appMeasurement.M(c); c && !d && "BODY" != b;)
if (c = c.parentElement ? c.parentElement : c.parentNode) b = appMeasurement.D(c), d = appMeasurement.M(c);
d && "BODY" != b || (c = 0);
c && (b = c.onclick ? "" + c.onclick : "", 0 <= b.indexOf(".tl(") || 0 <= b.indexOf(".trackLink(")) && (c = 0);
return c
};
appMeasurement.Hb = function () {
var c, b, d = appMeasurement.linkObject,
f = appMeasurement.linkType,
e = appMeasurement.linkURL,
g, h;
appMeasurement.oa = 1;
d || (appMeasurement.oa = 0, d = appMeasurement.clickObject);
if (d) {
c = appMeasurement.D(d);
for (b = appMeasurement.M(d); d && !b && "BODY" != c;)
if (d = d.parentElement ? d.parentElement : d.parentNode) c = appMeasurement.D(d), b = appMeasurement.M(d);
b && "BODY" != c || (d = 0);
if (d && !appMeasurement.linkObject) {
var l = d.onclick ? "" + d.onclick :
"";
if (0 <= l.indexOf(".tl(") || 0 <= l.indexOf(".trackLink(")) d = 0
}
} else appMeasurement.oa = 1;
!e && d && (e = appMeasurement.Ia(d));
e && !appMeasurement.linkLeaveQueryString && (g = e.indexOf("?"), 0 <= g && (e = e.substring(0, g)));
if (!f && e) {
var m = 0,
q = 0,
n;
if (appMeasurement.trackDownloadLinks && appMeasurement.linkDownloadFileTypes)
for (l = e.toLowerCase(), g = l.indexOf("?"), h = l.indexOf("#"), 0 <= g ? 0 <= h && h < g && (g = h) : g = h, 0 <= g && (l = l.substring(0, g)), g = appMeasurement.linkDownloadFileTypes.toLowerCase().split(","), h = 0; h < g.length; h++)(n = g[h]) && l.substring(l.length - (n.length + 1)) == "." + n && (f = "d");
if (appMeasurement.trackExternalLinks &&
!f && (l = e.toLowerCase(), appMeasurement.La(l) && (appMeasurement.linkInternalFilters || (appMeasurement.linkInternalFilters = _window.location.hostname), g = 0, appMeasurement.linkExternalFilters ? (g = appMeasurement.linkExternalFilters.toLowerCase().split(","), m = 1) : appMeasurement.linkInternalFilters && (g = appMeasurement.linkInternalFilters.toLowerCase().split(",")), g))) {
for (h = 0; h < g.length; h++) n = g[h], 0 <= l.indexOf(n) && (q = 1);
q ? m && (f = "e") : m || (f = "e")
}
}
appMeasurement.linkObject = d;
appMeasurement.linkURL = e;
appMeasurement.linkType = f;
if (appMeasurement.trackClickMap || appMeasurement.trackInlineStats) appMeasurement.e = "", d && (f = appMeasurement.pageName, e = 1, d = d.sourceIndex, f || (f = appMeasurement.pageURL, e = 0), _window.s_objectID && (b.id =
_window.s_objectID, d = b.type = 1), f && b && b.id && c && (appMeasurement.e = "&pid=" + appMeasurement.escape(f.substring(0, 255)) + (e ? "&pidt=" + e : "") + "&oid=" + appMeasurement.escape(b.id.substring(0, 100)) + (b.type ? "&oidt=" + b.type : "") + "&ot=" + c + (d ? "&oi=" + d : "")))
};
appMeasurement.Ab = function () {
var c = appMeasurement.oa,
b = appMeasurement.linkType,
d = appMeasurement.linkURL,
f = appMeasurement.linkName;
b && (d || f) && (b = b.toLowerCase(), "d" != b && "e" != b && (b = "o"), appMeasurement.pe = "lnk_" + b, appMeasurement.pev1 = d ? appMeasurement.escape(d) : "", appMeasurement.pev2 = f ? appMeasurement.escape(f) : "", c = 1);
appMeasurement.abort && (c = 0);
if (appMeasurement.trackClickMap || appMeasurement.trackInlineStats || appMeasurement.ActivityMap) {
var b = {},
d = 0,
e = appMeasurement.cookieRead("s_sq"),
g = e ? e.split("&") :
0,
h, l, k, e = 0;
if (g)
for (h = 0; h < g.length; h++) l = g[h].split("="), f = appMeasurement.unescape(l[0]).split(","), l = appMeasurement.unescape(l[1]), b[l] = f;
f = appMeasurement.account.split(",");
h = {};
for (k in appMeasurement.contextData) k && !Object.prototype[k] && "a.activitymap." == k.substring(0, 14) && (h[k] = appMeasurement.contextData[k], appMeasurement.contextData[k] = "");
appMeasurement.e = appMeasurement.r("c", h) + (appMeasurement.e ? appMeasurement.e : "");
if (c || appMeasurement.e) {
c && !appMeasurement.e && (e = 1);
for (l in b)
if (!Object.prototype[l])
for (k = 0; k < f.length; k++)
for (e && (g = b[l].join(","), g == appMeasurement.account && (appMeasurement.e += ("&" != l.charAt(0) ? "&" : "") + l, b[l] = [], d = 1)), h = 0; h < b[l].length; h++) g = b[l][h],
g == f[k] && (e && (appMeasurement.e += "&u=" + appMeasurement.escape(g) + ("&" != l.charAt(0) ? "&" : "") + l + "&u=0"), b[l].splice(h, 1), d = 1);
c || (d = 1);
if (d) {
e = "";
h = 2;
!c && appMeasurement.e && (e = appMeasurement.escape(f.join(",")) + "=" + appMeasurement.escape(appMeasurement.e), h = 1);
for (l in b) !Object.prototype[l] && 0 < h && 0 < b[l].length && (e += (e ? "&" : "") + appMeasurement.escape(b[l].join(",")) + "=" + appMeasurement.escape(l), h--);
appMeasurement.cookieWrite("s_sq", e)
}
}
}
return c
};
//
// Prepare query params
//
appMeasurement.Bb = function () {
if (!appMeasurement.Lb) {
var c = new Date,
b = n.location,
d, f, e = f = d = "",
g = "",
h = "",
l = "1.2",
// NOTE: If this cookie fails to write Adobe will drop the visitor
// analytics sent for the session. This will happen on domains like
// github.io which are a part of the public suffix list
// https://publicsuffix.org/list/
k = appMeasurement.cookieWrite("s_cc", "true", 0) ? "Y" : "N",
consol
m = "",
p = "";
if (c.setUTCDate && (l = "1.3", (0).toPrecision &&
(l = "1.5", c = [], c.forEach))) {
l = "1.6";
f = 0;
d = {};
try {
f = new Iterator(d), f.next && (l = "1.7", c.reduce && (l = "1.8", l.trim && (l = "1.8.1", Date.parse && (l = "1.8.2", Object.create && (l = "1.8.5")))))
} catch (r) {}
}
d = screen.width + "x" + screen.height;
e = navigator.javaEnabled() ? "Y" : "N";
f = screen.pixelDepth ? screen.pixelDepth : screen.colorDepth;
g = appMeasurement.w.innerWidth ? appMeasurement.w.innerWidth : appMeasurement._document.documentElement.offsetWidth;
h = appMeasurement.w.innerHeight ? appMeasurement.w.innerHeight : appMeasurement._document.documentElement.offsetHeight;
try {
appMeasurement.b.addBehavior("#default#homePage"), m = appMeasurement.b.Rb(b) ? "Y" : "N"
} catch (s) {}
try {
appMeasurement.b.addBehavior("#default#clientCaps"),
p = appMeasurement.b.connectionType
} catch (t) {}
appMeasurement.resolution = d;
appMeasurement.colorDepth = f;
appMeasurement.javascriptVersion = l;
appMeasurement.javaEnabled = e;
appMeasurement.cookiesEnabled = k;
appMeasurement.browserWidth = g;
appMeasurement.browserHeight = h;
appMeasurement.connectionType = p;
appMeasurement.homepage = m;
appMeasurement.Lb = 1
}
};
appMeasurement.Q = {};
appMeasurement.loadModule = function (c, b) {
var d = appMeasurement.Q[c];
if (!d) {
d = _window["AppMeasurement_Module_" + c] ? new _window["AppMeasurement_Module_" + c](appMeasurement) : {};
appMeasurement.Q[c] = appMeasurement[c] = d;
d.eb = function () {
return d.ib
};
d.jb = function (b) {
if (d.ib = b) appMeasurement[c + "_onLoad"] = b, appMeasurement.ia(c + "_onLoad", [appMeasurement, d], 1) || b(appMeasurement, d)
};
try {
Object.defineProperty ? Object.defineProperty(d, "onLoad", {
get: d.eb,
set: d.jb
}) : d._olc = 1
} catch (f) {
d._olc = 1
}
}
b && (appMeasurement[c + "_onLoad"] = b, appMeasurement.ia(c + "_onLoad", [appMeasurement, d], 1) || b(appMeasurement, d))
};
appMeasurement.p = function (c) {
var b, d;
for (b in appMeasurement.Q)
if (!Object.prototype[b] && (d = appMeasurement.Q[b]) && (d._olc && d.onLoad && (d._olc = 0, d.onLoad(appMeasurement, d)), d[c] && d[c]())) return 1;
return 0
};
appMeasurement.Db = function () {
var c = Math.floor(1E13 * Math.random()),
b = appMeasurement.visitorSampling,
d = appMeasurement.visitorSamplingGroup,
d = "s_vsn_" + (appMeasurement.visitorNamespace ? appMeasurement.visitorNamespace : appMeasurement.account) + (d ? "_" + d : ""),
f = appMeasurement.cookieRead(d);
if (b) {
b *= 100;
f && (f = parseInt(f));
if (!f) {
if (!appMeasurement.cookieWrite(d,
c)) return 0;
f = c
}
if (f % 1E4 > b) return 0
}
return 1
};
appMeasurement.R = function (c, b) {
var d, f, e, g, h, l;
for (d = 0; 2 > d; d++)
for (f = 0 < d ? appMeasurement.Aa : appMeasurement.g, e = 0; e < f.length; e++)
if (g = f[e], (h = c[g]) || c["!" + g]) {
if (!b && ("contextData" == g || "retrieveLightData" == g) && appMeasurement[g])
for (l in appMeasurement[g]) h[l] || (h[l] = appMeasurement[g][l]);
appMeasurement[g] = h
}
};
appMeasurement.Va = function (c, b) {
var d, f, e, g;
for (d = 0; 2 > d; d++)
for (f = 0 < d ? appMeasurement.Aa : appMeasurement.g, e = 0; e < f.length; e++) g = f[e], c[g] = appMeasurement[g], b || c[g] || (c["!" + g] = 1)
};
appMeasurement.vb = function (a) {
var b, d, f, e, g, h = 0,
l, k = "",
m = "";
if (a && 255 < a.length && (b = "" + a, d = b.indexOf("?"), 0 < d && (l = b.substring(d +
1), b = b.substring(0, d), e = b.toLowerCase(), f = 0, "http://" == e.substring(0, 7) ? f += 7 : "https://" == e.substring(0, 8) && (f += 8), d = e.indexOf("/", f), 0 < d && (e = e.substring(f, d), g = b.substring(d), b = b.substring(0, d), 0 <= e.indexOf("google") ? h = ",q,ie,start,search_key,word,kw,cd," : 0 <= e.indexOf("yahoo.co") && (h = ",p,ei,"), h && l)))) {
if ((a = l.split("&")) && 1 < a.length) {
for (f = 0; f < a.length; f++) e = a[f], d = e.indexOf("="), 0 < d && 0 <= h.indexOf("," + e.substring(0, d) + ",") ? k += (k ? "&" : "") + e : m += (m ? "&" : "") + e;
k && m ? l = k + "&" + m : m = ""
}
d = 253 - (l.length - m.length) -
b.length;
a = b + (0 < d ? g.substring(0, d) : "") + "?" + l
}
return a
};
appMeasurement.ab = function (c) {
var b = appMeasurement._document.visibilityState,
d = ["webkitvisibilitychange", "visibilitychange"];
b || (b = appMeasurement._document.webkitVisibilityState);
if (b && "prerender" == b) {
if (c)
for (b = 0; b < d.length; b++) appMeasurement._document.addEventListener(d[b], function () {
var b = appMeasurement._document.visibilityState;
b || (b = appMeasurement._document.webkitVisibilityState);
"visible" == b && c()
});
return !1
}
return !0
};
appMeasurement.ea = !1;
appMeasurement.J = !1;
appMeasurement.lb = function () {
appMeasurement.J = !0;
appMeasurement.j()
};
appMeasurement.ca = !1;
appMeasurement.V = !1;
appMeasurement.hb = function (c) {
appMeasurement.marketingCloudVisitorID = c;
appMeasurement.V = !0;
appMeasurement.j()
};
appMeasurement.fa = !1;
appMeasurement.W = !1;
appMeasurement.mb =
function (c) {
appMeasurement.visitorOptedOut = c;
appMeasurement.W = !0;
appMeasurement.j()
};
appMeasurement.Z = !1;
appMeasurement.S = !1;
appMeasurement.Xa = function (c) {
appMeasurement.analyticsVisitorID = c;
appMeasurement.S = !0;
appMeasurement.j()
};
appMeasurement.ba = !1;
appMeasurement.U = !1;
appMeasurement.Za = function (c) {
appMeasurement.audienceManagerLocationHint = c;
appMeasurement.U = !0;
appMeasurement.j()
};
appMeasurement.aa = !1;
appMeasurement.T = !1;
appMeasurement.Ya = function (c) {
appMeasurement.audienceManagerBlob = c;
appMeasurement.T = !0;
appMeasurement.j()
};
appMeasurement.$a = function (c) {
appMeasurement.maxDelay || (appMeasurement.maxDelay = 250);
return appMeasurement.p("_d") ? (c && setTimeout(function () {
c()
}, appMeasurement.maxDelay), !1) : !0
};
appMeasurement.da = !1;
appMeasurement.I = !1;
appMeasurement.xa = function () {
appMeasurement.I = !0;
appMeasurement.j()
};
appMeasurement.isReadyToTrack = function () {
var c = !0,
b = appMeasurement.visitor,
d, f, e;
appMeasurement.ea || appMeasurement.J || (appMeasurement.ab(appMeasurement.lb) ? appMeasurement.J = !0 : appMeasurement.ea = !0);
if (appMeasurement.ea && !appMeasurement.J) return !1;
b && b.isAllowed() && (appMeasurement.ca || appMeasurement.marketingCloudVisitorID || !b.getMarketingCloudVisitorID || (appMeasurement.ca = !0, appMeasurement.marketingCloudVisitorID = b.getMarketingCloudVisitorID([appMeasurement, appMeasurement.hb]), appMeasurement.marketingCloudVisitorID && (appMeasurement.V = !0)), appMeasurement.fa || appMeasurement.visitorOptedOut || !b.isOptedOut || (appMeasurement.fa = !0, appMeasurement.visitorOptedOut = b.isOptedOut([appMeasurement, appMeasurement.mb]), appMeasurement.visitorOptedOut != p && (appMeasurement.W = !0)), appMeasurement.Z || appMeasurement.analyticsVisitorID || !b.getAnalyticsVisitorID || (appMeasurement.Z = !0, appMeasurement.analyticsVisitorID = b.getAnalyticsVisitorID([appMeasurement, appMeasurement.Xa]), appMeasurement.analyticsVisitorID && (appMeasurement.S = !0)), appMeasurement.ba ||
appMeasurement.audienceManagerLocationHint || !b.getAudienceManagerLocationHint || (appMeasurement.ba = !0, appMeasurement.audienceManagerLocationHint = b.getAudienceManagerLocationHint([appMeasurement, appMeasurement.Za]), appMeasurement.audienceManagerLocationHint && (appMeasurement.U = !0)), appMeasurement.aa || appMeasurement.audienceManagerBlob || !b.getAudienceManagerBlob || (appMeasurement.aa = !0, appMeasurement.audienceManagerBlob = b.getAudienceManagerBlob([appMeasurement, appMeasurement.Ya]), appMeasurement.audienceManagerBlob && (appMeasurement.T = !0)), c = appMeasurement.ca && !appMeasurement.V && !appMeasurement.marketingCloudVisitorID, b = appMeasurement.Z && !appMeasurement.S && !appMeasurement.analyticsVisitorID, d = appMeasurement.ba && !appMeasurement.U && !appMeasurement.audienceManagerLocationHint, f = appMeasurement.aa && !appMeasurement.T && !appMeasurement.audienceManagerBlob,
e = appMeasurement.fa && !appMeasurement.W, c = c || b || d || f || e ? !1 : !0);
appMeasurement.da || appMeasurement.I || (appMeasurement.$a(appMeasurement.xa) ? appMeasurement.I = !0 : appMeasurement.da = !0);
appMeasurement.da && !appMeasurement.I && (c = !1);
return c
};
appMeasurement.o = p;
appMeasurement.u = 0;
appMeasurement.callbackWhenReadyToTrack = function (c, b, d) {
var f;
f = {};
f.qb = c;
f.pb = b;
f.nb = d;
appMeasurement.o == p && (appMeasurement.o = []);
appMeasurement.o.push(f);
0 == appMeasurement.u && (appMeasurement.u = setInterval(appMeasurement.j, 100))
};
appMeasurement.j = function () {
var c;
if (appMeasurement.isReadyToTrack() && (appMeasurement.kb(), appMeasurement.o != p))
for (; 0 < appMeasurement.o.length;) c = appMeasurement.o.shift(), c.pb.apply(c.qb, c.nb)
};
appMeasurement.kb = function () {
appMeasurement.u && (clearInterval(appMeasurement.u), appMeasurement.u = 0)
};
appMeasurement.fb = function (c) {
var b, d, f = p,
e = p;
if (!appMeasurement.isReadyToTrack()) {
b = [];
if (c != p)
for (d in f = {}, c) f[d] = c[d];
e = {};
appMeasurement.Va(e, !0);
b.push(f);
b.push(e);
appMeasurement.callbackWhenReadyToTrack(appMeasurement, appMeasurement.track, b);
return !0
}
return !1
};
appMeasurement.xb = function () {
var c = appMeasurement.cookieRead("s_fid"),
b = "",
d = "",
f;
f = 8;
var e = 4;
if (!c || 0 > c.indexOf("-")) {
for (c = 0; 16 > c; c++) f = Math.floor(Math.random() * f), b += "0123456789ABCDEF".substring(f, f + 1), f = Math.floor(Math.random() * e), d += "0123456789ABCDEF".substring(f, f + 1), f = e = 16;
c = b + "-" + d
}
appMeasurement.cookieWrite("s_fid", c, 1) || (c = 0);
return c
};
// -------------------
// Track Page View
// https://marketing.adobe.com/resources/help/en_US/sc/implement/function_t.html
appMeasurement.t = appMeasurement.track = function (c, b) {
var d,
timestamp = new Date,
// e => Randomly generated visitor ID?
e = "s" + Math.floor(timestamp.getTime() / 108E5) % 10 +
Math.floor(1E13 * Math.random()),
// g => url escaped timestamp query param
g = timestamp.getYear(),
g = "t=" + appMeasurement.escape(timestamp.getDate() +
"/" + timestamp.getMonth() + "/" + (1900 > g ? g + 1900 : g) +
" " + timestamp.getHours() + ":" + timestamp.getMinutes() + ":" +
timestamp.getSeconds() + " " + timestamp.getDay() + " " + timestamp.getTimezoneOffset());
appMeasurement.visitor && appMeasurement.visitor.getAuthState && (appMeasurement.authState = appMeasurement.visitor.getAuthState());
appMeasurement.p("_s");
appMeasurement.fb(c) ||
(b && appMeasurement.R(b),
c &&
(d = {},
appMeasurement.Va(d, 0),
appMeasurement.R(c)),
appMeasurement.Db() &&
!appMeasurement.visitorOptedOut &&
(appMeasurement.analyticsVisitorID || appMeasurement.marketingCloudVisitorID ||
(appMeasurement.fid = appMeasurement.xb()),
appMeasurement.Hb(),
appMeasurement.usePlugins &&
appMeasurement.doPlugins &&
appMeasurement.doPlugins(appMeasurement),
appMeasurement.account &&
(appMeasurement.abort ||
(appMeasurement.trackOffline &&
!appMeasurement.timestamp &&
(appMeasurement.timestamp = Math.floor(timestamp.getTime() / 1E3)),
timestamp = _window.location,
appMeasurement.pageURL ||
(appMeasurement.pageURL = timestamp.href ? timestamp.href : timestamp),
appMeasurement.referrer ||
appMeasurement.Wa ||
(timestamp = appMeasurement.Util.getQueryParam("adobe_mc_ref", null, null, !0),
appMeasurement.referrer = timestamp ||
void 0 === timestamp ? void 0 === timestamp ? "" : timestamp : n.document.referrer),
appMeasurement.Wa = 1,
appMeasurement.referrer = appMeasurement.vb(appMeasurement.referrer),
appMeasurement.p("_g")),
appMeasurement.Ab() &&
!appMeasurement.abort &&
(appMeasurement.visitor && !appMeasurement.supplementalDataID && appMeasurement.visitor.getSupplementalDataID &&
(appMeasurement.supplementalDataID = appMeasurement.visitor.getSupplementalDataID("AppMeasurement:" + appMeasurement._in, appMeasurement.expectSupplementalData ? !1 : !0)),
// Query param setup
appMeasurement.Bb(),
g += appMeasurement.zb(),
appMeasurement.Gb(e, g),
appMeasurement.p("_t"),
appMeasurement.referrer = ""))),
c &&
appMeasurement.R(d, 1));
appMeasurement.abort = appMeasurement.supplementalDataID = appMeasurement.timestamp = appMeasurement.pageURLRest = appMeasurement.linkObject = appMeasurement.clickObject = appMeasurement.linkURL = appMeasurement.linkName = appMeasurement.linkType = _window.s_objectID = appMeasurement.pe = appMeasurement.pev1 = appMeasurement.pev2 = appMeasurement.pev3 = appMeasurement.e = appMeasurement.lightProfileID = 0
};
appMeasurement.za = [];
appMeasurement.registerPreTrackCallback = function (c) {
for (var b = [], d = 1; d < arguments.length; d++) b.push(arguments[d]);
"function" == typeof c ? appMeasurement.za.push([c, b]) : appMeasurement.debugTracking && appMeasurement.F("DEBUG: Non function type passed to registerPreTrackCallback")
};
appMeasurement.cb = function (c) {
appMeasurement.wa(appMeasurement.za,
c)
};
appMeasurement.ya = [];
appMeasurement.registerPostTrackCallback = function (c) {
for (var b = [], d = 1; d < arguments.length; d++) b.push(arguments[d]);
"function" == typeof c ? appMeasurement.ya.push([c, b]) : appMeasurement.debugTracking && appMeasurement.F("DEBUG: Non function type passed to registerPostTrackCallback")
};
appMeasurement.bb = function (c) {
appMeasurement.wa(appMeasurement.ya, c)
};
appMeasurement.wa = function (c, b) {
if ("object" == typeof c)
for (var d = 0; d < c.length; d++) {
var f = c[d][0],
e = c[d][1];
e.unshift(b);
if ("function" == typeof f) try {
f.apply(null, e)
} catch (g) {
appMeasurement.debugTracking && appMeasurement.F(g.message)
}
}
};
// Link Tracking for tracking exits and file downloads
// https://marketing.adobe.com/resources/help/en_US/sc/implement/function_tl.html
appMeasurement.tl = appMeasurement.trackLink = function (c, b, d, f, e) {
appMeasurement.linkObject =
c;
appMeasurement.linkType = b;
appMeasurement.linkName = d;
e && (appMeasurement.l = c, appMeasurement.A = e);
return appMeasurement.track(f)
};
appMeasurement.trackLight = function (c, b, d, f) {
appMeasurement.lightProfileID = c;
appMeasurement.lightStoreForSeconds = b;
appMeasurement.lightIncrementBy = d;
return appMeasurement.track(f)
};
appMeasurement.clearVars = function () {
var c, b;
for (c = 0; c < appMeasurement.g.length; c++)
if (b = appMeasurement.g[c], "prop" == b.substring(0, 4) || "eVar" == b.substring(0, 4) || "hier" == b.substring(0, 4) || "list" == b.substring(0, 4) || "channel" == b || "events" == b || "eventList" == b || "products" == b || "productList" == b || "purchaseID" == b || "transactionID" == b || "state" == b || "zip" == b || "campaign" == b) appMeasurement[b] =
void 0
};
appMeasurement.tagContainerMarker = "";
appMeasurement.Gb = function (c, b) {
var d, f = appMeasurement.trackingServer;
d = "";
var e = appMeasurement.dc,
g = "sc.",
h = appMeasurement.visitorNamespace;
f ? appMeasurement.trackingServerSecure && appMeasurement.ssl && (f = appMeasurement.trackingServerSecure) : (h || (h = appMeasurement.account, f = h.indexOf(","), 0 <= f && (h = h.substring(0, f)), h = h.replace(/[^A-Za-z0-9]/g, "")), d || (d = "2o7.net"), e = e ? ("" + e).toLowerCase() : "d1", "2o7.net" == d && ("d1" == e ? e = "112" : "d2" == e && (e = "122"), g = ""), f = h + "." + e + "." + g + d);
d = appMeasurement.ssl ? "https://" : "http://";
e = appMeasurement.AudienceManagement && appMeasurement.AudienceManagement.isReady() || 0 != appMeasurement.usePostbacks;
d +=
f + "/b/ss/" + appMeasurement.account + "/" + (appMeasurement.mobile ? "5." : "") + (e ? "10" : "1") + "/JS-" + appMeasurement.version + (appMeasurement.Kb ? "T" : "") + (appMeasurement.tagContainerMarker ? "-" + appMeasurement.tagContainerMarker : "") + "/" + c + "?AQB=1&ndh=1&pf=1&" + (e ? "callback=s_c_il[" + appMeasurement._in + "].doPostbacks&et=1&" : "") + b + "&AQE=1";
appMeasurement.cb(d);
appMeasurement.tb(d);
appMeasurement.ka()
};
appMeasurement.Ua = /{(%?)(.*?)(%?)}/;
appMeasurement.Ob = RegExp(appMeasurement.Ua.source, "g");
appMeasurement.ub = function (c) {
if ("object" == typeof c.dests)
for (var b = 0; b < c.dests.length; ++b) {
var d = c.dests[b];
if ("string" == typeof d.c && "aa." == d.id.substr(0, 3))
for (var f = d.c.match(appMeasurement.Ob), e = 0; e < f.length; ++e) {
var g =
f[e],
h = g.match(appMeasurement.Ua),
k = "";
"%" == h[1] && "timezone_offset" == h[2] ? k = (new Date).getTimezoneOffset() : "%" == h[1] && "timestampz" == h[2] && (k = appMeasurement.yb());
d.c = d.c.replace(g, appMeasurement.escape(k))
}
}
};
appMeasurement.yb = function () {
var c = new Date,
b = new Date(6E4 * Math.abs(c.getTimezoneOffset()));
return appMeasurement.k(4, c.getFullYear()) + "-" + appMeasurement.k(2, c.getMonth() + 1) + "-" + appMeasurement.k(2, c.getDate()) + "T" + appMeasurement.k(2, c.getHours()) + ":" + appMeasurement.k(2, c.getMinutes()) + ":" + appMeasurement.k(2, c.getSeconds()) + (0 < c.getTimezoneOffset() ? "-" : "+") + appMeasurement.k(2, b.getUTCHours()) + ":" + appMeasurement.k(2, b.getUTCMinutes())
};
appMeasurement.k = function (a,
b) {
return (Array(a + 1).join(0) + b).slice(-a)
};
appMeasurement.ta = {};
appMeasurement.doPostbacks = function (c) {
if ("object" == typeof c)
if (appMeasurement.ub(c), "object" == typeof appMeasurement.AudienceManagement && "function" == typeof appMeasurement.AudienceManagement.isReady && appMeasurement.AudienceManagement.isReady() && "function" == typeof appMeasurement.AudienceManagement.passData) appMeasurement.AudienceManagement.passData(c);
else if ("object" == typeof c && "object" == typeof c.dests)
for (var b = 0; b < c.dests.length; ++b) {
var d = c.dests[b];
"object" == typeof d && "string" == typeof d.c && "string" == typeof d.id && "aa." == d.id.substr(0,
3) && (appMeasurement.ta[d.id] = new Image, appMeasurement.ta[d.id].alt = "", appMeasurement.ta[d.id].src = d.c)
}
};
appMeasurement.tb = function (c) {
appMeasurement.i || appMeasurement.Cb();
appMeasurement.i.push(c);
appMeasurement.ma = appMeasurement.C();
appMeasurement.Sa()
};
appMeasurement.Cb = function () {
appMeasurement.i = appMeasurement.Eb();
appMeasurement.i || (appMeasurement.i = [])
};
appMeasurement.Eb = function () {
var c, b;
if (appMeasurement.ra()) {
try {
(b = _window.localStorage.getItem(appMeasurement.pa())) && (c = _window.JSON.parse(b))
} catch (d) {}
return c
}
};
appMeasurement.ra = function () {
var c = !0;
appMeasurement.trackOffline && appMeasurement.offlineFilename && _window.localStorage && _window.JSON || (c = !1);
return c
};
appMeasurement.Ja = function () {
var c = 0;
appMeasurement.i && (c = appMeasurement.i.length);
appMeasurement.q && c++;
return c
};
appMeasurement.ka = function () {
if (appMeasurement.q && (appMeasurement.B && appMeasurement.B.complete && appMeasurement.B.G && appMeasurement.B.va(),
appMeasurement.q)) return;
appMeasurement.Ka = p;
if (appMeasurement.qa) appMeasurement.ma > appMeasurement.O && appMeasurement.Qa(appMeasurement.i), appMeasurement.ua(500);
else {
var c = appMeasurement.ob();
if (0 < c) appMeasurement.ua(c);
else if (c = appMeasurement.Ga()) appMeasurement.q = 1, appMeasurement.Fb(c), appMeasurement.Jb(c)
}
};
appMeasurement.ua = function (c) {
appMeasurement.Ka || (c || (c = 0), appMeasurement.Ka = setTimeout(appMeasurement.ka, c))
};
appMeasurement.ob = function () {
var c;
if (!appMeasurement.trackOffline || 0 >= appMeasurement.offlineThrottleDelay) return 0;
c = appMeasurement.C() - appMeasurement.Pa;
return appMeasurement.offlineThrottleDelay < c ? 0 : appMeasurement.offlineThrottleDelay - c
};
appMeasurement.Ga = function () {
if (0 < appMeasurement.i.length) return appMeasurement.i.shift()
};
appMeasurement.Fb = function (c) {
if (appMeasurement.debugTracking) {
var b = "AppMeasurement Debug: " + c;
c = c.split("&");
var d;
for (d = 0; d < c.length; d++) b +=
"\n\t" + appMeasurement.unescape(c[d]);
appMeasurement.F(b)
}
};
// Get ID
appMeasurement.gb = function () {
return appMeasurement.marketingCloudVisitorID || appMeasurement.analyticsVisitorID
};
appMeasurement.getId = appMeasurement.gb;
appMeasurement.Y = !1;
var t;
try {
t = JSON.parse('{"x":"y"}')
} catch (w) {
t = null
}
t && "y" == t.x ? (appMeasurement.Y = !0, appMeasurement.X = function (a) {
return JSON.parse(a)
}) : _window.$ && _window.$.parseJSON ? (appMeasurement.X = function (a) {
return _window.$.parseJSON(a)
}, appMeasurement.Y = !0) : appMeasurement.X = function () {
return null
};
// Send HTTP Request
appMeasurement.Jb = function (c) {
var _request, d, f;
appMeasurement.getId() && 2047 < c.length &&
("undefined" != typeof XMLHttpRequest &&
(_request = new XMLHttpRequest,
"withCredentials" in _request ? d = 1 : _request = 0), _request ||
"undefined" == typeof XDomainRequest ||
(_request = new XDomainRequest, d = 2), _request &&
(appMeasurement.AudienceManagement &&
appMeasurement.AudienceManagement.isReady() ||
0 != appMeasurement.usePostbacks) &&
(appMeasurement.Y ? _request.Ba = !0 : _request = 0));
!_request && appMeasurement.Ta && (c = c.substring(0, 2047));
!_request && appMeasurement._document.createElement &&
(0 != appMeasurement.usePostbacks ||
appMeasurement.AudienceManagement &&
appMeasurement.AudienceManagement.isReady()) &&
(_request = appMeasurement._document.createElement("SCRIPT")) &&
"async" in _request &&
((f =
(f = appMeasurement._document.getElementsByTagName("HEAD")) &&
f[0] ? f[0] : appMeasurement._document.body) ?
(_request.type = "text/javascript", _request.setAttribute("async", "async"), d = 3) : _request = 0);
_request || (_request = new Image, _request.alt = "", _request.abort || "undefined" === typeof _window.InstallTrigger ||
(_request.abort = function () {
_request.src = p
}));
_request.Da = function () {
try {
_request.G && (clearTimeout(_request.G), _request.G = 0)
} catch (a) {}
};
_request.onload = _request.va = function () {
appMeasurement.bb(c);
_request.Da();
appMeasurement.sb();
appMeasurement.ga();
appMeasurement.q = 0;
appMeasurement.ka();
if (_request.Ba) {
_request.Ba = !1;
try {
appMeasurement.doPostbacks(appMeasurement.X(_request.responseText))
} catch (d) {}
}
};
_request.onabort = _request.onerror = _request.Ha = function () {
_request.Da();
(appMeasurement.trackOffline || appMeasurement.qa) && appMeasurement.q && appMeasurement.i.unshift(appMeasurement.rb);
appMeasurement.q = 0;
appMeasurement.ma > appMeasurement.O && appMeasurement.Qa(appMeasurement.i);
appMeasurement.ga();
appMeasurement.ua(500)
};
_request.onreadystatechange = function () {
4 == _request.readyState && (200 == _request.status ? _request.va() : _request.Ha())
};
appMeasurement.Pa = appMeasurement.C();
if (1 == d || 2 == d) {
var e = c.indexOf("?");
f = c.substring(0,
e);
e = c.substring(e + 1);
e = e.replace(/&callback=[a-zA-Z0-9_.\[\]]+/, "");
1 == d ? (_request.open("POST", f, !0), _request.send(e)) : 2 == d && (_request.open("POST", f), _request.send(e))
} else if (_request.src = c, 3 == d) {
if (appMeasurement.Na) try {
f.removeChild(appMeasurement.Na)
} catch (g) {}
f.firstChild ? f.insertBefore(_request, f.firstChild) : f.appendChild(_request);
appMeasurement.Na = appMeasurement.B
}
_request.G = setTimeout(function () {
_request.G && (_request.complete ? _request.va() : (appMeasurement.trackOffline && _request.abort && _request.abort(), _request.Ha()))
}, 5E3);
appMeasurement.rb = c;
appMeasurement.B = _window["s_i_" + appMeasurement.replace(appMeasurement.account, ",", "_")] = _request;
if (appMeasurement.useForcedLinkTracking && appMeasurement.K || appMeasurement.A) appMeasurement.forcedLinkTrackingTimeout || (appMeasurement.forcedLinkTrackingTimeout =
250), appMeasurement.ha = setTimeout(appMeasurement.ga, appMeasurement.forcedLinkTrackingTimeout)
};
appMeasurement.sb = function () {
if (appMeasurement.ra() && !(appMeasurement.Oa > appMeasurement.O)) try {
_window.localStorage.removeItem(appMeasurement.pa()), appMeasurement.Oa = appMeasurement.C()
} catch (c) {}
};
appMeasurement.Qa = function (c) {
if (appMeasurement.ra()) {
appMeasurement.Sa();
try {
_window.localStorage.setItem(appMeasurement.pa(), _window.JSON.stringify(c)), appMeasurement.O = appMeasurement.C()
} catch (b) {}
}
};
appMeasurement.Sa = function () {
if (appMeasurement.trackOffline) {
if (!appMeasurement.offlineLimit || 0 >= appMeasurement.offlineLimit) appMeasurement.offlineLimit = 10;
for (; appMeasurement.i.length > appMeasurement.offlineLimit;) appMeasurement.Ga()
}
};
appMeasurement.forceOffline = function () {
appMeasurement.qa = !0
};
appMeasurement.forceOnline = function () {
appMeasurement.qa = !1
};
appMeasurement.pa = function () {
return appMeasurement.offlineFilename +
"-" + appMeasurement.visitorNamespace + appMeasurement.account
};
appMeasurement.C = function () {
return (new Date).getTime()
};
appMeasurement.La = function (a) {
a = a.toLowerCase();
return 0 != a.indexOf("#") && 0 != a.indexOf("about:") && 0 != a.indexOf("opera:") && 0 != a.indexOf("javascript:") ? !0 : !1
};
appMeasurement.setTagContainer = function (c) {
var b, d, f;
appMeasurement.Kb = c;
for (b = 0; b < appMeasurement._il.length; b++)
if ((d = appMeasurement._il[b]) && "s_l" == d._c && d.tagContainerName == c) {
appMeasurement.R(d);
if (d.lmq)
for (b = 0; b < d.lmq.length; b++) f = d.lmq[b], appMeasurement.loadModule(f.n);
if (d.ml)
for (f in d.ml)
if (appMeasurement[f])
for (b in c = appMeasurement[f], f = d.ml[f], f) !Object.prototype[b] && ("function" !=
typeof f[b] || 0 > ("" + f[b]).indexOf("s_c_il")) && (c[b] = f[b]);
if (d.mmq)
for (b = 0; b < d.mmq.length; b++) f = d.mmq[b], appMeasurement[f.m] && (c = appMeasurement[f.m], c[f.f] && "function" == typeof c[f.f] && (f.a ? c[f.f].apply(c, f.a) : c[f.f].apply(c)));
if (d.tq)
for (b = 0; b < d.tq.length; b++) appMeasurement.track(d.tq[b]);
d.s = appMeasurement;
break
}
};
appMeasurement.Util = {
urlEncode: appMeasurement.escape,
urlDecode: appMeasurement.unescape,
cookieRead: appMeasurement.cookieRead,
cookieWrite: appMeasurement.cookieWrite,
getQueryParam: function (c, b, d, f) {
var e, g = "";
b || (b = appMeasurement.pageURL ? appMeasurement.pageURL : _window.location);
d = d ? d : "&";
if (!c || !b) return g;
b = "" + b;
e = b.indexOf("?");
if (0 >
e) return g;
b = d + b.substring(e + 1) + d;
if (!f || !(0 <= b.indexOf(d + c + d) || 0 <= b.indexOf(d + c + "=" + d))) {
e = b.indexOf("#");
0 <= e && (b = b.substr(0, e) + d);
e = b.indexOf(d + c + "=");
if (0 > e) return g;
b = b.substring(e + d.length + c.length + 1);
e = b.indexOf(d);
0 <= e && (b = b.substring(0, e));
0 < b.length && (g = appMeasurement.unescape(b));
return g
}
}
};
appMeasurement.H = "supplementalDataID timestamp dynamicVariablePrefix visitorID marketingCloudVisitorID analyticsVisitorID audienceManagerLocationHint authState fid vmk visitorMigrationKey visitorMigrationServer visitorMigrationServerSecure charSet visitorNamespace cookieDomainPeriods fpCookieDomainPeriods cookieLifetime pageName pageURL customerPerspective referrer contextData currencyCode lightProfileID lightStoreForSeconds lightIncrementBy retrieveLightProfiles deleteLightProfiles retrieveLightData".split(" ");
appMeasurement.g = appMeasurement.H.concat("purchaseID variableProvider channel server pageType transactionID campaign state zip events events2 products audienceManagerBlob tnt".split(" "));
appMeasurement.na = "timestamp charSet visitorNamespace cookieDomainPeriods cookieLifetime contextData lightProfileID lightStoreForSeconds lightIncrementBy".split(" ");
appMeasurement.P = appMeasurement.na.slice(0);
appMeasurement.Aa = "account allAccounts debugTracking visitor visitorOptedOut trackOffline offlineLimit offlineThrottleDelay offlineFilename usePlugins doPlugins configURL visitorSampling visitorSamplingGroup linkObject clickObject linkURL linkName linkType trackDownloadLinks trackExternalLinks trackClickMap trackInlineStats linkLeaveQueryString linkTrackVars linkTrackEvents linkDownloadFileTypes linkExternalFilters linkInternalFilters useForcedLinkTracking forcedLinkTrackingTimeout trackingServer trackingServerSecure ssl abort mobile dc lightTrackVars maxDelay expectSupplementalData usePostbacks registerPreTrackCallback registerPostTrackCallback AudienceManagement".split(" ");
for (m = 0; 250 >= m; m++) 76 > m && (appMeasurement.g.push("prop" + m), appMeasurement.P.push("prop" + m)), appMeasurement.g.push("eVar" + m), appMeasurement.P.push("eVar" + m), 6 > m && appMeasurement.g.push("hier" + m), 4 > m && appMeasurement.g.push("list" + m);
m = "pe pev1 pev2 pev3 latitude longitude resolution colorDepth javascriptVersion javaEnabled cookiesEnabled browserWidth browserHeight connectionType homepage pageURLRest marketingCloudOrgID".split(" ");
appMeasurement.g = appMeasurement.g.concat(m);
appMeasurement.H = appMeasurement.H.concat(m);
appMeasurement.ssl = 0 <= _window.location.protocol.toLowerCase().indexOf("https");
appMeasurement.charSet = "UTF-8";
appMeasurement.contextData = {};
appMeasurement.offlineThrottleDelay =
0;
appMeasurement.offlineFilename = "AppMeasurement.offline";
appMeasurement.Pa = 0;
appMeasurement.ma = 0;
appMeasurement.O = 0;
appMeasurement.Oa = 0;
appMeasurement.linkDownloadFileTypes = "exe,zip,wav,mp3,mov,mpg,avi,wmv,pdf,doc,docx,xls,xlsx,ppt,pptx";
appMeasurement.w = _window;
appMeasurement.d = _window.document;
appMeasurement._document = appMeasurement.d;
try {
if (appMeasurement.Ta = !1, navigator) {
var v = navigator.userAgent;
if ("Microsoft Internet Explorer" == navigator.appName || 0 <= v.indexOf("MSIE ") || 0 <= v.indexOf("Trident/") && 0 <= v.indexOf("Windows NT 6")) appMeasurement.Ta = !0
}
} catch (x) {}
appMeasurement.ga = function () {
appMeasurement.ha && (_window.clearTimeout(appMeasurement.ha), appMeasurement.ha = p);
appMeasurement.l && appMeasurement.K && appMeasurement.l.dispatchEvent(appMeasurement.K);
appMeasurement.A && ("function" == typeof appMeasurement.A ? appMeasurement.A() :
appMeasurement.l && appMeasurement.l.href && (appMeasurement._document.location = appMeasurement.l.href));
appMeasurement.l = appMeasurement.K = appMeasurement.A = 0
};
appMeasurement.Ra = function () {
appMeasurement.b = appMeasurement._document.body;
appMeasurement._body = appMeasurement.b;
appMeasurement._body ? (appMeasurement.v = function (c) {
var b, d, f, e, g;
if (!(appMeasurement.d && appMeasurement._document.getElementById("cppXYctnr") || c && c["s_fe_" + appMeasurement._in])) {
if (appMeasurement.Ca)
if (appMeasurement.useForcedLinkTracking) appMeasurement._body.removeEventListener("click", appMeasurement.v, !1);
else {
appMeasurement._body.removeEventListener("click", appMeasurement.v, !0);
appMeasurement.Ca = appMeasurement.useForcedLinkTracking = 0;
return
}
else appMeasurement.useForcedLinkTracking = 0;
appMeasurement.clickObject = c.srcElement ? c.srcElement : c.target;
try {
if (!appMeasurement.clickObject || appMeasurement.N && appMeasurement.N == appMeasurement.clickObject || !(appMeasurement.clickObject.tagName || appMeasurement.clickObject.parentElement ||
appMeasurement.clickObject.parentNode)) appMeasurement.clickObject = 0;
else {
var h = appMeasurement.N = appMeasurement.clickObject;
appMeasurement.la && (clearTimeout(appMeasurement.la), appMeasurement.la = 0);
appMeasurement.la = setTimeout(function () {
appMeasurement.N == h && (appMeasurement.N = 0)
}, 1E4);
f = appMeasurement.Ja();
appMeasurement.track();
if (f < appMeasurement.Ja() && appMeasurement.useForcedLinkTracking && c.target) {
for (e = c.target; e && e != appMeasurement._body && "A" != e.tagName.toUpperCase() && "AREA" != e.tagName.toUpperCase();) e = e.parentNode;
if (e && (g = e.href, appMeasurement.La(g) || (g = 0), d = e.target, c.target.dispatchEvent && g && (!d || "_self" == d || "_top" == d || "_parent" == d || _window.name && d == _window.name))) {
try {
b = appMeasurement._document.createEvent("MouseEvents")
} catch (l) {
b =
new _window.MouseEvent
}
if (b) {
try {
b.initMouseEvent("click", c.bubbles, c.cancelable, c.view, c.detail, c.screenX, c.screenY, c.clientX, c.clientY, c.ctrlKey, c.altKey, c.shiftKey, c.metaKey, c.button, c.relatedTarget)
} catch (m) {
b = 0
}
b && (b["s_fe_" + appMeasurement._in] = b.s_fe = 1, c.stopPropagation(), c.stopImmediatePropagation && c.stopImmediatePropagation(), c.preventDefault(), appMeasurement.l = c.target, appMeasurement.K = b)
}
}
}
}
} catch (n) {
appMeasurement.clickObject = 0
}
}
}, appMeasurement._body && appMeasurement._body.attachEvent ? appMeasurement._body.attachEvent("onclick", appMeasurement.v) : appMeasurement._body && appMeasurement._body.addEventListener && (navigator && (0 <= navigator.userAgent.indexOf("WebKit") &&
appMeasurement._document.createEvent || 0 <= navigator.userAgent.indexOf("Firefox/2") && _window.MouseEvent) && (appMeasurement.Ca = 1, appMeasurement.useForcedLinkTracking = 1, appMeasurement._body.addEventListener("click", appMeasurement.v, !0)), appMeasurement._body.addEventListener("click", appMeasurement.v, !1))) : setTimeout(appMeasurement.Ra, 30)
};
appMeasurement.Ra();
r ? appMeasurement.setAccount(r) : appMeasurement.F("Error, missing Report Suite ID in AppMeasurement initialization");
appMeasurement.loadModule("ActivityMap")
}
// GetInstance(RSID)
function s_gi(rsid) {
var a, k = window.s_c_il,
p, n, m = rsid.split(","),
s, u, t = 0;
if (k)
for (p = 0; !t && p < k.length;) {
a = k[p];
if ("s_c" == a._c && (a.account || a.oun))
if (a.account && a.account == rsid) t = 1;
else
for (n = a.account ? a.account : a.oun, n = a.allAccounts ? a.allAccounts : n.split(","), s = 0; s < m.length; s++)
for (u = 0; u < n.length; u++) m[s] == n[u] && (t = 1);
p++
}
t || (a = new AppMeasurement(rsid));
return a
}
AppMeasurement.getInstance = s_gi;
window.s_objectID || (window.s_objectID = 0);
function s_pgicq() {
var r = window,
a = r.s_giq,
k, p, n;
if (a)
for (k = 0; k < a.length; k++) p = a[k], n = s_gi(p.oun), n.setAccount(p.un), n.setTagContainer(p.tagContainerName);
r.s_giq = 0
}
s_pgicq();
try {
exports.AppMeasurement = AppMeasurement;
} catch (Error) {
console.log("not node env");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment