/* Controltag Loader for Washington Post */
(function(){
var debugging = /kxdebug/.test(location);
var log = function() {
// It's a flag, so if it's there, then it means debug.
debugging && window.console && console.log([].slice.call(arguments).join(' '));
};
var load = function(url, callback) {
log('Loading script from:', url);
var node = document.createElement('script');
node.async = true; // This is just to be friendly.
node.src = url;
// Connect to both in case we're in older IE.
node.onload = node.onreadystatechange = function() {
var state = node.readyState;
if (!callback.done && (!state || /loaded|complete/.test(state))) {
log('Script loaded from:', url);
callback.done = true; // Mark the callback, so we don't load it twice on accident.
callback();
}
};
// Fetch the first script element, so we can insert the
// controltag before it. There *must* be at least one
// script element, or this code would never be called
var sibling = document.getElementsByTagName('script')[0];
sibling.parentNode.insertBefore(node, sibling);
};
// ControlTag simply crashes when opening a website from Twitter browser on
// iOS, temporarily disable CT when Twitter for iPhone is detected until they
// fix this (works fine with other twitter client though)
if (/Twitter for iPhone/.test(window.navigator.userAgent || '')) return;
var config = {"partner_segment_map": {}, "context_terms": [{"id": "It03V-vk", "value": "visa signature"}, {"id": "It03WASn", "value": "credit card"}, {"id": "It03WAvJ", "value": "nissan maxima"}, {"id": "I-C2we_V", "value": "healthcare"}, {"id": "I-C2wfMo", "value": "Affordable Care Act"}, {"id": "I-C2wfZg", "value": "Obamacare"}, {"id": "I-C2wfmm", "value": "Medicare"}, {"id": "I-C2wfzz", "value": "Medicaid"}, {"id": "I-C2wgA-", "value": "National Kidney Foundation"}, {"id": "I-C2wgOE", "value": "National Alliance on Mental Illness"}, {"id": "I-C2wgjm", "value": "Part D"}, {"id": "I-C2wgwe", "value": "Patient Protection"}], "tags": [{"content": "", "target": null, "target_action": "append", "require": "", "docwrite": null, "internal": 1, "template_replacement": 1, "execution_results": null, "tier": 1, "library_tag_config": {}, "content_type": "html", "timing": "onload", "method": "document", "type": "library", "id": 24879, "name": "Krux Track Social"}, {"content": "", "target": null, "target_action": "append", "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": 63, "content_type": "html", "freq_cap": 3, "timing": "onload", "method": "document", "type": "data provider", "id": 41063, "name": "NetProspex provider tag"}, {"content": "", "target": null, "target_action": "append", "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": 11, "content_type": "html", "freq_cap": 3, "timing": "onload", "method": "document", "type": "data provider", "id": 23156, "name": "eXelate Media provider tag"}, {"content": "", "target": null, "target_action": "append", "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": 6, "content_type": "html", "freq_cap": 3, "timing": "onload", "method": "document", "type": "data provider", "id": 22656, "name": "Technographic Data provider tag"}, {"content": "", "target": null, "target_action": "append", "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": 14, "content_type": "html", "freq_cap": 3, "timing": "onload", "method": "document", "id": 22657, "name": "Krux Geographic Data provider tag"}, {"content": "
", "target": null, "target_action": "append", "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": 22, "content_type": "html", "freq_cap": 3, "timing": "onload", "method": "document", "type": "data provider", "id": 23427, "name": "AdAdvisor S2S provider tag"}, {"content": "", "target": null, "target_action": "append", "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": 8, "content_type": "html", "freq_cap": 3, "timing": "onload", "method": "document", "type": "data provider", "id": 23429, "name": "DataLogix provider tag"}, {"content": "", "target": null, "target_action": "append", "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": 67, "content_type": "html", "freq_cap": 3, "timing": "onload", "method": "document", "id": 43672, "name": "WhoToo Partner Network provider tag"}, {"content": "", "target": null, "target_action": "append", "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": 21, "content_type": "html", "freq_cap": 3, "timing": "onload", "method": "document", "type": "data provider", "id": 23255, "name": "Acxiom S2S provider tag"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": {"onloadSafe": true, "docwrite": false, "listeners": []}, "tier": 1, "internal": 1, "content_type": "html", "timing": "onload", "method": "document", "type": "publisher", "id": 45319, "name": "xaxis user match"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": {"onloadSafe": true, "docwrite": false, "listeners": []}, "tier": 1, "internal": 1, "content_type": "html", "timing": "onload", "method": "document", "type": "publisher", "id": 23049, "name": "Krux Data Transfer Code"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": 28, "content_type": "html", "freq_cap": 3, "timing": "onload", "method": "document", "type": "data provider", "id": 23428, "name": "IXI Digital (Open Market) provider tag"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": {"onloadSafe": true, "docwrite": false, "listeners": []}, "tier": 1, "internal": false, "content_type": "html", "timing": "onload", "method": "document", "type": "publisher", "id": 42132, "name": "Research Now All Sites Except Mobile"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": 47, "content_type": "html", "freq_cap": 3, "timing": "onload", "method": "document", "type": "data provider", "id": 43671, "name": "Madison Logic provider tag"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": {"onloadSafe": true, "docwrite": false, "listeners": []}, "tier": 1, "internal": 1, "content_type": "html", "freq_cap": 3, "timing": "onload", "method": "document", "type": "publisher", "id": 27033, "name": "MediaMath User Matching"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": {"onloadSafe": true, "docwrite": false, "listeners": []}, "tier": 1, "internal": 1, "content_type": "html", "timing": "onload", "method": "document", "type": "publisher", "id": 23533, "name": "Krux Data Transfer Code - Commercial Node + new"}, {"content": "\r\n", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": {"onloadSafe": true, "docwrite": false, "listeners": [{"capture": false, "type": "popstate", "func": "function () {\n j = i;\n i = c.href;\n e.push([\"track\", \"PixelInitialized\"]);\n}"}]}, "tier": 1, "internal": false, "content_type": "html", "criteria": [{"operator": "=", "name": "country", "value": "US"}, {"operator": "=", "name": "segment", "value": "opeznco9d"}], "timing": "onload", "method": "document", "type": "publisher", "id": 31738, "name": "MKTG: NOT Subs & Views>=7"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 2, "internal": 1, "content_type": "html", "timing": "onload", "method": "document", "type": "publisher", "id": 22658, "name": "Krux Load Segments v4"}, {"content": "\r\n", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": {"onloadSafe": true, "docwrite": false, "listeners": []}, "tier": 10, "internal": false, "content_type": "html", "criteria": [{"operator": "=", "name": "segment", "value": "oc3w0p1cy"}], "timing": "onload", "method": "document", "type": "publisher", "id": 30394, "name": "Facebook sample"}, {"content": "\r\n\r\n\r\n\r\n", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": {"onloadSafe": true, "docwrite": false, "listeners": []}, "tier": 1, "internal": false, "content_type": "html", "criteria": [{"operator": "=", "name": "country", "value": "US"}], "timing": "onready", "method": "document", "type": "publisher", "id": 31265, "name": "FB Checkout"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": {"onloadSafe": true, "docwrite": false, "listeners": []}, "tier": 1, "internal": 1, "content_type": "html", "timing": "onready", "method": "document", "type": "publisher", "id": 27248, "name": "WPATC Ingest"}, {"content": "\r\n", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": {"onloadSafe": true, "docwrite": false, "listeners": []}, "tier": 1, "internal": false, "content_type": "html", "criteria": [{"operator": "=", "name": "segment", "value": "of61en0yu,nu9nuucoe,ntod7r5ek,nyzorrn0q,nwn4wthb5"}], "timing": "onready", "method": "document", "type": "publisher", "id": 30581, "name": "MKTG Gov and Mil"}], "segments": [], "publisher": {"uuid": "415dda7b-13ba-40f3-9a60-eb3ba310f160", "id": 11974, "name": "Washington Post"}, "controltag_options": {"async": "true", "render": true}, "site": {"id": 14227, "name": "Washington Post"}, "prioritized_segments": ["n881e6bd0", "o37ewguj0", "o30n32aic", "o30nqvgvo", "o30m15xhm", "onzzsiicb", "oul9e5iwv", "ohduro4zg", "oypr8npxc", "peoik2xew", "pg1tlpf1r", "oypdm9cie", "nslj5f5ui", "oyoqgalbb", "oyop6uiyc", "nka000vpg", "oyhkuxted", "oyhj39zbh", "oyhjiwo8d", "nn2oqto66", "ng78o5120", "pgfuaz5ob", "n5stjvxz6", "njqr3rlsc", "nzug6ge3t", "nizexw04v", "n599knwgw", "n7n6ja380", "ohp0mz1gc", "odinv5rgo", "nknaxeam8", "nizphkubo", "nizspxrg4", "njfarv02p", "ogtnc36ch", "nkaz6dzi4", "n7secqldd", "oeaews4x9", "ojdtffw89", "oxpzz3sg5", "nmcwihpq8", "njqs6hdt6", "nznj688mz", "nu40mrodt", "nizgsrzre", "nkm9v2j67", "nknceqoj4", "n7n68hkzz", "njrt8io0s", "n25o95yrk", "nley4unu3", "nlezpi42g", "nknctom55", "nxb45k01c", "npl71xosi", "ogtnh42r1", "njnd110xn", "nxb42ktg5", "nka0r3165", "nkznjpcww", "odimvsm03", "nknbvoafm", "njqrbzas6", "nr8i4cziq", "nlrail0ay", "nv3vpl4sc", "nizfti7z9", "nizqkg0gz", "nstxofuh1", "n4g82yuw9", "nhbuddf78", "njqssl8fx", "oenpp1t7j", "ntkt32gbs", "nkay78wok", "ohlx12bkc", "onjyc5m6y", "nps2kwa83", "njqrl1bfb", "onkqugi7u", "n9oi8vlqc", "of9q09k7m", "ntoboq1k5", "nu9rdyziw", "n9wqkxddz", "oqoaud1gj", "nzuehynfk", "nwn4wthb5", "olj8boj3h", "oeiuizocd", "nwsmpntc8", "ng780og69", "nvwljtfnx", "niv0ol064", "oe67lrdza", "nizgegx3a", "nzadp13wc", "nizrx7sno", "nivurvgqp", "nka0l7q2e", "nh304tyj9", "nyzorrn0q", "ogttj7dlx", "nizsx81pa", "odqggb931", "nps167ytl", "os28v6au3", "o0o0tnjwm", "nkaz82lct", "nizhn0oxy", "njn3lvekn", "nzud0rq2b", "obzswvk15", "nkfu63bjs", "njqrvfxac", "niv0g0yi7", "opzv4wf5w", "n9cmfefqm", "oh986m12r", "njn3whm99", "objk4rdk0", "n9ckaa3af", "oqrx9hhrg", "nkzqstvs6", "olo7nzgfd", "oaf393v4t", "n9cjhv5j3", "nzuf2i20h", "n9nkusmnm", "nzrubsvw7", "olo9jpfri", "oh98velyu", "oe3ag8w9e", "nukdjwipa", "ntsvbd0dw", "n9cmodee2", "nu9nuucoe", "nwsm55rws", "nv0k4rd7m", "nkaxmter1", "n5wq9er1m", "ntod7r5ek", "oqzz0pgzy", "n9nuwiiy3", "ovhfgrpa5", "ov05tibrh", "ov06icq6a", "ov47838la", "ovh0y2z36", "ov05m8ddz", "ov05ynk2y", "oygp6ls41", "o0oy9g7xr", "o1wv6mfsc", "o66mrbymd", "o3tcoc2qg", "o8ifq0rb1", "o6y85e48j", "o63hyi49b", "o9adnautp", "o9nyibm86", "o9n1kd5ew", "nmcwigidj", "padynukjo", "o1wvx73u8", "pa1sdfzt2", "pa1u906pm", "pblp17ry2", "oc3xggnii", "oc3w9t9qy", "pbtpwkm1z", "pblp8gsr5", "pblqq8z9h", "pblqoung0", "pblqlg4ay", "pblqeizqr", "pblqbpi4q", "nwhpqx68b", "odqgpfxos", "of61en0yu", "pcaanrnov", "pfjydrtrm", "pfkunmfbz", "pfkw5je8x", "pfnuhh0ff", "pgvd2zmg6", "pgvz7wah1", "pg3hrjia3", "pg3hwp4z9", "pg3h1y140"], "dnt": null, "params": {"connector_host": "connector.krxd.net", "control_tag_load_sync": "false", "fingerprint": "false", "disable_http_compression": false, "remove_kxhead": "0", "supertag_requires_approval": false, "config_source": 1, "control_tag_stats_prefix": null, "beacon_host": "beacon.krxd.net", "control_tag_pixel_throttle": "100", "user_id_cookie": null, "max_segments": "25", "no_pii": 0, "recommend": false, "revenue_optimization": false, "context_terms": "true", "jslog_host": "jslog.krxd.net", "site_level_supertag_config": "site", "max_slot_time": 1000, "services_host": "apiservices.krxd.net", "capture_leakage": true, "client_side_storage": "localStorage,cookie", "userData_host": "cdn.krxd.net", "control_tag_namespace": null, "control_tag_version": "stable", "capture_js_errors": "true", "datatag_version": "3", "dfp_premium": "true", "userdata_host": "cdn.krxd.net", "target_fingerprint": "false"}, "services": {"impression": "//beacon.krxd.net/ad_impression.gif", "stats": "//apiservices.krxd.net/stats", "userdata": "//cdn.krxd.net/userdata/get", "userData": "//cdn.krxd.net/user_data/segments/3", "um": "//apiservices.krxd.net/um", "optout": "//beacon.krxd.net/optout_check", "pixel": "//beacon.krxd.net/pixel.gif", "contentConnector": "//connector.krxd.net/content_connector/", "is_optout": "//beacon.krxd.net/optout_check", "set_optin": "//apiservices.krxd.net/consumer/optin", "social": "//beacon.krxd.net/social.gif", "set_optout": "//apiservices.krxd.net/consumer/optout", "data": "//beacon.krxd.net/data.gif", "event": "//beacon.krxd.net/event.gif", "log": "//jslog.krxd.net/jslog.gif"}, "geo": {}, "realtime_segments": [{"test": ["and", ["or", ["and", ["or", ["intersects", "$page_attr_wp_section", "[\"entertainment\"]"]]]]], "id": "niv0ol064"}], "confid": "IbWIJ0xh"};
// Wrap in a function and comment, then toString the func and replace
// everything that's not the beginning or end of a JSON object, so we get a
// string that's either empty or JSON.
var esiGeo = String(function(){/*
*/}).replace(/^.*\/\*[^{]+|[^}]+\*\/.*$/g, '');
if (esiGeo) {
log('Got a request for:', esiGeo, 'adding geo to config.');
try {
config.geo = window.JSON.parse(esiGeo);
} catch (__) {
// Couldn't parse, so setting to {}
log('Unable to parse geo from:', config.geo);
config.geo = {};
}
}
load('//cdn.krxd.net/ctjs/controltag.js.cf94643484cc8654373adf5516beca11', function() {
log('Loading krux configuration.');
Krux('config', config);
});
})();