Skip to content

Instantly share code, notes, and snippets.

@englehardt englehardt/utag.js Secret
Created Apr 11, 2018

Embed
What would you like to do?
No boundaries: Tealium script (http://tags.tiqcdn.com/utag/ipc/nme/prod/utag.js)
//tealium universal tag - utag.loader ut4.0.201706021245, Copyright 2017 Tealium.com Inc. All Rights Reserved.
if (typeof utag_err == 'undefined') var utag_err = [];
window._tealium_old_error = window._tealium_old_error || window.onerror || function() {};
window.onerror = function(m, u, l) {
if (typeof u !== 'undefined' && u.indexOf('/utag.') > 0 && utag_err.length < 5) utag_err.push({
e: m,
s: u,
l: l,
t: 'js'
});
window._tealium_old_error(m, u, l)
};
var utag_condload = false;
try {
(function() {
function ul(src, a, b) {
a = document;
b = a.createElement('script');
b.language = 'javascript';
b.type = 'text/javascript';
b.src = src;
a.getElementsByTagName('head')[0].appendChild(b)
};
if (("" + document.cookie).match("utag_env_ipc_nme=(\/\/tags\.tiqcdn\.com\/utag\/ipc\/[^\S;]*)")) {
if (RegExp.$1.indexOf("/prod/") === -1) {
ul(RegExp.$1);
utag_condload = true;
__tealium_default_path = '//tags.tiqcdn.com/utag/ipc/nme/prod/';
}
}
})();
} catch (e) {};
try {
ipcTags = ipcTags || {};
ipcTags.tealium = ipcTags.tealium || {};
ipcTags.tealium.analytics = ipcTags.tealium.analytics || {};
ipcTags.tealium.analytics.track_local = true;
ipcTags.tealium.analytics.track_mobile = true;
ipcTags.tealium.analytics.track_global = true;
ipcTags.tealium.analytics.track_global2 = true;
(function() {
var tracker;
if ('undefined' != typeof _gat && 'undefined' != typeof _gat._getTrackerByName) {
tracker = _gat._getTrackerByName('globalPageTracker0');
} else if ('undefined' != typeof _gaq && 'undefined' != typeof _gaq._getAsyncTracker) {
tracker = _gaq._getAsyncTracker('globalPageTracker0');
}
if (tracker && tracker._getAccount().match(/^[\w]{2}-[\d]+-[\d]+$/)) {
_gaq.push(['globalPageTracker0._trackEvent', 'Tealium', '_gaq already defined', undefined, undefined, true]);
}
})();
} catch (e) {};
if (!utag_condload) {
try {
var hostname = window.location.hostname;
if (hostname.match(/ybw\.com/) !== null && ipc.adloader && ipc.adloader.getDisplayMode() == 'mobile') {
ipcTags.tealium.analytics.track_local = false;
ipcTags.tealium.analytics.track_mobile = false;
ipcTags.tealium.analytics.track_global = false;
ipcTags.tealium.analytics.track_global2 = false;
}
var isForum = ((document.location.pathname.match(/^\/forums\//) || document.location.pathname.match(/^\/forum\//) || document.location.hostname.match(/^forums./) || document.location.hostname.match(/^forum./)) !== null);
if (isForum && (hostname.match(/horseandhound.co.uk/) || hostname.match(/womanandhome.com/) || hostname.match(/ybw.com/) || hostname.match(/amateurphotographer.co.uk/) || hostname.match(/mbr.co.uk/) || hostname.match(/shootinguk.co.uk/) || hostname.match(/volksworld.com/) || hostname.match(/whatdigitalcamera.com/))) {
ipcTags.tealium.analytics.track_local = false;
ipcTags.tealium.analytics.track_mobile = false;
ipcTags.tealium.analytics.track_global = false;
ipcTags.tealium.analytics.track_global2 = false;
}
} catch (e) {}
};
if (!utag_condload) {
try {
timeinc = "undefined" == typeof timeinc ? {} : timeinc;
if (!timeinc.analytics) {
if (typeof(timeinc.service) === 'undefined') {
timeinc.service = {};
}
timeinc.analytics = function() {
'use strict';
var services = [];
return {
getServices: function() {
return services;
},
isDebug: function() {
return false;
},
log: function(message, severity) {
if ("undefined" != typeof utag) {
utag.DB('[' + severity + ']' + message);
}
},
recordPageView: function(exclude_tealium, path) {
this.log('timeinc.analytics.recordPageView', 'debug');
exclude_tealium = (exclude_tealium === true);
if (typeof(ipcTags) === 'undefined') {
this.log('ipcTags not found - cannot process recordPageView', 'error');
} else {
this.log(ipcTags, 'debug');
for (var service = 0; service < services.length; service++) {
if (typeof(timeinc.service[services[service]]) !== 'undefined') {
if (!exclude_tealium || (exclude_tealium && services[service].indexOf('tealium') === -1)) {
timeinc.service[services[service]].recordPageView(path);
}
}
}
}
},
recordVirtualPageView: function(path) {
this.recordPageView(false, path);
},
register: function(serviceDetails) {
this.log('timeinc.analytics.register', 'debug');
this.log(serviceDetails, 'debug');
if (typeof(serviceDetails.service) !== undefined) {
if (services.indexOf(serviceDetails.service) === -1) {
services.push(serviceDetails.service);
}
if (typeof(timeinc.service[serviceDetails.service]) === 'undefined') {
this.log('Unknown analytics service: ' + serviceDetails.service, 'error');
} else {
timeinc.service[serviceDetails.service].register(serviceDetails);
}
}
this.log(services, 'debug');
},
trackEvent: function(eventData) {
this.log('timeinc.analytics.recordEvent', 'debug');
this.log(eventData, 'debug');
if (typeof(eventData.category) === 'undefined' || typeof(eventData.action) === 'undefined') {
this.log('trackEvent: required category and action not present', 'warn');
} else {
for (var service = 0; service < services.length; service++) {
if (typeof(timeinc.service[services[service]]) !== 'undefined') {
timeinc.service[services[service]].trackEvent(eventData);
}
}
}
},
trackSocial: function(eventData) {
this.log('timeinc.analytics.trackSocial', 'debug');
this.log(eventData, 'debug');
for (var service = 0; service < services.length; service++) {
if (typeof(timeinc.service[services[service]]) !== 'undefined') {
timeinc.service[services[service]].trackSocial(eventData);
}
}
}
};
}();
}
} catch (e) {}
};
if (!utag_condload) {
try {
timeinc = 'undefined' == typeof timeinc ? {} : timeinc;
timeinc.service = 'undefined' == typeof timeinc.service ? {} : timeinc.service;
if (!timeinc.service.universalAnalytics) {
timeinc.service.universalAnalytics = function() {
'use strict';
return {
recordPageView: function(path) {
ipcTags['ua_location'] = path || window.location.href;
ipcTags['ua_nonInteraction'] = false;
delete ipcTags['ua_eventAction'];
delete ipcTags['ua_eventCategory'];
delete ipcTags['ua_eventLabel'];
delete ipcTags['ua_eventValue'];
utag.view(ipcTags);
},
register: function(serviceDetails) {
timeinc.analytics.log('timeinc.service.googleAnalytics.register');
},
trackEvent: function(sourceData) {
timeinc.analytics.log('timeinc.service.googleAnalytics.trackEvent');
var opt_label, opt_value, opt_nonInteraction = true;
if (typeof(sourceData.label) !== 'undefined') {
opt_label = sourceData.label;
}
if (typeof(sourceData.value) !== 'undefined') {
opt_value = sourceData.value;
}
if (typeof(sourceData.interaction) !== 'undefined' && (sourceData.interaction === 'Y' || sourceData.interaction === true)) {
opt_nonInteraction = false;
}
utag.link({
ua_eventCategory: sourceData.category,
ua_eventAction: sourceData.action,
ua_eventLabel: opt_label,
ua_eventValue: opt_value,
ua_nonInteraction: opt_nonInteraction
});
},
trackSocial: function(sourceData) {
timeinc.analytics.log('timeinc.service.googleAnalytics.trackSocial');
utag.link({
ua_socialNetwork: sourceData.network,
ua_socialAction: sourceData.action,
ua_socialTarget: sourceData.url
});
}
};
}();
}
} catch (e) {}
};
if (!utag_condload) {
try {
ipcTags = ipcTags || {};
ipcTags.tealium = ipcTags.tealium || {};
ipcTags.tealium.analytics = ipcTags.tealium.analytics || {};
ipcTags.tealium.analytics.ua_track_local = true;
ipcTags.tealium.analytics.ua_track_global = true;
ipcTags.author = ipcTags.author || ipcTags.item_author || null;
var hostname = window.location.hostname;
if (hostname.match(/ybw\.com/) !== null && ipc.adloader && ipc.adloader.getDisplayMode() == 'mobile') {
ipcTags.tealium.analytics.ua_track_local = false;
ipcTags.tealium.analytics.ua_track_global = false;
}
var isForum = ((document.location.pathname.match(/^\/forums\//) || document.location.pathname.match(/^\/forum\//) || document.location.hostname.match(/^forums./) || document.location.hostname.match(/^forum./)) !== null);
if (isForum && (hostname.match(/horseandhound.co.uk/) || hostname.match(/womanandhome.com/) || hostname.match(/ybw.com/) || hostname.match(/amateurphotographer.co.uk/) || hostname.match(/mbr.co.uk/) || hostname.match(/shootinguk.co.uk/) || hostname.match(/volksworld.com/) || hostname.match(/whatdigitalcamera.com/))) {
ipcTags.tealium.analytics.ua_track_local = false;
ipcTags.tealium.analytics.ua_track_global = false;
}
if (hostname.match(/marieclaire\.co\.uk/) || hostname.match(/nme\.com/) || hostname.match(/housetohome\.co\.uk/)) {
ipcTags.tealium.analytics.ua_track_global = false;
}
} catch (e) {}
};
if (typeof utag == "undefined" && !utag_condload) {
var utag = {
id: "ipc.nme",
o: {},
sender: {},
send: {},
rpt: {
ts: {
a: new Date()
}
},
dbi: [],
loader: {
q: [],
lc: 0,
f: {},
p: 0,
ol: 0,
wq: [],
lq: [],
bq: {},
bk: {},
rf: 0,
ri: 0,
rp: 0,
rq: [],
lh: function(a, b, c) {
a = "" + location.hostname;
b = a.split(".");
c = (/\.co\.|\.com\.|\.org\.|\.edu\.|\.net\.|\.asn\./.test(a)) ? 3 : 2;
return b.splice(b.length - c, c).join(".");
},
WQ: function(a, b, c, d, g) {
utag.DB('WQ:' + utag.loader.wq.length);
try {
if (utag.udoname && utag.udoname.indexOf(".") < 0) {
utag.ut.merge(utag.data, window[utag.udoname], 0);
}
utag.handler.RE('view', utag.data, "bwq");
if (utag.cfg.load_rules_at_wait) {
utag.handler.LR();
}
} catch (e) {
utag.DB(e)
};
d = 0;
g = [];
for (a = 0; a < utag.loader.wq.length; a++) {
b = utag.loader.wq[a];
b.load = utag.loader.cfg[b.id].load;
if (b.load == 4) {
this.f[b.id] = 0;
utag.loader.LOAD(b.id)
} else if (b.load > 0) {
g.push(b);
d++;
} else {
this.f[b.id] = 1;
}
}
for (a = 0; a < g.length; a++) {
utag.loader.AS(g[a]);
}
if (d == 0) {
utag.loader.END();
}
},
AS: function(a, b, c, d) {
utag.send[a.id] = a;
if (typeof a.src == 'undefined') {
a.src = utag.cfg.path + ((typeof a.name != 'undefined') ? a.name : 'utag.' + a.id + '.js')
}
a.src += (a.src.indexOf('?') > 0 ? '&' : '?') + 'utv=' + (a.v ? a.v : utag.cfg.v);
utag.rpt['l_' + a.id] = a.src;
b = document;
this.f[a.id] = 0;
if (a.load == 2) {
b.write('<script id="utag_' + a.id + '" src="' + a.src + '"></scr' + 'ipt>')
if (typeof a.cb != 'undefined') a.cb();
} else if (a.load == 1 || a.load == 3) {
if (b.createElement) {
c = 'utag_ipc.nme_' + a.id;
if (!b.getElementById(c)) {
d = {
src: a.src,
id: c,
uid: a.id,
loc: a.loc
}
if (a.load == 3) {
d.type = "iframe"
};
if (typeof a.cb != 'undefined') d.cb = a.cb;
utag.ut.loader(d);
}
}
}
},
GV: function(a, b, c) {
b = {};
for (c in a) {
if (a.hasOwnProperty(c) && typeof a[c] != "function") b[c] = a[c];
}
return b
},
OU: function(a, b, c, d, f) {
try {
if (typeof utag.data['cp.OPTOUTMULTI'] != 'undefined') {
c = utag.loader.cfg;
a = utag.ut.decode(utag.data['cp.OPTOUTMULTI']).split('|');
for (d = 0; d < a.length; d++) {
b = a[d].split(':');
if (b[1] * 1 !== 0) {
if (b[0].indexOf('c') == 0) {
for (f in utag.loader.GV(c)) {
if (c[f].tcat == b[0].substring(1)) c[f].load = 0
}
} else if (b[0] * 1 == 0) {
utag.cfg.nocookie = true
} else {
for (f in utag.loader.GV(c)) {
if (c[f].tid == b[0]) c[f].load = 0
}
}
}
}
}
} catch (e) {
utag.DB(e)
}
},
RDdom: function(o) {
o["dom.referrer"] = eval("document." + "referrer");
o["dom.title"] = "" + document.title;
o["dom.domain"] = "" + location.hostname;
o["dom.query_string"] = ("" + location.search).substring(1);
o["dom.hash"] = ("" + location.hash).substring(1);
o["dom.url"] = "" + document.URL;
o["dom.pathname"] = "" + location.pathname;
},
RDcp: function(o, b, c, d) {
b = b || utag.loader.RC();
for (d in b) {
if (d.match(/utag_(.*)/)) {
for (c in utag.loader.GV(b[d])) {
o["cp.utag_" + RegExp.$1 + "_" + c] = b[d][c];
}
}
}
for (c in utag.loader.GV((utag.cl && !utag.cl['_all_']) ? utag.cl : b)) {
if (c.indexOf("utag_") < 0 && typeof b[c] != "undefined") o["cp." + c] = b[c];
}
},
RDqp: function(o, a, b, c) {
a = location.search + (location.hash + '').replace("#", "&");
if (utag.cfg.lowerqp) {
a = a.toLowerCase()
};
if (a.length > 1) {
b = a.substring(1).split('&');
for (a = 0; a < b.length; a++) {
c = b[a].split("=");
if (c.length > 1) {
o["qp." + c[0]] = utag.ut.decode(c[1])
}
}
}
},
RDmeta: function(o, a, b, h) {
a = document.getElementsByTagName("meta");
for (b = 0; b < a.length; b++) {
try {
h = a[b].name || a[b].getAttribute("property") || "";
} catch (e) {
h = "";
utag.DB(e)
};
if (utag.cfg.lowermeta) {
h = h.toLowerCase()
};
if (h != "") {
o["meta." + h] = a[b].content
}
}
},
RDva: function(o, a, b) {
a = "";
try {
a = localStorage.getItem("tealium_va");
if (!a || a == "{}") return;
b = utag.ut.flatten({
va: JSON.parse(a)
});
utag.ut.merge(utag.data, b, 1);
} catch (e) {
utag.DB("localStorage not supported");
}
},
RD: function(o, a, b, c, d) {
utag.DB("utag.loader.RD");
if (typeof o["_t_session_id"] != "undefined") {
return
};
a = (new Date()).getTime();
b = utag.loader.RC();
c = a + parseInt(utag.cfg.session_timeout);
d = a;
if (!b.utag_main) {
b.utag_main = {};
} else if (b.utag_main.ses_id && typeof b.utag_main._st != "undefined" && parseInt(b.utag_main._st) < a) {
delete b.utag_main.ses_id;
}
if (!b.utag_main.v_id) {
b.utag_main.v_id = utag.ut.vi(a);
}
if (!b.utag_main.ses_id) {
b.utag_main.ses_id = d + '';
b.utag_main._ss = b.utag_main._pn = 1;
b.utag_main._sn = 1 + parseInt(b.utag_main._sn || 0);
} else {
d = b.utag_main.ses_id;
b.utag_main._ss = 0;
b.utag_main._pn = 1 + parseInt(b.utag_main._pn);
b.utag_main._sn = parseInt(b.utag_main._sn);
}
if (isNaN(b.utag_main._sn) || b.utag_main._sn < 1) {
b.utag_main._sn = b.utag_main._pn = 1
}
b.utag_main._st = c + '';
utag.loader.SC("utag_main", {
"v_id": b.utag_main.v_id,
"_sn": b.utag_main._sn,
"_ss": b.utag_main._ss,
"_pn": b.utag_main._pn + ";exp-session",
"_st": c,
"ses_id": d + ";exp-session"
});
o["_t_visitor_id"] = b.utag_main.v_id;
o["_t_session_id"] = d;
this.RDqp(o);
this.RDmeta(o);
this.RDcp(o, b);
this.RDdom(o);
this.RDva(o);
},
RC: function(a, x, b, c, d, e, f, g, h, i, j, k, l, m, n, o, v, ck, cv, r, s, t) {
o = {};
b = ("" + document.cookie != "") ? (document.cookie).split("; ") : [];
r = /^(.*?)=(.*)$/;
s = /^(.*);exp-(.*)$/;
t = (new Date()).getTime();
for (c = 0; c < b.length; c++) {
if (b[c].match(r)) {
ck = RegExp.$1;
cv = RegExp.$2;
}
e = utag.ut.decode(cv);
if (typeof ck != "undefined") {
if (ck.indexOf("ulog") == 0 || ck.indexOf("utag_") == 0) {
e = e.split("$");
g = [];
j = {};
for (f = 0; f < e.length; f++) {
try {
g = e[f].split(":");
if (g.length > 2) {
g[1] = g.slice(1).join(":");
}
v = "";
if (("" + g[1]).indexOf("~") == 0) {
h = g[1].substring(1).split("|");
for (i = 0; i < h.length; i++) h[i] = utag.ut.decode(h[i]);
v = h
} else v = utag.ut.decode(g[1]);
j[g[0]] = v;
} catch (er) {
utag.DB(er)
};
}
o[ck] = {};
for (f in utag.loader.GV(j)) {
if (j[f] instanceof Array) {
n = [];
for (m = 0; m < j[f].length; m++) {
if (j[f][m].match(s)) {
k = (RegExp.$2 == "session") ? (typeof j._st != "undefined" ? j._st : t - 1) : parseInt(RegExp.$2);
if (k > t) n[m] = (x == 0) ? j[f][m] : RegExp.$1;
}
}
j[f] = n.join("|");
} else {
j[f] = "" + j[f];
if (j[f].match(s)) {
k = (RegExp.$2 == "session") ? (typeof j._st != "undefined" ? j._st : t - 1) : parseInt(RegExp.$2);
j[f] = (k < t) ? null : (x == 0 ? j[f] : RegExp.$1);
}
}
if (j[f]) o[ck][f] = j[f];
}
} else if (utag.cl[ck] || utag.cl['_all_']) {
o[ck] = e
}
}
}
return (a) ? (o[a] ? o[a] : {}) : o;
},
SC: function(a, b, c, d, e, f, g, h, i, j, k, x, v) {
if (!a) return 0;
if (a == "utag_main" && utag.cfg.nocookie) return 0;
v = "";
var date = new Date();
var exp = new Date();
exp.setTime(date.getTime() + (365 * 24 * 60 * 60 * 1000));
x = exp.toGMTString();
if (c && c == "da") {
x = "Thu, 31 Dec 2009 00:00:00 GMT";
} else if (a.indexOf("utag_") != 0 && a.indexOf("ulog") != 0) {
if (typeof b != "object") {
v = b
}
} else {
d = utag.loader.RC(a, 0);
for (e in utag.loader.GV(b)) {
f = "" + b[e];
if (f.match(/^(.*);exp-(\d+)(\w)$/)) {
g = date.getTime() + parseInt(RegExp.$2) * ((RegExp.$3 == "h") ? 3600000 : 86400000);
if (RegExp.$3 == "u") g = parseInt(RegExp.$2);
f = RegExp.$1 + ";exp-" + g;
}
if (c == "i") {
if (d[e] == null) d[e] = f;
} else if (c == "d") delete d[e];
else if (c == "a") d[e] = (d[e] != null) ? (f - 0) + (d[e] - 0) : f;
else if (c == "ap" || c == "au") {
if (d[e] == null) d[e] = f;
else {
if (d[e].indexOf("|") > 0) {
d[e] = d[e].split("|")
}
g = (d[e] instanceof Array) ? d[e] : [d[e]];
g.push(f);
if (c == "au") {
h = {};
k = {};
for (i = 0; i < g.length; i++) {
if (g[i].match(/^(.*);exp-(.*)$/)) {
j = RegExp.$1;
}
if (typeof k[j] == "undefined") {
k[j] = 1;
h[g[i]] = 1;
}
}
g = [];
for (i in utag.loader.GV(h)) {
g.push(i);
}
}
d[e] = g
}
} else d[e] = f;
}
h = new Array();
for (g in utag.loader.GV(d)) {
if (d[g] instanceof Array) {
for (c = 0; c < d[g].length; c++) {
d[g][c] = encodeURIComponent(d[g][c])
}
h.push(g + ":~" + d[g].join("|"))
} else h.push(g + ":" + encodeURIComponent(d[g]))
};
if (h.length == 0) {
h.push("");
x = ""
}
v = (h.join("$"));
}
document.cookie = a + "=" + v + ";path=/;domain=" + utag.cfg.domain + ";expires=" + x;
return 1
},
LOAD: function(a, b, c, d) {
if (this.ol == 0) {
if (utag.loader.cfg[a].block && utag.loader.cfg[a].cbf) {
this.f[a] = 1;
delete utag.loader.bq[a];
}
for (b in utag.loader.GV(utag.loader.bq)) {
if (utag.loader.cfg[a].load == 4 && utag.loader.cfg[a].wait == 0) {
utag.loader.bk[a] = 1;
utag.DB("blocked: " + a);
}
utag.DB("blocking: " + b);
return;
}
utag.loader.INIT();
return;
}
utag.DB('utag.loader.LOAD:' + a);
if (this.f[a] == 0) {
this.f[a] = 1;
if (utag.cfg.noview != true) {
if (utag.loader.cfg[a].send) {
utag.DB("SENDING: " + a);
try {
utag.sender[a].send('view', utag.handler.C(utag.data));
utag.rpt['s_' + a] = 0;
} catch (e) {
utag.DB(e);
utag.rpt['s_' + a] = 1;
}
}
}
if (utag.loader.rf == 0) return;
for (b in utag.loader.GV(this.f)) {
if (this.f[b] == 0 || this.f[b] == 2) return
}
utag.loader.END();
}
},
EV: function(a, b, c, d) {
if (b == "ready") {
if (document.readyState !== "loading") setTimeout(c, 1);
else {
if (typeof utag.loader.ready_q == "undefined") {
utag.loader.ready_q = [];
utag.loader.run_ready_q = function() {
for (var i = 0; i < utag.loader.ready_q.length; i++) {
utag.DB("READY_Q:" + i);
try {
utag.loader.ready_q[i]()
} catch (e) {
utag.DB(e)
};
}
}
}
utag.loader.ready_q.push(c);
var RH;
if (utag.loader.ready_q.length <= 1) {
if (document.addEventListener) {
RH = function() {
document.removeEventListener("DOMContentLoaded", RH, false);
utag.loader.run_ready_q()
};
document.addEventListener("DOMContentLoaded", RH, false);
window.addEventListener("load", utag.loader.run_ready_q, false);
} else if (document.attachEvent) {
RH = function() {
if (document.readyState !== "loading") {
document.detachEvent("onreadystatechange", RH);
utag.loader.run_ready_q()
}
};
document.attachEvent("onreadystatechange", RH);
window.attachEvent("onload", utag.loader.run_ready_q);
}
}
}
} else {
if (a.addEventListener) {
a.addEventListener(b, c, false)
} else if (a.attachEvent) {
a.attachEvent(((d == 1) ? "" : "on") + b, c)
}
}
},
END: function(b, c, d, e, v, w) {
if (this.ended) {
return
};
this.ended = 1;
utag.DB("loader.END");
b = utag.data;
if (utag.handler.base && utag.handler.base != '*') {
e = utag.handler.base.split(",");
for (d = 0; d < e.length; d++) {
if (typeof b[e[d]] != "undefined") utag.handler.df[e[d]] = b[e[d]]
}
} else if (utag.handler.base == '*') {
utag.ut.merge(utag.handler.df, b, 1);
}
utag.rpt['r_0'] = "t";
for (var r in utag.loader.GV(utag.cond)) {
utag.rpt['r_' + r] = (utag.cond[r]) ? "t" : "f";
}
utag.rpt.ts['s'] = new Date();
(function(a, b, c, l) {
if (typeof utag_err != 'undefined' && utag_err.length > 0) {
a = '//uconnect.tealiumiq.com/ulog/_error?utid=' + utag.cfg.utid;
l = utag_err.length > 5 ? 5 : utag_err.length;
for (b = 0; b < l; b++) {
c = utag_err[b];
a += '&e' + b + '=' + encodeURIComponent(c.t + '::' + c.l + '::' + c.s + '::' + c.e);
}
utag.dbi.push((new Image()).src = a);
}
})();
v = ".tiqcdn.com";
w = utag.cfg.path.indexOf(v);
if (w > 0 && b["cp.utag_main__ss"] == 1) utag.ut.loader({
src: utag.cfg.path.substring(0, w) + v + "/utag/tiqapp/utag.v.js?a=" + utag.cfg.utid + (utag.cfg.nocookie ? "&nocookie=1" : "&cb=" + (new Date).getTime()),
id: "tiqapp"
})
utag.handler.RE('view', b, "end");
utag.handler.INIT();
}
},
DB: function(a, b) {
if (utag.cfg.utagdb === false) {
return;
} else if (typeof utag.cfg.utagdb == "undefined") {
utag.db_log = [];
b = document.cookie + '';
utag.cfg.utagdb = ((b.indexOf('utagdb=true') >= 0) ? true : false);
}
if (utag.cfg.utagdb === true) {
utag.db_log.push(a);
try {
console.log(a)
} catch (e) {}
}
},
RP: function(a, b, c) {
if (typeof a != 'undefined' && typeof a.src != 'undefined' && a.src != '') {
b = [];
for (c in utag.loader.GV(a)) {
if (c != 'src') b.push(c + '=' + escape(a[c]))
}
this.dbi.push((new Image()).src = a.src + '?utv=' + utag.cfg.v + '&utid=' + utag.cfg.utid + '&' + (b.join('&')))
}
},
view: function(a, c, d) {
return this.track({
event: 'view',
data: a,
cfg: {
cb: c,
uids: d
}
})
},
link: function(a, c) {
return this.track({
event: 'link',
data: a,
cfg: {
cb: c
}
})
},
track: function(a, b, c, d) {
if (typeof a == "string") a = {
event: a,
data: b,
cfg: {
cb: c
}
};
for (d in utag.loader.GV(utag.o)) {
try {
utag.o[d].handler.trigger(a.event || "view", a.data || a, a.cfg)
} catch (e) {
utag.DB(e)
};
}
if (a.cfg && a.cfg.cb) try {
a.cfg.cb()
} catch (e) {
utag.DB(e)
};
return true
},
handler: {
base: "",
df: {},
o: {},
send: {},
iflag: 0,
INIT: function(a, b, c) {
utag.DB('utag.handler.INIT');
this.iflag = 1;
a = utag.loader.q.length;
if (a > 0) {
for (b = 0; b < a; b++) {
c = utag.loader.q[b];
utag.handler.RE(c.a, c.b);
utag.handler.trigger(c.a, c.b)
}
}
utag.cfg.noview = false;
},
test: function() {
return 1
},
LR: function() {
for (var d in utag.loader.GV(utag.cond)) {
utag.cond[d] = false;
}
utag.loader.loadrules();
utag.loader.initcfg();
utag.loader.OU();
},
RE: function(a, b, c, d, e, f, g) {
if (c && !this.cfg_extend) {
return 0;
}
utag.DB('All Tags EXTENSIONS');
if (typeof this.extend != "undefined") {
g = 0;
for (d = 0; d < this.extend.length; d++) {
try {
e = 0;
if (typeof this.cfg_extend != "undefined") {
f = this.cfg_extend[d];
if (typeof f.count == "undefined") f.count = 0;
if (f[a] == 0 || (f.once == 1 && f.count > 0) || (typeof c != "undefined" && f[c] == 0)) {
e = 1
} else {
if (typeof c != "undefined" && f[c] == 1) {
g = 1
};
f.count++
}
}
if (e != 1) {
this.extend[d](a, b);
utag.rpt['ex_' + d] = 0
}
} catch (e) {
utag.rpt['ex_' + d] = 1;
utag.ut.error({
e: e.message,
s: utag.cfg.path + 'utag.js',
l: d,
t: 'ge'
});
}
}
return g;
}
},
trigger: function(a, b, c, d, e, f) {
utag.DB('trigger:' + a);
b = b || {};
if (!this.iflag) {
for (d in utag.loader.f) {
if (!(utag.loader.f[d] === 1)) utag.DB('Tag ' + d + ' did not LOAD')
}
utag.loader.q.push({
a: a,
b: b
});
return;
}
utag.ut.merge(b, this.df, 0);
utag.loader.RDqp(b);
utag.loader.RDcp(b);
utag.loader.RDdom(b);
utag.loader.RDmeta(b);
utag.loader.RDva(b);
if (c && c.uids) {
this.RE(a, b);
for (f = 0; f < c.uids.length; f++) {
d = c.uids[f];
try {
if (typeof utag.sender[d] != "undefined") {
utag.sender[d].send(a, utag.handler.C(b));
} else if (a == "view" && utag.loader.cfg[d].load != 2 && utag.loader.cfg[d].s2s != 1) {
utag.ut.merge(utag.data, b, 1);
utag.loader.AS({
id: d,
load: 1
});
}
} catch (e) {
utag.DB(e)
}
}
} else if (utag.cfg.load_rules_ajax) {
this.RE(a, b, "blr");
utag.ut.merge(utag.data, b, 1);
this.LR();
this.RE(a, b);
for (d in utag.loader.cfg) {
try {
if (utag.loader.cfg[d].load && utag.loader.cfg[d].send) {
if (typeof utag.sender[d] != "undefined") {
utag.sender[d].send(a, utag.handler.C(b));
utag.rpt['s_' + d] = 0;
} else if (a == "view" && utag.loader.cfg[d].load != 2 && utag.loader.cfg[d].s2s != 1) {
utag.loader.AS({
id: d,
load: 1
});
}
}
} catch (e) {
utag.DB(e)
}
}
} else {
this.RE(a, b);
for (d in utag.loader.GV(utag.sender)) {
try {
utag.sender[d].send(a, utag.handler.C(b));
utag.rpt['s_' + d] = 0;
} catch (e) {
utag.DB(e)
}
}
}
},
C: function(a, b, c, d) {
b = {};
for (c in utag.loader.GV(a)) {
if (a[c] instanceof Array) {
b[c] = a[c].slice(0)
} else {
b[c] = a[c]
}
}
return b
}
},
ut: {
pad: function(a, b, c, d) {
a = "" + ((a - 0).toString(16));
d = '';
if (b > a.length) {
for (c = 0; c < (b - a.length); c++) {
d += '0'
}
}
return "" + d + a
},
vi: function(t, a, b) {
a = this.pad(t, 12);
b = "" + Math.random();
a += this.pad(b.substring(2, b.length), 16);
try {
a += this.pad((navigator.plugins.length ? navigator.plugins.length : 0), 2);
a += this.pad(navigator.userAgent.length, 3);
a += this.pad(document.URL.length, 4);
a += this.pad(navigator.appVersion.length, 3);
a += this.pad(screen.width + screen.height + parseInt((screen.colorDepth) ? screen.colorDepth : screen.pixelDepth), 5)
} catch (e) {
utag.DB(e);
a += "12345"
};
return a
},
isEmptyObject: function(o, a) {
for (a in o) {
return false;
}
return true;
},
flatten: function(o) {
var a = {};
function r(c, p) {
if (Object(c) !== c || c instanceof Array) {
a[p] = c;
} else {
if (utag.ut.isEmptyObject(c)) {} else {
for (var d in c) {
r(c[d], p ? p + "." + d : d);
}
}
}
}
r(o, "");
return a;
},
merge: function(a, b, c, d) {
if (c) {
for (d in utag.loader.GV(b)) {
a[d] = b[d]
}
} else {
for (d in utag.loader.GV(b)) {
if (typeof a[d] == "undefined") a[d] = b[d]
}
}
},
decode: function(a, b) {
b = "";
try {
b = decodeURIComponent(a)
} catch (e) {
utag.DB(e)
};
if (b == "") {
b = unescape(a)
};
return b
},
error: function(a, b, c) {
if (typeof utag_err != "undefined") {
utag_err.push(a)
}
c = "";
for (b in a) {
c += b + ":" + a[b] + " , "
};
utag.DB(c)
},
loader: function(o, a, b, c, l) {
a = document;
if (o.type == "iframe") {
b = a.createElement("iframe");
b.setAttribute("height", "1");
b.setAttribute("width", "1");
b.setAttribute("style", "display:none");
b.setAttribute("src", o.src);
} else if (o.type == "img") {
utag.DB("Attach img: " + o.src);
b = new Image();
b.src = o.src;
return;
} else {
b = a.createElement("script");
b.language = "javascript";
b.type = "text/javascript";
b.async = 1;
b.charset = "utf-8";
b.src = o.src;
}
if (o.id) {
b.id = o.id
};
if (typeof o.cb == "function") {
if (b.addEventListener) {
b.addEventListener("load", function() {
o.cb()
}, false);
} else {
b.onreadystatechange = function() {
if (this.readyState == 'complete' || this.readyState == 'loaded') {
this.onreadystatechange = null;
o.cb()
}
};
}
}
l = o.loc || "head";
c = a.getElementsByTagName(l)[0];
if (c) {
utag.DB("Attach to " + l + ": " + o.src);
if (l == "script") {
c.parentNode.insertBefore(b, c);
} else {
c.appendChild(b)
}
}
}
}
};
utag.o['ipc.nme'] = utag;
utag.cfg = {
v: "ut4.31.201706021245",
load_rules_ajax: true,
load_rules_at_wait: false,
lowerqp: false,
session_timeout: 1800000,
readywait: 0,
noload: 0,
domain: utag.loader.lh(),
path: "//tags.tiqcdn.com/utag/ipc/nme/prod/",
utid: "ipc/nme/201706021245"
};
try {
var _gaq = _gaq || [];
var pageTracker = pageTracker || {
_trackEvent: function(c, d, e, f, g) {
g = {
ga_eventCat: c,
ga_eventAction: d,
ga_eventLabel: e,
ga_eventValue: f
};
utag.link(g, null, [1723]);
},
_trackPageview: function(c) {
_gaq.push(['_trackPageview', c ? c : null]);
}
}
} catch (e) {};
try {
var _gaq = _gaq || [];
var pageTracker = pageTracker || {
_trackEvent: function(c, d, e, f, g) {
g = {
ga_eventCat: c,
ga_eventAction: d,
ga_eventLabel: e,
ga_eventValue: f
};
utag.link(g, null, [1725]);
},
_trackPageview: function(c) {
_gaq.push(['_trackPageview', c ? c : null]);
}
}
} catch (e) {};
try {
var _gaq = _gaq || [];
var pageTracker = pageTracker || {
_trackEvent: function(c, d, e, f, g) {
g = {
ga_eventCat: c,
ga_eventAction: d,
ga_eventLabel: e,
ga_eventValue: f
};
utag.link(g, null, [1722]);
},
_trackPageview: function(c) {
_gaq.push(['_trackPageview', c ? c : null]);
}
}
} catch (e) {};
try {
var _gaq = _gaq || [];
var pageTracker = pageTracker || {
_trackEvent: function(c, d, e, f, g) {
g = {
ga_eventCat: c,
ga_eventAction: d,
ga_eventLabel: e,
ga_eventValue: f
};
utag.link(g, null, [1724]);
},
_trackPageview: function(c) {
_gaq.push(['_trackPageview', c ? c : null]);
}
}
} catch (e) {};
utag.cond = {
121: 0,
221: 0,
223: 0,
224: 0,
225: 0,
228: 0,
230: 0,
231: 0,
233: 0,
234: 0,
235: 0,
236: 0,
237: 0,
238: 0,
244: 0,
245: 0,
266: 0,
287: 0,
288: 0,
293: 0,
294: 0,
295: 0,
32: 0,
331: 0,
332: 0,
39: 0,
71: 0
};
utag.pagevars = function(ud) {
ud = ud || utag.data;
try {
ud['js_page.viant_random_number'] = viant_random_number
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.site'] = ipcTags.site
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.disableOnscroll'] = ipcTags.disableOnscroll
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.subsection'] = ipcTags.subsection
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.platform'] = ipcTags.platform
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.tealium.analytics.track_local'] = ipcTags.tealium.analytics.track_local
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.tealium.analytics.track_mobile'] = ipcTags.tealium.analytics.track_mobile
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.tealium.analytics.track_global'] = ipcTags.tealium.analytics.track_global
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.tealium.analytics.track_global2'] = ipcTags.tealium.analytics.track_global2
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.type'] = ipcTags.type
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.contentId'] = ipcTags.contentId
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.AdvertisingCampaignName'] = ipcTags.AdvertisingCampaignName
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.item_author'] = ipcTags.item_author
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.author'] = ipcTags.author
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.item_brand'] = ipcTags.item_brand
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.cplatform'] = ipcTags.cplatform
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.ecommerce.variants'] = ipcTags.ecommerce.variants
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.ecommerce.coupons'] = ipcTags.ecommerce.coupons
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.ecommerce.positions'] = ipcTags.ecommerce.positions
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.tealium.analytics.ua_track_local'] = ipcTags.tealium.analytics.ua_track_local
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.tealium.analytics.ua_track_global'] = ipcTags.tealium.analytics.ua_track_global
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.ecommerce.impressions.ids'] = ipcTags.ecommerce.impressions.ids
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.ecommerce.impressions.names'] = ipcTags.ecommerce.impressions.names
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.ecommerce.impressions.categories'] = ipcTags.ecommerce.impressions.categories
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.ecommerce.impressions.brands'] = ipcTags.ecommerce.impressions.brands
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.ecommerce.impressions.variants'] = ipcTags.ecommerce.impressions.variants
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.ecommerce.impressions.lists'] = ipcTags.ecommerce.impressions.lists
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.ecommerce.impressions.positions'] = ipcTags.ecommerce.impressions.positions
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.ecommerce.enh_action'] = ipcTags.ecommerce.enh_action
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.ecommerce.enh_checkout_step'] = ipcTags.ecommerce.enh_checkout_step
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.ecommerce.enh_checkout_option'] = ipcTags.ecommerce.enh_checkout_option
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.ecommerce.impressions.prices'] = ipcTags.ecommerce.impressions.prices
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.user_data.user_id'] = ipcTags.user_data.user_id
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.videoDetect.status'] = videoDetect.status
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.subtype'] = ipcTags.subtype
} catch (e) {
utag.DB(e)
};
try {
ud['js_page.ipcTags.section'] = ipcTags.section
} catch (e) {
utag.DB(e)
};
};
utag.loader.initdata = function() {
try {
utag.data = (typeof ipcTags != 'undefined') ? ipcTags : {};
utag.udoname = 'ipcTags';
} catch (e) {
utag.data = {};
utag.DB('idf:' + e);
}
};
utag.loader.loadrules = function(_pd, _pc) {
var d = _pd || utag.data;
var c = _pc || utag.cond;
for (var l in utag.loader.GV(c)) {
switch (l) {
case '121':
try {
c[121] |= (d['js_page.ipcTags.site'].toString().toLowerCase() != 'nme'.toLowerCase()) || (d['js_page.ipcTags.site'].toString().toLowerCase() == 'nme'.toLowerCase() && d['cp.ipc_geo'].toString().toLowerCase() != 'US'.toLowerCase() && d['cp.ipc_geo'].toString().toLowerCase() != 'CA'.toLowerCase())
} catch (e) {
utag.DB(e)
};
break;
case '221':
try {
c[221] |= (d['site'].toString().toLowerCase() == 'goodtoknow'.toLowerCase() && /(recipe|article|gallery)/.test(d['type'])) || (d['site'].toString().toLowerCase() != 'goodtoknow'.toLowerCase())
} catch (e) {
utag.DB(e)
};
break;
case '223':
try {
c[223] |= (d['site'].toString().toLowerCase() != 'housetohome'.toLowerCase()) || (d['site'].toString().toLowerCase() == 'housetohome'.toLowerCase() && /(articles|utility_room|garden|conservatory|home_office|hallway|childrens_room|dining_room|kitchen|bathroom|bedroom|living_room|moodboards)/.test(d['section']) && d['type'].toString().toLowerCase() == 'article'.toLowerCase() && d['platform'].toString().toLowerCase() == 'desktop'.toLowerCase()) || (d['site'].toString().toLowerCase() == 'housetohome'.toLowerCase() && /(all_rooms|utility_room|garden|conservatory|home_office|hallway|childrens_room|dining_room|kitchen|bathroom|bedroom|living_room)/.test(d['section']) && d['type'].toString().toLowerCase() == 'gallery'.toLowerCase() && d['platform'].toString().toLowerCase() == 'desktop'.toLowerCase()) || (d['site'].toString().toLowerCase() == 'housetohome'.toLowerCase() && d['platform'].toString().toLowerCase() == 'mobile'.toLowerCase() && /(article|gallery)/.test(d['type']))
} catch (e) {
utag.DB(e)
};
break;
case '224':
try {
c[224] |= (d['site'].toString().toLowerCase() == 'trustedreviews'.toLowerCase() && /(news|roundups|opinions|listpage|how-tos|searchpage)/.test(d['type']) && d['platform'].toString().toLowerCase() == 'desktop'.toLowerCase() && typeof d['qp.adloader_test_mode'] == 'undefined') || (d['site'].toString().toLowerCase() != 'trustedreviews'.toLowerCase()) || (d['site'].toString().toLowerCase() == 'trustedreviews'.toLowerCase() && /(articles|reviews|roundups)/.test(d['type']) && d['platform'].toString().toLowerCase() == 'mobile'.toLowerCase()) || (d['site'].toString().toLowerCase() == 'trustedreviews'.toLowerCase() && d['type'].toString().toLowerCase() == 'reviews'.toLowerCase() && typeof d['subtype'] == 'undefined' && d['platform'].toString().toLowerCase() == 'desktop'.toLowerCase()) || (d['site'].toString().toLowerCase() == 'trustedreviews'.toLowerCase() && d['dom.domain'].toString().toLowerCase() == 'stage.trustedreviews.com'.toLowerCase() && d['subtype'].toString().toLowerCase() == 'photo'.toLowerCase() && d['type'].toString().toLowerCase() == 'reviews'.toLowerCase() && d['platform'].toString().toLowerCase() == 'desktop'.toLowerCase())
} catch (e) {
utag.DB(e)
};
break;
case '225':
try {
c[225] |= (d['site'].toString().toLowerCase() == 'marieclaire'.toLowerCase() && /(article|gallery|garticle)/.test(d['type'])) || (d['site'].toString().toLowerCase() != 'marieclaire'.toLowerCase())
} catch (e) {
utag.DB(e)
};
break;
case '228':
try {
c[228] |= (d['site'].toString().toLowerCase() != 'womanandhome'.toLowerCase()) || (d['site'].toString().toLowerCase() == 'womanandhome'.toLowerCase() && /(article|recipe|gallery)/.test(d['type']))
} catch (e) {
utag.DB(e)
};
break;
case '230':
try {
c[230] |= (typeof d['cplatform'] != 'undefined' && d['cplatform'].toString().toLowerCase() == 'keystone'.toLowerCase() && d['type'].toString().toLowerCase() != 'subscription'.toLowerCase()) || (typeof d['cplatform'] == 'undefined') || (typeof d['cplatform'] != 'undefined' && d['cplatform'].toString().toLowerCase() != 'keystone'.toLowerCase())
} catch (e) {
utag.DB(e)
};
break;
case '231':
try {
c[231] |= (d['site'].toString().toLowerCase() != 'instyle'.toLowerCase()) || (d['site'].toString().toLowerCase() == 'instyle'.toLowerCase() && /(article|gallery)/.test(d['type'])) || (d['site'].toString().toLowerCase() == 'instyle'.toLowerCase() && d['platform'].toString().toLowerCase() == 'desktop'.toLowerCase() && d['type'].toString().toLowerCase() == 'get_the_look'.toLowerCase())
} catch (e) {
utag.DB(e)
};
break;
case '233':
try {
c[233] |= (d['cp.outbrain_test'] == '1') || (d['site'].toString().toLowerCase() == 'marieclaire'.toLowerCase()) || (d['site'].toString().toLowerCase() == 'nme'.toLowerCase()) || (d['site'].toString().toLowerCase() == 'goodtoknow'.toLowerCase()) || (d['site'].toString().toLowerCase() == 'instyle'.toLowerCase()) || (d['site'].toString().toLowerCase() == 'trustedreviews'.toLowerCase()) || (d['site'].toString().toLowerCase() == 'housetohome'.toLowerCase() && d['platform'].toString().toLowerCase() == 'desktop'.toLowerCase()) || (d['site'].toString().toLowerCase() == 'look'.toLowerCase()) || (d['site'].toString().toLowerCase() == 'womanandhome'.toLowerCase()) || (typeof d['cplatform'] != 'undefined' && d['cplatform'].toString().toLowerCase() == 'keystone'.toLowerCase()) || (d['site'].toString().toLowerCase() == 'nowmagazine'.toLowerCase()) || (d['site'].toString().toLowerCase() == 'housetohome'.toLowerCase() && d['platform'].toString().toLowerCase() == 'mobile'.toLowerCase() && d['type'].toString().toLowerCase() != 'gallery'.toLowerCase())
} catch (e) {
utag.DB(e)
};
break;
case '234':
try {
c[234] |= (d['cp.browsertype'].toString().toLowerCase() == 'mobile'.toLowerCase()) || (d['js_page.ipcTags.platform'].toString().toLowerCase() == 'mobile'.toLowerCase()) || (d['DisplayMode'].toString().toLowerCase() == 'mobile'.toLowerCase())
} catch (e) {
utag.DB(e)
};
break;
case '235':
try {
c[235] |= (typeof d['js_page.ipcTags.tealium.analytics.track_local'] != 'undefined' && d['js_page.ipcTags.tealium.analytics.track_local'].toString().toLowerCase() == 'true'.toLowerCase()) || (typeof d['js_page.ipcTags.tealium.analytics.track_local'] == 'undefined')
} catch (e) {
utag.DB(e)
};
break;
case '236':
try {
c[236] |= (typeof d['js_page.ipcTags.tealium.analytics.track_mobile'] != 'undefined' && d['js_page.ipcTags.tealium.analytics.track_mobile'].toString().toLowerCase() == 'true'.toLowerCase()) || (typeof d['js_page.ipcTags.tealium.analytics.track_mobile'] == 'undefined')
} catch (e) {
utag.DB(e)
};
break;
case '237':
try {
c[237] |= (typeof d['js_page.ipcTags.tealium.analytics.track_global'] != 'undefined' && d['js_page.ipcTags.tealium.analytics.track_global'].toString().toLowerCase() == 'true'.toLowerCase()) || (typeof d['js_page.ipcTags.tealium.analytics.track_global'] == 'undefined')
} catch (e) {
utag.DB(e)
};
break;
case '238':
try {
c[238] |= (typeof d['js_page.ipcTags.tealium.analytics.track_global2'] != 'undefined' && d['js_page.ipcTags.tealium.analytics.track_global2'].toString().toLowerCase() == 'true'.toLowerCase()) || (typeof d['js_page.ipcTags.tealium.analytics.track_global2'] == 'undefined')
} catch (e) {
utag.DB(e)
};
break;
case '244':
try {
c[244] |= (typeof d['js_page.ipcTags.tealium.analytics.ua_track_local'] != 'undefined' && d['js_page.ipcTags.tealium.analytics.ua_track_local'].toString().toLowerCase() == 'true'.toLowerCase() && d['site'].toString().toLowerCase() != 'equoevents'.toLowerCase()) || (typeof d['js_page.ipcTags.tealium.analytics.ua_track_local'] == 'undefined' && d['site'].toString().toLowerCase() != 'equoevents'.toLowerCase())
} catch (e) {
utag.DB(e)
};
break;
case '245':
try {
c[245] |= (typeof d['js_page.ipcTags.tealium.analytics.ua_track_global'] != 'undefined' && d['js_page.ipcTags.tealium.analytics.ua_track_global'].toString().toLowerCase() == 'true'.toLowerCase()) || (typeof d['js_page.ipcTags.tealium.analytics.ua_track_global'] == 'undefined')
} catch (e) {
utag.DB(e)
};
break;
case '266':
try {
c[266] |= (!/^forums\./.test(d['dom.domain'])) || (!/^forum\./.test(d['dom.domain'])) || (!/^\/forums\//.test(d['dom.pathname'])) || (!/^\/forum\//.test(d['dom.pathname']))
} catch (e) {
utag.DB(e)
};
break;
case '287':
try {
c[287] |= (d['platform'].toString().toLowerCase() != 'mobile'.toLowerCase())
} catch (e) {
utag.DB(e)
};
break;
case '288':
try {
c[288] |= (typeof d['exclude_outbrain'] == 'undefined') || (typeof d['exclude_outbrain'] != 'undefined' && d['exclude_outbrain'] == '0')
} catch (e) {
utag.DB(e)
};
break;
case '293':
try {
c[293] |= (d['site'].toString().toLowerCase() != 'horseandhound'.toLowerCase()) || (d['site'].toString().toLowerCase() == 'horseandhound'.toLowerCase() && d['section'].toString().toLowerCase() != 'classifieds'.toLowerCase())
} catch (e) {
utag.DB(e)
};
break;
case '294':
try {
c[294] |= (d['js_page.ipcTags.site'].toString().toLowerCase() == 'equoevents'.toLowerCase() && d['js_page.ipcTags.cplatform'].toString().toLowerCase() != 'keystone'.toLowerCase())
} catch (e) {
utag.DB(e)
};
break;
case '295':
try {
c[295] |= (d['js_page.ipcTags.site'].toString().toLowerCase() != 'equoevents'.toLowerCase()) || (d['js_page.ipcTags.site'].toString().toLowerCase() == 'equoevents'.toLowerCase() && d['js_page.ipcTags.cplatform'].toString().toLowerCase() == 'keystone'.toLowerCase())
} catch (e) {
utag.DB(e)
};
break;
case '32':
try {
c[32] |= (d['platform'].toString().toLowerCase() == 'desktop'.toLowerCase())
} catch (e) {
utag.DB(e)
};
break;
case '331':
try {
c[331] |= (typeof d['js_page.ipcTags.cplatform'] != 'undefined' && d['js_page.ipcTags.cplatform'].toString().toLowerCase() == 'keystone'.toLowerCase() && d['js_page.ipcTags.type'].toString().toLowerCase() != 'subscription'.toLowerCase()) || (typeof d['js_page.ipcTags.cplatform'] == 'undefined')
} catch (e) {
utag.DB(e)
};
break;
case '332':
try {
c[332] |= (typeof d['whitelistMessagingEnabled'] != 'undefined')
} catch (e) {
utag.DB(e)
};
break;
case '39':
try {
c[39] |= (d['platform'].toString().toLowerCase() == 'desktop'.toLowerCase())
} catch (e) {
utag.DB(e)
};
break;
case '71':
try {
c[71] |= (d['platform'].toString().toLowerCase() == 'desktop'.toLowerCase())
} catch (e) {
utag.DB(e)
};
break;
}
}
};
utag.pre = function() {
utag.loader.initdata();
utag.pagevars();
try {
utag.loader.RD(utag.data)
} catch (e) {
utag.DB(e)
};
utag.loader.loadrules();
};
utag.loader.GET = function() {
utag.cl = {
'_all_': 1
};
utag.pre();
utag.handler.extend = [function(a, b, c, d, e, f, g) {
d = b['site'];
if (typeof d == 'undefined') return;
c = [{
'nme': 'www.nme.com'
}];
var m = false;
for (e = 0; e < c.length; e++) {
for (f in c[e]) {
if (d == f) {
b['buzzfeed_u'] = c[e][f];
m = true
};
};
if (m) break
};
if (!m) b['buzzfeed_u'] = '';
}, function(a, b, c, d, e, f, g) {
d = b['js_page.ipcTags.site'];
if (typeof d == 'undefined') return;
c = [{
'wallpaper': '0025/8842'
}, {
'nme': '0025/8842'
}, {
'housetohome': '0025/8842'
}, {
'instyle': '0025/8842'
}, {
'look': '0025/8842'
}, {
'marieclaire': '0025/8842'
}, {
'trustedreviews': '0025/8842'
}, {
'decanter': '0025/8842'
}, {
'goodtoknow': '0025/8842'
}, {
'canon_ad_campaign': '0025/8842'
}, {
'womanandhome': '0025/8842'
}, {
'whatsontv': '0025/8842'
}, {
'theroomedit': '0025/8842'
}, {
'furnitureetc': '0025/8842'
}, {
'mousebreaker': '0025/8842'
}, {
'thisispowder': '0025/8842'
}, {
'cyclingweekly': '0025/8842'
}, {
'horseandhound': '0025/8842'
}, {
'nowmagazine': '0025/8842'
}, {
'ybw': '0025/8842'
}, {
'golfmonthly': '0025/8842'
}, {
'lifedeathprizes': '0025/8842'
}, {
'amateurphotographer': '0025/8842'
}, {
'worldsoccer': '0025/8842'
}, {
'idealhome': '0025/8842'
}, {
'lovefashionsales': '0025/8842'
}];
var m = false;
for (e = 0; e < c.length; e++) {
for (f in c[e]) {
if (d == f) {
b['crazyegg_id'] = c[e][f];
m = true
};
};
if (m) break
};
if (!m) b['crazyegg_id'] = '';
}, function(a, b, c, d) {
try {
if (1) {
c = [b['site'], b['platform'], b['section'], b['type']];
b['outbrain_site_type'] = c.join(':')
}
} catch (e) {
utag.DB(e)
}
}, function(a, b) {
if ("undefined" != typeof b.cplatform && b.cplatform == "keystone") {
b.outbrain_site_type = b.outbrain_site_type.replace(/.*?:/, b.cplatform + ":");
}
}, function(a, b, c, d, e, f, g) {
d = b['outbrain_site_type'];
if (typeof d == 'undefined') return;
c = [{
'housetohome:desktop:.*:article': 'article-body'
}, {
'goodtoknow:desktop:recipes:recipe': 'recipefooter'
}, {
'goodtoknow:desktop:.*:article': 'articleContainer'
}, {
'trustedreviews:desktop:.*': 'tr-outbrain-main-column'
}, {
'instyle:desktop:.*:(article|get_the_look)': 'articleObInt'
}, {
'womanandhome:desktop:.*:(article|recipe)': 'ob-widget'
}, {
'keystone:.*:.*:(attachment|eloqua_competitions|event|issue|magazine-classifieds|article|publication|review|gallery|directory)': 'ob-widget-content'
}];
var m = false;
for (e = 0; e < c.length; e++) {
for (f in c[e]) {
g = new RegExp(f, 'i');
if (g.test(d)) {
b['outbrain_article_target'] = c[e][f];
m = true
};
};
if (m) break
};
if (!m) b['outbrain_article_target'] = '';
}, function(a, b, c, d, e, f, g) {
d = b['outbrain_site_type'];
if (typeof d == 'undefined') return;
c = [{
'instyle:mobile:.*:article': 'ob-widget'
}, {
'trustedreviews:mobile:.*:(articles|reviews|roundups)': 'outbrain'
}, {
'housetohome:mobile:.*:article': 'ob-widget'
}, {
'womanandhome:mobile:.*:(article|recipe)': 'ob-widget'
}, {
'goodtoknow:mobile:.*:(article|recipe)': 'ob-widget'
}];
var m = false;
for (e = 0; e < c.length; e++) {
for (f in c[e]) {
g = new RegExp(f, 'i');
if (g.test(d)) {
b['outbrain_mobile_article_target'] = c[e][f];
m = true
};
};
if (m) break
};
if (!m) b['outbrain_mobile_article_target'] = '';
}, function(a, b, c, d, e, f, g) {
d = b['outbrain_site_type'];
if (typeof d == 'undefined') return;
c = [{
'goodtoknow:desktop:.*:(recipe|article)': 'mpuAdPlacement'
}, {
'housetohome:desktop:.*:article': 'mpu-rr'
}, {
'trustedreviews:desktop:.*': 'tr-outbrain-sidebar'
}, {
'instyle:desktop:.*:(article|get_the_look)': 'mpu-wrapper'
}, {
'womanandhome:desktop:.*:article': 'ob-widget-rightrail'
}, {
'womanandhome:desktop:recipes:recipe': 'ob-widget-rightrail'
}, {
'keystone:.*:.*:(attachment|eloqua_competitions|event|issue|magazine-classifieds|article|publication|review|gallery|directory)': 'ob-widget-sidebar'
}];
var m = false;
for (e = 0; e < c.length; e++) {
for (f in c[e]) {
g = new RegExp(f, 'i');
if (g.test(d)) {
b['outbrain_right_rail_target'] = c[e][f];
m = true
};
};
if (m) break
};
if (!m) b['outbrain_right_rail_target'] = '';
}, function(a, b, c, d, e, f, g) {
d = b['site'];
if (typeof d == 'undefined') return;
c = [{
'marieclaire': 'marieclaireuk'
}, {
'trustedreviews': 'trustedreviews'
}, {
'goodtoknow': 'GoodtoKnow'
}, {
'nme': 'IPC'
}, {
'housetohome': 'Housetohome'
}, {
'instyle': 'instyleuk'
}, {
'look': 'lookuk'
}, {
'womanandhome': 'Woman&Home'
}, {
'nowmagazine': 'IPC'
}, {
'cyclingweekly': 'ipccyclingweekly'
}, {
'thefield': 'IPC'
}, {
'worldsoccer': 'ipcworldsoccer'
}, {
'golfmonthly': 'IPC'
}, {
'shootinguk': 'IPC'
}, {
'rugbyworld': 'ipcrugbyworld'
}, {
'countrylife': 'IPC'
}, {
'volksworld': 'IPC'
}, {
'vwcamperbus': 'IPC'
}, {
'mbr': 'mbr'
}, {
'amateurphotographer': 'IPC'
}, {
'whatdigitalcamera': 'IPC'
}, {
'horseandhound': 'IPC'
}, {
'anglersmail': 'IPC'
}, {
'amateurgardening': 'IPC'
}, {
'vwtmag': 'vwt'
}, {
'mby': 'motorboatandyachting'
}, {
'pbo': 'IPC'
}, {
'yachtingmonthly': 'IPC'
}, {
'yachtingworld': 'IPC'
}, {
'ybw': 'IPC'
}, {
'whatsontv': 'IPC'
}, {
'uncut': 'IPC'
}, {
'superyachtworld': 'IPC'
}, {
'lifedeathprizes': 'IPC'
}, {
'superyachtbusiness': 'IPC'
}, {
'ibi': 'IPC'
}, {
'decanter': 'IPC'
}, {
'womansown': 'IPC'
}, {
'woman': 'IPC'
}, {
'womansweekly': 'IPC'
}, {
'listforlife': 'IPC'
}, {
'livesmart': 'IPC'
}, {
'idealhome': 'IPC'
}];
var m = false;
for (e = 0; e < c.length; e++) {
for (f in c[e]) {
if (d == f) {
b['outbrain_template'] = c[e][f];
m = true
};
};
if (m) break
};
if (!m) b['outbrain_template'] = '';
}, function(a, b, c, d, e, f, g) {
d = b['outbrain_site_type'];
if (typeof d == 'undefined') return;
c = [{
'goodtoknow:desktop:.*:gallery': 'goodtoknow'
}, {
'housetohome:desktop:.*:gallery': 'housetohome'
}, {
'womanandhome:desktop:.*:gallery': 'womanandhome'
}, {
'nowmagazine:desktop:.*:gallery': 'nowmagazine'
}, {
'instyle:desktop:.*:gallery': 'instyle'
}];
var m = false;
for (e = 0; e < c.length; e++) {
for (f in c[e]) {
g = new RegExp(f, 'i');
if (g.test(d)) {
b['outbrain_gallery'] = c[e][f];
m = true
};
};
if (m) break
};
if (!m) b['outbrain_gallery'] = '';
}, function(a, b, c, d, e, f, g) {
d = b['outbrain_site_type'];
if (typeof d == 'undefined') return;
c = [{
'goodtoknow:mobile:.*:gallery': 'goodtoknowmobile'
}, {
'instyle:mobile:.*:gallery': 'instylemobile'
}, {
'womanandhome:mobile:.*:gallery': 'womanandhomemobile'
}, {
'housetohome:mobile:.*:gallery': 'housetohomemobile'
}];
var m = false;
for (e = 0; e < c.length; e++) {
for (f in c[e]) {
g = new RegExp(f, 'i');
if (g.test(d)) {
b['outbrain_mobile_gallery'] = c[e][f];
m = true
};
};
if (m) break
};
if (!m) b['outbrain_mobile_gallery'] = '';
}, function(a, b, c, d, e, f, g) {
d = b['outbrain_site_type'];
if (typeof d == 'undefined') return;
c = [{
'goodtoknow:desktop:.*:gallery': '60%'
}, {
'housetohome:desktop:.*:gallery': '10'
}, {
'marieclaire:desktop:.*:gallery': '60%'
}, {
'look:desktop:.*:gallery': '60%'
}, {
'womanandhome:desktop': '60%'
}, {
'nowmagazine:desktop:.*:gallery': '60%'
}, {
'whatsontv:desktop:.*:gallery': '60%'
}, {
'instyle:desktop:.*:gallery': '60%'
}, {
'goodtoknow:mobile:.*:gallery': '50%'
}, {
'marieclaire:mobile:.*:gallery': '50%'
}, {
'instyle:mobile:.*:gallery': '50%'
}, {
'womanandhome:mobile:.*:gallery': '50%'
}, {
'look:mobile:.*:gallery': '50%'
}, {
'housetohome:mobile:.*:gallery': '50%'
}, {
'whatsontv:mobile:.*:gallery': '50%'
}, {
'nme:mobile:.*:gallery': '50%'
}];
var m = false;
for (e = 0; e < c.length; e++) {
for (f in c[e]) {
g = new RegExp(f, 'i');
if (g.test(d)) {
b['outbrain_average_dropoff'] = c[e][f];
m = true
};
};
if (m) break
};
if (!m) b['outbrain_average_dropoff'] = '';
}, function(a, b) {
try {
if (1) {
try {
b['ga_trackPageImpression'] = b.ga_trackPageImpression || true
} catch (e) {};
try {
b['ga_trackContentTags'] = b.ga_trackContentTags || false
} catch (e) {};
try {
b['ga_ignoredRefs'] = []
} catch (e) {};
try {
b['ga_defaultCvarTracking'] = b.ga_defaultCvarTracking || true
} catch (e) {};
b['ga_trackerid_global'] = 'UA-11428852-1'
}
} catch (e) {
utag.DB(e)
}
}, function(a, b, c, d, e, f, g) {
d = b['SiteName'];
if (typeof d == 'undefined') return;
c = [{
'goodtoknow': 'www.goodtoknowdiets.co.uk,www.goodtoknow.co.uk'
}, {
'countrylife': 'www.countrylife.co.uk,www.onthemarket.com'
}, {
'nme': 'unsigned.nme.com,www.nme.com'
}];
var m = false;
for (e = 0; e < c.length; e++) {
for (f in c[e]) {
if (d.toString().indexOf(f) > -1) {
b['ga_cross_domain_names'] = c[e][f];
m = true
};
};
if (m) break
};
if (!m) b['ga_cross_domain_names'] = '';
}, function(a, b, c, d, e, f, g) {
d = b['site'];
if (typeof d == 'undefined') return;
c = [{
'furnitureetc': 'true'
}, {
'equoevents': 'true'
}, {
'mymagazine': 'true'
}];
var m = false;
for (e = 0; e < c.length; e++) {
for (f in c[e]) {
if (d == f) {
b['enable_enhanced_ecommerce'] = c[e][f];
m = true
};
};
if (m) break
};
if (!m) b['enable_enhanced_ecommerce'] = '';
}, function(a, b, c, d, e, f, g) {
d = b['outbrain_site_type'];
if (typeof d == 'undefined') return;
c = [{
'goodtoknow:desktop:family:article': '1'
}];
var m = false;
for (e = 0; e < c.length; e++) {
for (f in c[e]) {
g = new RegExp(f, 'i');
if (g.test(d)) {
b['outbrain_smart_widget'] = c[e][f];
m = true
};
};
if (m) break
};
if (!m) b['outbrain_smart_widget'] = '0';
}, function(a, b) {
try {
if (1) {
try {
b['hashed_user_id'] = (utag.data.user_data && utag.data.user_data.user_id) ? utag.data.user_data.user_id : undefined;
} catch (e) {}
}
} catch (e) {
utag.DB(e)
}
}, function(a, b) {
try {
if (typeof b['hashed_user_id'] != 'undefined' && b['hashed_user_id'] != '') {
document.cookie = "hashed_user_id=" + b['hashed_user_id'] + ";path=/;domain=" + utag.cfg.domain + ";expires=Thu, 31 Dec 2099 00:00:00 GMT";
b['cp.hashed_user_id'] = b['hashed_user_id'];
}
} catch (e) {
utag.DB(e)
}
}, function(a, b) {
if (utag.data['va.replaces']) {
b.as_profiles_stitched = utag.data['va.replaces'].length;
b.as_stitched_profiles = utag.data['va.replaces'];
}
}, function(a, b) {
try {
if (1) {
b['tealium_audiencestream_profile_name'] = 'main'
}
} catch (e) {
utag.DB(e)
}
}, function(a, b) {
var md_checker = function(inputString) {
return (/[a-fA-F0-9]{32}/).test(inputString);
}
if (b['qp.emd5'] && md_checker(b['qp.emd5']) === true) {
b.hashed_user_id_query_string = b['qp.emd5'];
}
}];
utag.handler.cfg_extend = [{
"alr": 1,
"bwq": 0,
"id": "110",
"blr": 0,
"end": 0
}, {
"alr": 1,
"bwq": 0,
"id": "468",
"blr": 0,
"end": 0
}, {
"alr": 1,
"bwq": 0,
"id": "482",
"blr": 0,
"end": 0
}, {
"alr": 1,
"bwq": 0,
"id": "483",
"blr": 0,
"end": 0
}, {
"alr": 1,
"bwq": 0,
"id": "484",
"blr": 0,
"end": 0
}, {
"alr": 1,
"bwq": 0,
"id": "485",
"blr": 0,
"end": 0
}, {
"alr": 1,
"bwq": 0,
"id": "486",
"blr": 0,
"end": 0
}, {
"alr": 1,
"bwq": 0,
"id": "487",
"blr": 0,
"end": 0
}, {
"alr": 1,
"bwq": 0,
"id": "489",
"blr": 0,
"end": 0
}, {
"alr": 1,
"bwq": 0,
"id": "490",
"blr": 0,
"end": 0
}, {
"alr": 1,
"bwq": 0,
"id": "491",
"blr": 0,
"end": 0
}, {
"alr": 1,
"bwq": 0,
"id": "500",
"blr": 0,
"end": 0
}, {
"alr": 1,
"bwq": 0,
"id": "509",
"blr": 0,
"end": 0
}, {
"alr": 1,
"bwq": 0,
"id": "520",
"blr": 0,
"end": 0
}, {
"alr": 1,
"bwq": 0,
"id": "549",
"blr": 0,
"end": 0
}, {
"alr": 1,
"bwq": 0,
"id": "568",
"blr": 0,
"end": 0
}, {
"alr": 1,
"bwq": 0,
"id": "570",
"blr": 0,
"end": 0
}, {
"alr": 1,
"bwq": 0,
"id": "571",
"blr": 0,
"end": 0
}, {
"alr": 1,
"bwq": 0,
"id": "575",
"blr": 0,
"end": 0
}, {
"alr": 1,
"bwq": 0,
"id": "685",
"blr": 0,
"end": 0
}];
utag.loader.initcfg = function() {
utag.loader.cfg = {
"374": {
load: utag.cond[32],
send: 1,
v: 201511031600,
wait: 1,
tid: 7101
},
"365": {
load: utag.cond[32],
send: 1,
v: 201511031600,
wait: 1,
tid: 17005
},
"234": {
load: 1,
send: 1,
v: 201511031600,
wait: 1,
tid: 1067
},
"563": {
load: utag.cond[71],
send: 1,
v: 201511031600,
wait: 1,
tid: 18011
},
"394": {
load: utag.cond[39],
send: 1,
v: 201511031600,
wait: 1,
tid: 2034
},
"556": {
load: (utag.cond[266] && utag.cond[293]),
send: 1,
v: 201511031600,
wait: 1,
tid: 3073
},
"1038": {
load: 1,
send: 1,
v: 201610181225,
wait: 1,
tid: 5001
},
"1236": {
load: (utag.cond[121] && utag.cond[287]),
send: 1,
v: 201702141429,
wait: 1,
tid: 20010
},
"1633": {
load: 1,
send: 1,
v: 201605241414,
wait: 1,
tid: 3015
},
"1700": {
load: 1,
send: 1,
v: 201703101323,
wait: 1,
tid: 15022
},
"1709": {
load: (utag.cond[221] && utag.cond[223] && utag.cond[231] && utag.cond[230] && utag.cond[225] && utag.cond[233] && utag.cond[288] && utag.cond[224] && utag.cond[228]),
send: 1,
v: 201705160919,
wait: 1,
tid: 20010
},
"1715": {
load: (utag.cond[295] && utag.cond[331]),
send: 1,
v: 201612190812,
wait: 1,
tid: 16022
},
"1723": {
load: utag.cond[235],
send: 1,
v: 201704071535,
wait: 1,
tid: 7001
},
"1725": {
load: (utag.cond[236] && utag.cond[234]),
send: 1,
v: 201704071535,
wait: 1,
tid: 7001
},
"1722": {
load: utag.cond[237],
send: 1,
v: 201704071535,
wait: 1,
tid: 7001
},
"1724": {
load: utag.cond[238],
send: 1,
v: 201704071535,
wait: 1,
tid: 7001
},
"1731": {
load: utag.cond[244],
send: 1,
v: 201703101323,
wait: 1,
tid: 7110
},
"1732": {
load: utag.cond[245],
send: 1,
v: 201605241414,
wait: 1,
tid: 7110
},
"1744": {
load: 1,
send: 1,
v: 201511031600,
wait: 1,
tid: 7115
},
"1755": {
load: 1,
send: 1,
v: 201511031600,
wait: 1,
tid: 3005
},
"1789": {
load: 1,
send: 1,
v: 201604221030,
wait: 1,
tid: 20010
},
"1791": {
load: utag.cond[294],
send: 1,
v: 201612190812,
wait: 1,
tid: 16036
},
"1833": {
load: utag.cond[332],
send: 1,
v: 201609071015,
wait: 1,
tid: 20010
},
"1843": {
load: 1,
send: 1,
v: 201706021245,
wait: 1,
tid: 20010
},
"1848": {
load: 1,
send: 1,
v: 201704071535,
wait: 1,
tid: 6026
},
"1876": {
load: 1,
send: 1,
v: 201702141429,
wait: 1,
tid: 7130
},
"1947": {
load: 1,
send: 1,
v: 201704071535,
wait: 1,
tid: 20010
},
"2019": {
load: 1,
send: 1,
v: 201706021245,
wait: 1,
tid: 20010
},
"2025": {
load: 1,
send: 1,
v: 201704071535,
wait: 1,
tid: 20067
},
"2028": {
load: 1,
send: 1,
v: 201704241126,
wait: 0,
tid: 1191
},
"2030": {
load: 1,
send: 1,
v: 201704241126,
wait: 1,
tid: 20010
}
};
utag.loader.cfgsort = ["374", "365", "234", "563", "394", "556", "1038", "1236", "1633", "1700", "1709", "1715", "1723", "1725", "1722", "1724", "1731", "1732", "1744", "1755", "1789", "1791", "1833", "1843", "1848", "1876", "1947", "2019", "2025", "2028", "2030"];
}
utag.loader.initcfg();
}
if (typeof utag_cfg_ovrd != 'undefined') {
for (var i in utag.loader.GV(utag_cfg_ovrd)) utag.cfg[i] = utag_cfg_ovrd[i]
};
utag.loader.PINIT = function(a, b, c) {
utag.DB("Pre-INIT");
if (utag.cfg.noload) {
return;
}
try {
this.GET();
if (utag.handler.RE('view', utag.data, "blr")) {
utag.handler.LR();
}
} catch (e) {
utag.DB(e)
};
a = this.cfg;
c = 0;
for (b in this.GV(a)) {
if (a[b].load > 0 && (typeof a[b].src != 'undefined' && a[b].src != '')) {
a[b].block = 1
}
if (a[b].block) {
if (a[b].load == 4) a[b].load = 1;
c = 1;
this.bq[b] = 1;
a[b].cb = function() {
var d = this.uid;
utag.loader.cfg[d].cbf = 1;
utag.loader.LOAD(d)
};
a[b].id = b;
this.AS(a[b]);
}
}
if (c == 0) this.INIT();
};
utag.loader.INIT = function(a, b, c, d, e) {
utag.DB('utag.loader.INIT');
if (this.ol == 1) return -1;
else this.ol = 1;
utag.handler.RE('view', utag.data);
utag.rpt.ts['i'] = new Date();
d = this.cfgsort;
for (a = 0; a < d.length; a++) {
e = d[a];
b = this.cfg[e];
b.id = e;
if (b.block != 1 && b.s2s != 1) {
if (utag.loader.bk[b.id]) {
this.f[b.id] = 0;
utag.loader.LOAD(b.id)
} else if (b.wait == 1 && utag.loader.rf == 0 && !(b.load == 4 && utag.cfg.noview)) {
utag.DB('utag.loader.INIT: waiting ' + b.id);
this.wq.push(b)
this.f[b.id] = 2;
} else if (b.load > 0) {
utag.DB('utag.loader.INIT: loading ' + b.id);
this.lq.push(b);
this.AS(b);
}
}
}
if (this.wq.length > 0) utag.loader.EV('', 'ready', function(a) {
if (utag.loader.rf == 0) {
utag.DB('READY:utag.loader.wq');
utag.loader.rf = 1;
utag.loader.WQ();
}
});
else if (this.lq.length > 0) utag.loader.rf = 1;
else if (this.lq.length == 0) utag.loader.END();
return 1
};
utag.loader.EV('', 'ready', function(a) {
if (utag.loader.efr != 1) {
utag.loader.efr = 1;
try {
utag.data.facebook_handler = {};
utag.data.facebook_handler.id_grabber = function() {
utag.data.facebook_handler.call_counter = utag.data.facebook_handler.call_counter + 1 || 1;
if (utag.data.facebook_handler.call_counter < 11) {
setTimeout(function() {
if (window.FB && typeof window.FB.getAuthResponse === "function") {
utag.data.facebook_handler.authResponse = FB.getAuthResponse();
if (utag.data.facebook_handler.authResponse && utag.data.facebook_handler.authResponse.userID) {
utag.data.facebook_handler.call_counter = 100;
utag.data.facebook_id = utag.data.facebook_handler.authResponse.userID;
utag.track('audiencestream', {
facebook_id: utag.data.facebook_id,
as_event_name: 'grab Facebook ID'
});
}
}
if (utag.data.facebook_handler.call_counter < 11) {
utag.data.facebook_handler.id_grabber();
}
}, 1000);
}
}
utag.data.facebook_handler.id_grabber();
} catch (e) {
utag.DB(e)
};
try {
jQuery('.trackEvent').click(function() {
var dataAttributes = jQuery(this).data();
if (jQuery.isEmptyObject(dataAttributes) === false) {
timeinc.service.universalAnalytics.trackEvent(dataAttributes);
}
return true;
});
} catch (e) {
utag.DB(e)
};
try {
function initVJS() {
var __indexOf = [].indexOf || function(item) {
for (var i = 0, l = this.length; i < l; i++) {
if (i in this && this[i] === item) return i;
}
return -1;
};
videojs.plugin('ga', function(options) {
var adStateRegex, currentVideo, dataSetupOptions, defaultLabel, defaultsEventsToTrack, end, endTracked, error, eventCategory, eventLabel, eventNames, eventsToTrack, fullscreen, getEventName, isInAdState, loaded, parsedOptions, pause, percentsAlreadyTracked, percentsPlayedInterval, play, player, referrer, resize, seekEnd, seekStart, seeking, sendbeacon, sendbeaconOverride, start, startTracked, timeupdate, tracker, volumeChange, _this = this;
if (options == null) {
options = {};
}
player = this;
dataSetupOptions = {};
if (this.options()["data-setup"]) {
parsedOptions = JSON.parse(this.options()["data-setup"]);
if (parsedOptions.ga) {
dataSetupOptions = parsedOptions.ga;
}
}
referrer = document.createElement('a');
referrer.href = document.referrer;
if (self !== top && window.location.host === 'preview-players.brightcove.net' && (referrer.hostname = 'studio.brightcove.com')) {
videojs.log('Google analytics plugin will not track events in Video Cloud Studio');
return;
}
defaultsEventsToTrack = ['percent_played', 'end', 'play', 'pause', 'video_load'];
eventsToTrack = options.eventsToTrack || dataSetupOptions.eventsToTrack || defaultsEventsToTrack;
percentsPlayedInterval = options.percentsPlayedInterval || dataSetupOptions.percentsPlayedInterval || 25;
eventCategory = options.eventCategory || dataSetupOptions.eventCategory || 'Brightcove Player';
sendbeaconOverride = options.sendbeaconOverride || false;
percentsAlreadyTracked = [];
startTracked = false;
endTracked = false;
seekStart = seekEnd = 0;
seeking = false;
eventLabel = '';
currentVideo = '';
eventNames = {
"video_load": "Video Player Loaded",
"percent_played": "Milestone Passed",
"start": "Content Started",
"seek_start": "Seek start",
"seek_end": "Seek end",
"play": "Video Play Button",
"pause": "Video Pause Button",
"error": "Error",
"fullscreen_exit": "Fullscreen Exited",
"fullscreen_enter": "Fullscreen Entered",
"resize": "Resize",
"volume_change": "Volume Change",
"player_load": "Player Load",
"end": "Video Complete",
"ads-ad-started": "Ad Started",
"ads-ad-ended": "Ad Ended"
};
getEventName = function(name) {
if (options.eventNames && options.eventNames[name]) {
return options.eventNames[name];
}
if (dataSetupOptions.eventNames && dataSetupOptions.eventNames[name]) {
return dataSetupOptions.eventNames[name];
}
if (eventNames[name]) {
return eventNames[name];
}
return name;
};
adStateRegex = /(\s|^)vjs-ad-(playing|loading)(\s|$)/;
isInAdState = function(player) {
return adStateRegex.test(player.el().className);
};
loaded = function() {
if (!isInAdState(player)) {
if (defaultLabel) {
eventLabel = defaultLabel;
} else {
if (player.mediainfo && player.mediainfo.id) {
eventLabel = player.mediainfo.name;
} else {
eventLabel = this.currentSrc().split("/").slice(-1)[0].replace(/\.(\w{3,4})(\?.*)?$/i, '');
}
}
if (player.mediainfo && player.mediainfo.id && player.mediainfo.id !== currentVideo) {
currentVideo = player.mediainfo.id;
percentsAlreadyTracked = [];
startTracked = false;
endTracked = false;
seekStart = seekEnd = 0;
seeking = false;
if (__indexOf.call(eventsToTrack, "video_load") >= 0) {
sendbeacon(getEventName('video_load'), true);
}
}
}
};
var firstPlay = false;
timeupdate = function() {
var currentTime, duration, percent, percentPlayed, _i;
if (!isInAdState(player)) {
currentTime = Math.round(this.currentTime());
duration = Math.round(this.duration());
percentPlayed = Math.round(currentTime / duration * 100);
for (percent = _i = 0; _i <= 99; percent = _i += percentsPlayedInterval) {
if (percentPlayed >= percent && __indexOf.call(percentsAlreadyTracked, percent) < 0 && percent > 0) {
if (__indexOf.call(eventsToTrack, "percent_played") >= 0 && percentPlayed !== 0) {
sendbeacon(percent + "% " + getEventName('percent_played'), true);
}
if (percentPlayed > 0) {
percentsAlreadyTracked.push(percent);
}
}
}
if (!isInAdState(player) && currentTime > 1 && currentTime < 3 && !firstPlay) {
sendbeacon('Video Content Started', true);
firstPlay = true;
}
if (__indexOf.call(eventsToTrack, "seek") >= 0) {
seekStart = seekEnd;
seekEnd = currentTime;
if (Math.abs(seekStart - seekEnd) > 1) {
seeking = true;
sendbeacon(getEventName('seek_start'), false, "Seek Start: " + seekStart);
sendbeacon(getEventName('seek_end'), false, "Seek End: " + seekEnd);
}
}
}
};
end = function() {
if (!isInAdState(player) && !endTracked) {
sendbeacon(getEventName('end'), false);
endTracked = true;
}
};
play = function() {
var currentTime;
currentTime = Math.round(this.currentTime());
if (!isInAdState(player) && currentTime > 0) {
sendbeacon(getEventName('play'), false);
seeking = false;
}
};
start = function() {
var currentTime;
currentTime = Math.round(this.currentTime());
if (!isInAdState(player) && currentTime == 0) {
if (__indexOf.call(eventsToTrack, "start") >= 0 && !startTracked) {
sendbeacon(getEventName('start'), true);
return startTracked = true;
}
}
};
pause = function() {
var currentTime, duration;
if (!isInAdState(player)) {
currentTime = Math.round(this.currentTime());
duration = Math.round(this.duration());
if (currentTime !== duration && !seeking && currentTime > 0) {
sendbeacon(getEventName('pause'), false);
}
}
};
volumeChange = function() {
var volume;
volume = this.muted() === true ? 0 : this.volume();
sendbeacon(getEventName('volume_change'), false, "Volume: " + volume);
};
resize = function() {
sendbeacon(getEventName('resize'), true, "Resized: " + this.width() + "*" + this.height());
};
error = function() {
var currentTime;
currentTime = Math.round(this.currentTime());
sendbeacon(getEventName('error'), true, "Current Time: " + currentTime);
};
fullscreen = function() {
var currentTime;
currentTime = Math.round(this.currentTime());
if ((typeof this.isFullscreen === "function" ? this.isFullscreen() : void 0) || (typeof this.isFullScreen === "function" ? this.isFullScreen() : void 0)) {
sendbeacon(getEventName('fullscreen_enter'), false, "Current Time: " + currentTime);
} else {
sendbeacon(getEventName('fullscreen_exit'), false, "Current Time: " + currentTime);
}
};
sendbeacon = function(action, nonInteraction) {
if (nonInteraction) {
px_bc_label = 'autoplay'
} else {
px_bc_label = 'click-to-play'
}
if (utag !== undefined) {
utag.link({
'ua_eventCategory': 'Video',
'ua_eventAction': action,
'ua_eventLabel': px_bc_label,
'ua_eventValue': 0,
'ua_nonInteraction': nonInteraction
});
};
};
this.ready(function() {
this.on("loadedmetadata", loaded);
this.on("timeupdate", timeupdate);
if (__indexOf.call(eventsToTrack, "end") >= 0) {
this.on("ended", end);
}
if (__indexOf.call(eventsToTrack, "play") >= 0) {
this.on("play", play);
}
if (__indexOf.call(eventsToTrack, "start") >= 0) {
this.on("playing", start);
}
if (__indexOf.call(eventsToTrack, "pause") >= 0) {
this.on("pause", pause);
}
if (__indexOf.call(eventsToTrack, "volume_change") >= 0) {
this.on("volumechange", volumeChange);
}
if (__indexOf.call(eventsToTrack, "resize") >= 0) {
this.on("resize", resize);
}
if (__indexOf.call(eventsToTrack, "error") >= 0) {
this.on("error", error);
}
if (__indexOf.call(eventsToTrack, "fullscreen") >= 0) {
return this.on("fullscreenchange", fullscreen);
}
});
});
var px_bc_players = videojs.getPlayers();
for (var player in px_bc_players) {
if (px_bc_players.hasOwnProperty(player)) {
px_bc_players[player].ga();
}
}
}
var adTrack = function() {
var sendbeacon = function(action) {
utag.link({
'ua_eventCategory': 'Video',
'ua_eventAction': action,
'ua_eventLabel': 'autoplay',
'ua_eventValue': 0,
'ua_nonInteraction': true
});
};
var px_bc_players = videojs.getPlayers();
for (var player in px_bc_players) {
if (px_bc_players.hasOwnProperty(player)) {
var player = px_bc_player