/* Controltag Loader for NBCUniversal */ (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": "JU5lk0Wm", "value": "Premier League"}, {"id": "JVEEuygn", "value": "Manchester United"}, {"id": "JVEEuyop", "value": "Manchester City"}, {"id": "JVEEuywy", "value": "Aston Villa"}, {"id": "JVEEuy57", "value": "EPL"}, {"id": "JVEEuzCf", "value": "West Ham"}, {"id": "JVEEuzK3", "value": "English Premier League"}, {"id": "JVEEuzS8", "value": "Barclays Premier League"}, {"id": "JVEEuzaz", "value": "Fulham"}, {"id": "JVEEuzio", "value": "Tottenham"}, {"id": "JVEEuzqd", "value": "Arsenal"}, {"id": "JVEEuzym", "value": "FA Cup"}, {"id": "JVEEuz9b", "value": "Carling Cup"}, {"id": "JVZ0lz3Q", "value": "Danny Welbeck"}, {"id": "JVZ0lz--", "value": "Joe Hart"}, {"id": "JVZ0l0G9", "value": "Mario Balotelli"}, {"id": "JVZ0l0Od", "value": "Daniel Sturridge"}, {"id": "JVZ0l0V3", "value": "Rickie Lambert"}, {"id": "JVZ0l0dV", "value": "Swansea City"}, {"id": "JVZ0l0lY", "value": "Hull City"}, {"id": "JVZ0l0s1", "value": "Stoke City"}, {"id": "JVZ0l00i", "value": "Queens Park"}, {"id": "JVZ0l08J", "value": "Sunderland"}, {"id": "JVZ0l1Dx", "value": "Leicester City"}, {"id": "JVZ0l1LT", "value": "Newcastle United"}, {"id": "JVZ0l1TA", "value": "Everton"}, {"id": "JVZ0l1aq", "value": "West Bromwich"}, {"id": "JVZ0l1iO", "value": "Crystal Palace"}, {"id": "JVZ0l1p2", "value": "Burnley"}, {"id": "JVZ0l1xn", "value": "Diego Costa"}, {"id": "JVZ0l15K", "value": "Javi Manquillo"}, {"id": "JVZ0l2Au", "value": "Nathan Dyer"}, {"id": "JVZ0l2IM", "value": "Steven Naismith"}, {"id": "JVZ0l2P4", "value": "Enner Valencia"}, {"id": "JVZ0l2Xe", "value": "Matty James"}, {"id": "JVZ0l2fN", "value": "Welbeck"}, {"id": "JVZ0l2m0", "value": "Balotelli"}, {"id": "JVZ0l2uk", "value": "Fabianski"}, {"id": "JVZ0l22X", "value": "Lukasz Fabianski"}, {"id": "JVZ0l2-E", "value": "Premiership"}, {"id": "JqSNAIdZ", "value": "job"}, {"id": "JqSNAIyQ", "value": "jobs"}, {"id": "JqSNAJGj", "value": "career"}, {"id": "JqSNAJac", "value": "careers"}, {"id": "JqSNAJuP", "value": "sports job"}, {"id": "JqSNAKCA", "value": "sports jobs"}, {"id": "JqSNAKV8", "value": "work"}], "tags": [{"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": "asap", "method": "document", "type": "publisher", "id": 28327, "name": "MediaMath User Match"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 2, "internal": 1, "content_type": "html", "timing": "asap", "method": "document", "type": "publisher", "id": 50047, "name": "Load Segments V4 (auto upgrade)"}, {"content": "", "target": null, "target_action": "append", "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": 39, "content_type": "html", "freq_cap": 3, "timing": "onload", "method": "document", "type": "data provider", "id": 27697, "name": "HealthyOffers - NBCU (via LiveRamp) provider tag"}, {"content": "", "target": null, "target_action": "append", "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": 72, "content_type": "html", "freq_cap": 3, "timing": "onload", "method": "document", "id": 45116, "name": "Proximic provider tag"}, {"content": "", "target": null, "target_action": "append", "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": 6, "content_type": "html", "timing": "onload", "method": "document", "type": "data provider", "id": 11327, "name": "Technographic Data provider tag"}, {"content": "", "target": null, "target_action": "append", "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": 13, "content_type": "html", "freq_cap": 3, "timing": "onload", "method": "document", "id": 16002, "name": "Quantcast 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": 23254, "name": "Krux Geographic Data provider tag"}, {"content": "", "target": null, "target_action": "append", "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": 19, "content_type": "html", "freq_cap": 3, "timing": "onload", "method": "document", "type": "data provider", "id": 14072, "name": "Nielsen (via Exelate) 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": 12072, "name": "IDX Cookie Scraper"}, {"content": "", "target": "", "target_action": null, "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": 38962, "name": "DataLogix provider tag"}, {"criteria": [{"operator": "notContains", "name": "url", "value": "https"}], "content": "", "target": "", "target_action": null, "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": 11109, "name": "eXelate Media provider tag"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": 1, "content_type": "html", "freq_cap": 3, "timing": "onload", "method": "document", "type": "data provider", "id": 19045, "name": "AdAdvisor S2S provider tag"}, {"criteria": [{"operator": "contains", "name": "url", "value": "msnbc"}], "content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": {"onloadSafe": true, "docwrite": true, "listeners": []}, "tier": 1, "internal": false, "content_type": "html", "freq_cap": 10, "timing": "onload", "method": "document", "type": "publisher", "id": 29287, "name": "NEWS: MSNBC - icompass"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": 1, "content_type": "html", "freq_cap": 3, "timing": "onload", "method": "document", "type": "data provider", "id": 18290, "name": "Acxiom S2S provider tag"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": false, "content_type": "html", "freq_cap": 3, "timing": "onload", "method": "document", "type": "publisher", "id": 35454, "name": "TubeMogul User Match"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "internal": false, "template_replacement": 1, "execution_results": null, "tier": 1, "library_tag_config": {}, "content_type": "html", "timing": "onload", "method": "document", "type": "library", "id": 24980, "name": "Krux Track Social"}, {"criteria": [{"operator": "contains", "name": "url", "value": "nbcnews.com/feature/freshman-year/"}], "content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 0, "execution_results": {"onloadSafe": true, "docwrite": false, "listeners": []}, "tier": 1, "internal": false, "content_type": "html", "freq_cap": 1, "timing": "onload", "method": "document", "type": "publisher", "id": 51125, "name": "NEWS: NBC News - Insight Express 373612"}, {"criteria": [{"operator": "!=", "name": "section", "value": "nbcolympics.com, www.nbcolympics.com"}, {"operator": "contains", "name": "url", "value": "qa.pub.cnbc.com"}], "content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": false, "content_type": "html", "freq_cap": 1, "timing": "onload", "method": "document", "type": "publisher", "id": 10690, "name": "Krux eXelate cookie match"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": false, "content_type": "html", "timing": "onload", "method": "document", "type": "publisher", "id": 11476, "name": "krux-dfp-site-zone"}, {"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": 15596, "name": "Quantcast / Krux"}, {"content": " \r\n ", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 1, "internal": 24, "content_type": "html", "freq_cap": 3, "timing": "onload", "method": "document", "type": "data provider", "id": 20727, "name": "Crowd Science (NBCU) provider tag"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": {"onloadSafe": true, "docwrite": false, "listeners": []}, "tier": 10, "internal": false, "content_type": "html", "freq_cap": 3, "timing": "onload", "method": "document", "type": "publisher", "id": 27407, "name": "PubMatic Segment Sharing"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 10, "internal": false, "content_type": "html", "criteria": [{"operator": "contains", "name": "url", "value": "weather"}], "timing": "onload", "method": "document", "type": "publisher", "id": 26641, "name": "Weather Seekers"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": {"onloadSafe": true, "docwrite": false, "listeners": []}, "tier": 10, "internal": false, "content_type": "html", "timing": "onload", "method": "document", "type": "publisher", "id": 32786, "name": "Krux URL Scraper"}, {"content": "", "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": "url", "value": "nbcnews.com/technology"}], "timing": "onload", "method": "document", "type": "publisher", "id": 25732, "name": "News Technology"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 10, "internal": false, "content_type": "html", "criteria": [{"operator": "contains", "name": "url", "value": "health,healthcare,health-care,affordable-care-act,medicaid,medicare"}], "timing": "onload", "method": "document", "type": "publisher", "id": 25507, "name": "Healthcare"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": {"onloadSafe": true, "docwrite": false, "listeners": []}, "tier": 10, "internal": false, "content_type": "html", "timing": "onload", "method": "document", "type": "publisher", "id": 22975, "name": "Research Experience Monitor Code \u2013 NBC News"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 0, "execution_results": {"onloadSafe": true, "docwrite": false, "listeners": []}, "tier": 1, "internal": false, "content_type": "html", "timing": "onready", "method": "document", "type": "publisher", "id": 14704, "name": "AudienceScience - P&G"}, {"criteria": [{"operator": "contains", "name": "url", "value": "nbcnews.com"}], "content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 0, "execution_results": {"onloadSafe": true, "docwrite": true, "listeners": [{"capture": false, "type": "load", "func": "function () {\n lInsightExpress.loaded();\n}"}, {"capture": false, "type": "load", "func": "function () {\n InsightExpress.Analytics.AddParam(\"browsersize\", InsightExpress.Browser.GetWidth() + \"x\" + InsightExpress.Browser.GetHeight());\n InsightExpress.Analytics.AddParam(\"iniframe\", InsightExpress.InIFrame);\n var prevEl = null;\n var regex = new RegExp(\"insightexpress.*\", \"i\");\n InsightExpress.ForEach(InsightExpress.TopDoc.getElementsByTagName(\"script\"), function () {if (regex.test(this.src)) {prevEl = this.parentNode;}});\n var ad = InsightExpress.Analytics.FindAdUnit(prevEl);\n if (ad) {\n InsightExpress.Analytics.AdUnit = ad;\n InsightExpress.Analytics.AddParam(\"adlocation\", ad.offsetLeft + \"x\" + ad.offsetTop);\n InsightExpress.Analytics.AddParam(\"adsize\", ad.offsetWidth + \"x\" + ad.offsetHeight);\n InsightExpress.Analytics.AddParam(\"abovethefold\", ad.offsetTop < InsightExpress.Browser.GetHeight());\n setInterval(function () {var adInView = ad.offsetTop - InsightExpress.Analytics.GetScroll().y < InsightExpress.Browser.GetHeight();if (adInView) {InsightExpress.Analytics.TotalTimeInView++;}InsightExpress.Analytics.AddParam(\"timeinview\", InsightExpress.Analytics.TotalTimeInView);}, 1000);\n }\n}"}]}, "tier": 1, "internal": false, "content_type": "html", "freq_cap": 1, "timing": "onready", "method": "document", "type": "publisher", "id": 25022, "name": "NEWS: NBC News - icompass "}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 2, "internal": false, "content_type": "html", "timing": "onready", "method": "document", "type": "publisher", "id": 13132, "name": "Krux Scraper - sym and xa"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 2, "internal": false, "content_type": "html", "timing": "onready", "method": "document", "type": "publisher", "id": 10688, "name": "Krux Scraper - Hierarchy and Attributes"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 5, "internal": false, "content_type": "html", "timing": "onready", "method": "document", "type": "publisher", "id": 10957, "name": "Internal NBC Metrics: SNAS - (w/SegFilterActive)"}, {"content": "", "target": "", "target_action": null, "require": "", "docwrite": null, "template_replacement": 1, "execution_results": null, "tier": 10, "internal": false, "content_type": "html", "timing": "onready", "method": "document", "type": "publisher", "id": 10971, "name": "Internal NBC Metrics: SNAS - saveActivity"}, {"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", "timing": "onready", "method": "document", "type": "publisher", "id": 10993, "name": "Quantcast - Simple Tag"}], "segments": [], "publisher": {"uuid": "54983c83-8810-4a6b-9ff1-81f7349ce967", "id": 10108, "name": "NBCUniversal"}, "controltag_options": {"async": "true", "render": true}, "site": {"id": 10296, "name": "NBC News"}, "dnt": null, "params": {"connector_host": "connector.krxd.net", "control_tag_load_sync": "false", "fingerprint": false, "disable_http_compression": false, "remove_kxhead": true, "supertag_requires_approval": "true", "config_source": 1, "control_tag_stats_prefix": "nbcu", "beacon_host": "beacon.krxd.net", "control_tag_pixel_throttle": null, "user_id_cookie": null, "max_segments": null, "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": "nbcu", "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", "$event_IwMx30gy"]]]], "id": "nxnwnhuug"}, {"test": ["and", ["or", ["and", ["or", ["intersects", "$page_attr_dart_aff", "[\"10573\"]"]]]]], "id": "ohhwi5227"}], "confid": "Hhr_tdFP"}; // 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.f99670595ccd46c65a517672ea749179', function() { log('Loading krux configuration.'); Krux('config', config); }); })();