mmRequestCallbacks[1]({"Scripts":[{"Name":"Const_Global","Type":"script","Attrs":{"type":"text/javascript"},"Data":"site.scope.event = {\n    REACT_LOADED: 'mmReactLoaded',\n    PAGE_CHANGED: 'mmPageChanged',\n    ELEMENT_CREATED: 'mmElementCreated',\n    SPLASH_ARR_ARRIVAL: 'SplashArrArrival',\n    SUBSCRIPTION_DONE: 'SubscriptionDone',\n};","Order":-1000,"HighLevelApiVersion":"1.12"},{"Name":"Plugin_IntModule","Type":"script","Attrs":{"type":"text/javascript"},"Data":"/*!\n *\tintegrations-module 0.9.4\n *\t-- Maxymiser Integrations Module provides a standardized approach to develop and deploy 3rd party integrations.\n *\t-- https://gitlab.com/maxymiser-integrations/integrations-module/raw/master/src/integrations-module.min.js\n *\t-- git+ssh://git@gitlab.com/maxymiser-integrations/integrations-module.git\n *\t-- Built on 2015-10-30\n */\n!function(){function a(){function a(a,b){function i(b){return a=a||\"\",g(\"Integrations.register(\"+a+\"): \"+(b||\"\").toString())}var j,k;return b=e(b)?b:{},(a=(\"string\"==typeof a?a:\"\").toLowerCase().replace(/^\\s+|\\s+$/g,\"\"))?l[a]?(i(m.errors.alreadyRegistered),null):(b.name=a,j=h(b,{}),k={validate:c(j.validate)?j.validate:f,check:c(j.check)?j.check:f,interval:d(j.interval)?j.interval:50,timeout:d(j.timeout)?j.timeout:2e3,exec:c(j.exec)?j.exec:f,options:j},j=h(k,j),l[a]=j):(i(m.errors.missingRegisterName),null)}function i(a,b){b=e(b)?b:{};var c,d,f,g,i=new Deferred;if(a=(a||\"\").toLowerCase(),i.integrationName=a,!l[a])return m.reject(i,m.errors.unregisteredIntegration);if(c=h(l[a],{}),c=h(b,c),(f=c.validate(c))!==!0)return m.reject(i,f);if(d=c.campaign,(g=m.validateCampaignRequired(c,i))!==!0)return m.reject(i,g);if(c.isProduction=m.isProduction(),c.attributeMapRequired){var j=m.isValidAttributeMap(c.attributeMap);if(j!==!0)return m.reject(i,j)}return\"pending\"!==i.state()?i.promise():(\"never\"!==c.timeout&&m.setFailTimeout(c,i),m.check(c).then(function(){return m.exec(c)}).then(function(a){return c.result=a,m.resolve(i,c)}).fail(function(a){return m.reject(i,a)}),i.promise())}function j(a,b){a=(a||\"\").toLowerCase();var c=l[a];return c?(b=e(b)?b:{},l[a]=h(b,c),this):!1}function k(a){if(!a)return l;var b=(a||\"\").toLowerCase();return l[b]}var l={},m={errors:{missingRegisterName:\"Invalid integration reigstration. Name argument is required.\",missingRegisterExec:\"Missing `exec` for integration registration\",alreadyRegistered:\"Integration has already been registered\",missingRunName:\"Missing `name` for `integration.run`\",unregisteredIntegration:\"Unknown integration name\",noCampaignExperience:\"Integration was run before the campaign has generated\",noRedirectCampaign:\"Redirect Integration is not in a valid campaign scope\",noRedirectCampaignData:\"Redirect Integration is not on a generation page\",campaignRequired:\"Integration must be deployed within a campaign script\",failedToSaveRedirectData:\"Failed to save redirect data\"},HALFHOUR:1/48,isProduction:function(){function a(a){for(var c,d={},e=\"\",f=0;c=b(a+f++);)e+=c;e=decodeURIComponent(e);try{d=JSON.parse(e)}catch(g){}return d}function b(a){var b=new RegExp(\"(?:^|; )\"+encodeURIComponent(a).replace(/([.$?*|{}()\\[\\]\\\\\\/+^])/g,\"\\\\$1\")+\"=([^;]+)\"),c=(document.cookie.match(b)||[\"\",\"\"])[1];return decodeURIComponent(c)}for(var c=a(\"mmcore.store.p.\")||{},d=a(\"mmcore.store.s.\")||{},e=a(\"mmapi.store.p.\")||{},f=a(\"mmapi.store.s.\")||{},g=[c,d,e,f],h={\"mmparams.p\":1,\"mmparams.d\":1},i={un:1,cfgID:1,pruh:1},j=g.length;j--;){var k=g[j];for(var l in h||{})for(var m in i||{})if((k[l]||{})[m])return!1}return!0},isValidIntegrationName:function(a){return\"string\"==typeof a&&/^\\w+/.test(a)},isCampaignScope:function(a){return e(a)&&a.getName&&a.getExperience?!0:!1},getCampaignExperience:function(a){var b={};return m.isCampaignScope(a)&&(b=a.getExperience&&a.getExperience()||{}),Object.keys(b)?m.formatCampaignExperience(b):!1},formatCampaignExperience:function(a){a=e(a)?a:{};var b=[];for(var c in a)b.push(c+\":\"+a[c]);return b.join(\"|\")},getData:function(a){a=(a||\"\").toLowerCase();var b=visitor.getData(\"Integrations\");return b=e(b)?b:{},a&&(b[a]=b[a]||{}),b},setRedirectData:function(a,b){if(a=(a||\"\").toLowerCase(),!m.isCampaignScope(b))return!1;var c=m.getData(a),d=b.getName();return c[a][d]=c[a][d]||{},c[a][d].redirectData=b.getExperience(),visitor.setData(\"Integrations\",c,m.HALFHOUR),!0},removeRedirectData:function(a,b){if(a=(a||\"\").toLowerCase(),!m.isCampaignScope(b))return!1;var c=m.getData(a),d=b.getName();return c[a][d]=c[a][d]||{},c[a][d].redirectData=null,visitor.setData(\"Integrations\",c,m.HALFHOUR),!0},getRedirectData:function(a,b){if(a=(a||\"\").toLowerCase(),!m.isCampaignScope(b))return!1;var c=m.getData(a),d=b.getName();if(c[a][d]=c[a][d]||{},!c[a]||!c[a][d])return c[a]=c[a]||{},c[a][d]=c[a][d]||{},c[a][d].redirectData=null,visitor.setData(\"Integrations\",c,m.HALFHOUR),!1;for(var e in c[a])if(e===d)return c[a][e].redirectData;return!1},getSessionDate:function(a,b){var c=m.getData(a),d=c[a][b.getName()]||{},e=d.sessionDate;return e},setSessionDate:function(a,b){var c=m.getData(a),d=b.getName();c[a][d]=c[a][d]||{},c[a][d].sessionDate=(new Date).getTime(),visitor.setData(\"Integrations\",c,m.HALFHOUR)},resolve:function(a,b){return a.resolve(b),a.promise()},reject:function(a,b){var c=a.integrationName||\"unknown name\";return b=b||\"unknown reason\",g(\"Integration [\"+c+\"]: \"+b.toString()),a.reject(b),a.promise()},validateCampaignRequired:function(a,b){if(!a.campaignRequired)return a.oncePerSession?\"campaign option is required when using the oncePerSession option\":a.redirect?\"campaign option is required when using the redirect option\":!0;var c=a.campaign,d=m.isCampaignScope(c);if(d!==!0)return m.errors.campaignRequired;if(a.campaignExperience=m.getCampaignExperience(c),a.campaignExperience===!1&&!a.redirect)return m.errors.noCampaignExperience(a.name);if(a.oncePerSession){var e=m.getSessionDate(a.name,c);if(m.setSessionDate(a.name,c),(new Date).getTime()-m.HALFHOUR>e)return g(\"Integration [\"+a.name+\"]: data has already been sent this session\"),m.resolve(b,a),!0}if(a.redirect){var f=function(){var a=c.getElements();for(var b in a)return!0;return!1}();return f?c.isDefault()?!0:m.setRedirectData(a.name,c)?(m.resolve(b,a),!0):m.errors.failedToSaveRedirectData:(a.campaignExperience=m.getRedirectData(a.name,c),a.campaignExperience=m.formatCampaignExperience(a.campaignExperience),m.removeRedirectData(a.name,c),a.campaignExperience?!0:m.errors.noRedirectCampaignData)}return!0},setFailTimeout:function(a,b){!function(b){setTimeout(function(){setTimeout(function(){return\"pending\"===b.state()?m.reject(b,\"Integration timed out after \"+a.timeout+\"ms\"):void 0},0)},a.timeout+1)}(b)},isValidAttributeMap:function(a){if(!a)return\"Missing required attributeMap parameter\";if(!e(a)||!Object.keys(a).length)return\"The attributeMap parameter is empty or not an object\";for(var b in a){var c=a[b];if(\"string\"!=typeof b||!/^[a-zA-Z]+/.test(b))return\"Invalid attribute name in the attributeMap\";if(!e(c))return\"attributeMap values must be stored in an object\";if(!Object.keys(c).length)return\"attributeMap attribute object is empty\";for(var d in c)if(!/^\\w+$/.test(d)&&\"default\"!==d)return\"Invalid attribute ID in attributeMap\"}return!0},check:function(a){var c=new Deferred,d=!1;return function e(){var f=a.check.call(this,a);return b(f)?void setTimeout(function(){f.done(function(){return c.resolve()}).fail(function(a){return c.reject(a)})},0):f?void setTimeout(function(){c.resolve()},0):void(d||setTimeout(e,a.interval))}(),setTimeout(function(){d=!0},a.timeout),c.promise()},exec:function(a){var c=new Deferred,d=a.exec.call(this,a);return b(d)?(setTimeout(function(){d.done(function(a){return c.resolve(a)}).fail(function(a){return c.reject(a)})},0),c.promise()):(d===!0?m.resolve(c,a.result):m.reject(c,d),c.promise())}};return{register:a,run:i,setDefaults:j,get:k}}function b(a){return e(a)&&c(a.then)}function c(a){return\"function\"==typeof a}function d(a){return\"number\"==typeof a&&a>0}function e(a){return\"object\"==typeof a&&!!a}function f(){return!0}function g(a){window.mm_error=window.mm_error||\"\",window.mm_error+=a+\"\\n\"}function h(a,b){a=e(a)?a:{},b=e(b)?b:{};var c={};for(var d in b)c[d]=b[d];for(var f in a)c[f]=a[f];return c}if(\"object\"==typeof modules&&\"function\"==typeof modules.define){var i={autoDefine:!0,singleton:!0};modules.define(\"Integrations\",i,a)}else modules={require:function(){return new a}}}();","Order":-100,"HighLevelApiVersion":"1.12"},{"Name":"IM_AdobeAnalytics","Type":"script","Attrs":{"type":"text/javascript"},"Data":"/*!\n *\tAdobeAnalytics 1.1.0\n *\t-- Maxymiser Adobe Analytics integration\n *\t-- https://gitlab.com/maxymiser-integrations/AdobeAnalytics/raw/master/src/AdobeAnalytics.min.js\n *\t-- git+ssh://git@gitlab.com/maxymiser-integrations/AdobeAnalytics.git\n *\t-- Built on 2015-12-11\n */\n!function(){var a={version:\"1.1.0\",validate:function(a){return a.eVar&&!b.isNumber(a.eVar)?b.errors.invalidEvar(a.eVar):a.prop&&!b.isNumber(a.prop)?b.errors.invalidProp(a.prop):a.sVariable&&!b.isSVariable(a.sVariable)?b.errors.invalidSVariable(a.sVariable):b.getParams(a).length?a.trackingServer?!0:b.errors.missingTrackingServer:b.errors.missingParameters},oncePerSession:!1,campaignRequired:!0,check:function(a){var c=b.getSVariable(a.sVariable);return c&&c.trackingServer===a.trackingServer},timeout:7e3,exec:function(a){return a.sync?(b.populateSyncData(a),!0):b.send(a)}},b={errors:{missingParameters:\"The `eVar` and/or `prop` option are required and missing\",invalidEvar:function(a){return\"Invalid eVar provided [\"+(a||\"\").toString()+\"]\"},invalidProp:function(a){return\"Invalid prop provided [\"+(a||\"\").toString()+\"]\"},invalidSVariable:function(a){return\"Invalid sVariable provided [\"+(a||\"\").toString()+\"] (must be `string` or `s object`)\"},missingTrackingServer:function(){return\"Missing trackingServer option\"}},isSVariable:function(a){return\"string\"==typeof a?/^\\w+/.test(a):\"object\"==typeof a?b.isSObject(a):!1},isSObject:function(a){return\"object\"==typeof a&&\"function\"==typeof a.t},getSVariable:function(a){return a&&\"string\"!=typeof a?b.isSObject(a)?a:!1:b.isSObject(window[a||\"s\"])?window[a||\"s\"]:!1},isNumber:function(a){return a&&(+a).toFixed(0)>0},send:function(a){var c=b.getParams(a),d=b.getSVariable(a.sVariable);d.linkTrackVars=c.join(\",\");for(var e=0;e<c.length;e++)d[c[e]]=a.campaign.getName()+\"=\"+a.campaignExperience;return d.tl(!0,\"o\",\"Maxymiser \"+(a.isProduction?\"Live\":\"QA\")),!0},getParams:function(a){var b=[];return a.eVar&&b.push(\"eVar\"+a.eVar),a.prop&&b.push(\"prop\"+a.prop),b},populateSyncData:function(a){var c=b.getParams(a);window.mm_adobe_data=window.mm_adobe_data||{};for(var d=c.length;d--;)window.mm_adobe_data[c[d]]=a.campaignExperience}};\"object\"==typeof modules&&\"function\"==typeof modules.define&&modules.require(\"Integrations\").register(\"Adobe Analytics\",a)}();","Order":-90,"HighLevelApiVersion":"1.12"},{"Name":"IM_HotJar","Type":"script","Attrs":{"type":"text/javascript"},"Data":"(function() {\n    var HotJar = {\n        version: '0.0.1',\n\n        campaignRequired: true,\n      \n        validate: function(integration){\n            return true;\n        },\n\n        check: function(integration){\n            return window.hj && typeof window.hj === 'function';\n        },\n    \n        timeout: 7000,\n      \n        exec: function(integration){\n            var mode = integration.isProduction ? 'MM_Prod_' : 'MM_QA_',\n                name = mode + integration.campaign.getName(),\n                experience = integration.campaignExperience;\n\n            var tagNames = window.tagNames || [];\n            tagNames.push('MMCampaign: ' + name);\n            tagNames.push('MMExperience: ' + experience);\n\n            hj('ready', function () {\n                hj('tagRecording', tagNames);\n            });\n\n            return true;\n        }\n    };    \n    if (typeof modules === 'object' && typeof modules.define === 'function') {\n        modules.require('Integrations').register('HotJar', HotJar);\n    }\n})();","Order":-90,"HighLevelApiVersion":"1.12"},{"Name":"IM_Defaults","Type":"script","Attrs":{"type":"text/javascript"},"Data":"Integrations.setDefaults('Adobe Analytics', {\n\ttrackingServer: 'stats.economist.com',\n\tclientID: 'economistcomprod',\n\teVar: 51,\n\tprop: 51\n});","Order":-80,"HighLevelApiVersion":"1.12"},{"Name":"Module_Refreshed","Type":"script","Attrs":{"type":"text/javascript"},"Data":"/**\n * Detect page refreshes to prevent multiple false action tracking\n * mmAPI module\n *\n * @author Rafal‚ Maksymiuk (rafal.maksymiuk@gmail.com)\n * @date 23.11.2015\n */\n// https://gitlab.com/maxymiser-emea-travel-utils/cdapi-module-refreshed/blob/master/Module_Refreshed.js    \n\nmodules.define( 'Refreshed', { autoDefine: false, singleton: true }, function(){\n    \n    var sec = 5;\n    var cookie = 'pageRefreshed';\n    var initialised = false;\n    \n    /**\n     * Simple hashing function, to prevent storing to large strings in cookie\n     * \n     * @param {String} input hashed string\n     * @returns {String} hash\n     */\n    function hashCode( input ){\n        var hash = 0;\n        var char;\n        var i;\n\n        if ( input.length == 0 ) return hash;\n\n        for ( i = 0; i < input.length; i++ ) {\n            char = input.charCodeAt( i );\n            hash = ( ( hash << 5 ) - hash ) + char;\n            hash = hash & hash; // Convert to 32bit integer\n        }\n\n        return hash.toString();\n    }\n    \n    \n    /**\n     * Function for patching unload callbacks\n     */        \n    function exitEvent(){\n        cookies.set( 'mm_' + cookie, hashCode( encodeURI( location.href ) ), { expires: sec / (24 * 60 * 60)} );\n    }    \n\n    /**\n     * Init refreshed\n     */\n    function init(){\n        window.addEventListener( 'beforeunload', exitEvent );\n        window.addEventListener( 'unload', exitEvent );\n        window.addEventListener( 'pagehide', exitEvent );\n        \n        initialised = true;\n    };\n\n    /**\n     * Change default timeout\n     * \n     * @param {Number} [timeout] timeout to treat page load as refresh\n     */\n    this.setRefreshTimeout = function( timeout ){\n        if ( timeout ){\n            sec = timeout;\n        }\n    };\n      \n    /**\n     * Return refreshed page state\n     *\n     * @return {boolean} was page refreshed\n     */\n    this.isRegularLoad = function(){\n\n        //it can be only initialised once on current page\n        if ( !initialised ){\n            init();\n        }\n        return ( cookies.get( 'mm_' + cookie) !== hashCode( encodeURI( location.href )));\n    };\n      \n});","Order":-50,"HighLevelApiVersion":"1.12"},{"Name":"Act_ReturnVisit","Type":"script","Attrs":{"type":"text/javascript"},"Data":"// Action:\n//   ReturnVisit\n\n// Cookies\n//   mm_return_visit (180)\n//   mm_Session (0)\n\nvar restoreMMCoreCookies = function(cookiesArray) {\n\n\tvar cookieInfoObject;\n\tvar cookieName;\n\tvar cookieExpiration;\n\tvar cookieValue;\n\n\n\tfor (var i = 0; i < cookiesArray.length; i++) {\n\n\t\tcookieInfoObject = cookiesArray[i];\n\n\t\tcookieName = cookieInfoObject.name;\n\t\tcookieExpiration = cookieInfoObject.expires;\n\n\t\tcookieValue = cookies.get(cookieName);\n\n\t\tif (typeof cookieValue !== 'undefined') {\n\t\t\tvisitor.setData(cookieName, cookieValue, cookieExpiration);\n\t\t\tcookies.remove(cookieName);\n\t\t}\n\n\t}\n\n};\n\n// Restore mmcore cookies\nrestoreMMCoreCookies([\n\t{\n\t\t'name': 'mm_return_visit',\n\t\t'expires': 180\n\t}, {\n\t\t'name': 'mm_Session',\n\t\t'expires': 0\n\t}\n]);\n\n;(function act_ReturnVisits() {\n\tvar COOKIE_NAME = 'mm_return_visit';\n\tif (!visitor.getData('mm_Session')) {\n\t\tsetTimeout(function() { // wait all requests\n\t\t\tvar visitNum = 1 + Number(visitor.getData(COOKIE_NAME) || 0);\n\t\t\tif (!isNaN(visitNum)) {\n\t\t\t\tvisitor.setData(COOKIE_NAME, visitNum, 180);\n\t\t\t\tactions\n\t\t\t\t\t.set('ReturnVisit', 1, 'Visit' + visitNum)\n\t\t\t\t\t.send();\n\t\t\t}\n\t\t}, 2000);\n\t}\n}());","Order":-15,"HighLevelApiVersion":"1.12"},{"Name":"PCs_WholeSite","Type":"script","Attrs":{"type":"text/javascript"},"Data":"// PCs:\n//   RegwallViews\n//   SubwallViews\n//   LogInState\n//   Subscriber\n//   RegState\n//   ClickDepth\n//   Recency\n//   Loyalty\n//   Interaction\n//   Brand\n//   SignedIn\n//   VEI\n//   Referrer\n//   Entry\n//   SiteVersion\n//   OptlyEconomist\n\n// Client Cookies:\n//   ec_omniture_user_sub\n//   Econ.user.user\n//   ec_device\n//   optly_economist_test\n\n// MM Cookies:\n//   mm_RegwallViews (1)\n//   mm_SubwallViews (1)\n//   mm_Session (0)\n//   mm_PCObj (365)\n//   mm_entry_session (0)\n\n\n// Old storage coverage after CDAPI migration\nvar restoreMMCoreData = function() {\n\n\tvar restoreMMCorePCs = function () {\n\n\t\tvar oldPCsList = cookies.get('mm_pc');\n\t\tvar oldPCsArray = (oldPCsList ? oldPCsList.split('&') : []);\n\t\tvar pcValue, pcName;\n\t\tvar l = oldPCsArray.length;\n\n\t\tfor (var i = 0; i < l; i++) {\n\t\t\tpcName = oldPCsArray[i].split('=')[0];\n\t\t\tpcValue = oldPCsArray[i].split('=')[1];\n\t\t\tif (pcName && pcValue) {\n\t\t\t\tvisitor.storeAttr(pcName, pcValue);\n\t\t\t}\n\t\t}\n\n\t\tcookies.remove('mm_pc');\n\n\t};\n\n\tvar restoreMMCoreCookies = function(cookiesArray) {\n\n\t\tvar cookieInfoObject;\n\t\tvar cookieName;\n\t\tvar cookieExpiration;\n\t\tvar cookieValue;\n\n\n\t\tfor (var i = 0; i < cookiesArray.length; i++) {\n\n\t\t\tcookieInfoObject = cookiesArray[i];\n\n\t\t\tcookieName = cookieInfoObject.name;\n\t\t\tcookieExpiration = cookieInfoObject.expires;\n\n\t\t\tcookieValue = cookies.get(cookieName);\n\n\t\t\tif (typeof cookieValue !== 'undefined') {\n\t\t\t\tvisitor.setData(cookieName, cookieValue, cookieExpiration);\n\t\t\t\tcookies.remove(cookieName);\n\t\t\t}\n\n\t\t}\n\n\t};\n\n\t// Restore mmcore PCs\n\trestoreMMCorePCs();\n\n\t// Restore mmcore cookies\n\trestoreMMCoreCookies([\n\t\t{\n\t\t\t'name': 'mm_RegwallViews',\n\t\t\t'expires': 1\n\t\t}, {\n\t\t\t'name': 'mm_SubwallViews',\n\t\t\t'expires': 1\n\t\t}, {\n\t\t\t'name': 'mm_PCObj',\n\t\t\t'expires': 365\n\t\t}, {\n\t\t\t'name': 'mm_Session',\n\t\t\t'expires': 0\n\t\t}, {\n\t\t\t'name': 'mm_entry_session',\n\t\t\t'expires': 0\n\t\t}\n\t]);\n\n};\n\n// Restore mmcore data as soon as possible\nrestoreMMCoreData();\n\nvar logInState = cookies.get('ec_uid') ? 'LoggedIn' : 'LoggedOut';\nvisitor.storeAttr('LogInState', logInState);\n\n/*\nif(!window.jQuery){\n    return false;\n}\n\nvar $ = window.jQuery;\n\nvar ecOmnitureUserSubCookie = cookies.get('ec_omniture_user_sub') || '';\nvar subscriber;\n\nvar regState = 'NotRegistered';\n\n\nfunction getPaywallPersCritVal(val, type) {\n\tswitch (val.toString()) {\n\t\tcase '1':\n\t\t\treturn type + '1';\n\n\t\tcase '2':\n\t\t\treturn type + '2';\n\n\t\tcase '3':\n\t\t\treturn type + '3';\n\n\t\tcase '4':\n\t\t\treturn type + '4';\n\n\t\tcase '5':\n\t\t\treturn type + '5';\n\n\t\tcase '6':\n\t\tcase '7':\n\t\t\treturn type + '6-7';\n\n\t\tcase '8':\n\t\tcase '9':\n\t\t\treturn type + '8-9';\n\n\t\tcase '10':\n\t\tdefault:\n\t\t\treturn type + '10plus';\n\t}\n}\n\nfunction handlePaywall(paywallName) {\n\tvar oldCookieVal,\n\t\tnewCookieVal,\n\t\ttype;\n\n\toldCookieVal = visitor.getData('mm_' + paywallName);\n\toldCookieVal = parseInt(oldCookieVal, 10);\n\ttype = paywallName.substring(0, 3);\n\n\tif (!oldCookieVal) {\n\t\toldCookieVal = 0;\n\t}\n\n\tnewCookieVal = oldCookieVal + 1;\n\n\tvisitor.setData('mm_' + paywallName, newCookieVal, 1);\n\tvisitor.storeAttr(paywallName, getPaywallPersCritVal(newCookieVal, type));\n}\n\nfunction setPaywallPersCrit() {\n\tvar val;\n\n\ttry {\n\t\tval = window.Drupal.settings.ec_wallpage.ec_wallpage_paywall_name.toLowerCase();\n\t\tif (val === 'article paywall anonymous') {\n\t\t\thandlePaywall('RegwallViews');\n\t\t} else if (val === 'article paywall registered') {\n\t\t\thandlePaywall('SubwallViews');\n\t\t}\n\t} catch (err) { /!* silence *!/ }\n}\n\nswitch (true) {\n\t/!*case 'bulk-ip':\n\t\tsubscriber = 'BulkIP';\n\t\tbreak;\n\n\tcase 'bulk-referrer':\n\t\tsubscriber = 'BulkReferrer';\n\t\tbreak;\n\n\tcase 'subscriber':\n\t\tsubscriber = 'DigitalPrint';\n\t\tbreak;\n\n\tcase 'print-subscriber':\n\t\tsubscriber = 'Print';\n\t\tbreak;\n\n\tcase 'digital-subscriber':\n\t\tsubscriber = 'Digital';\n\t\tbreak;\n\t*!/\n\tcase (ecOmnitureUserSubCookie.toLowerCase().indexOf('ex-subscriber') !== -1):\n\tcase (ecOmnitureUserSubCookie.toLowerCase().indexOf('registered') !== -1 ||\n\tecOmnitureUserSubCookie.toLowerCase().indexOf('user_register') !== -1):\n\t\tregState = 'Registered';\n\t\tsubscriber = 'NotSubscribed';\n\t\tbreak;\n\tcase (!ecOmnitureUserSubCookie):\n\t\tsubscriber = 'NotSubscribed';\n\t\tbreak;\n\tdefault:\n\t\tsubscriber = 'Subscribed';\n\t\tbreak;\n}\n\n\nvisitor.storeAttr('Subscriber', subscriber);\nvisitor.storeAttr('RegState', regState);\nsetPaywallPersCrit();\n\n\n// -----------------------------------\n// New Pers Criterions\n// -----------------------------------\n(function() {\n\tvar obj, PCs, temp, nowTime, filterAfterPoint;\n\n\tPCs = {\n\t\tClickDepth: 0,\n\t\tRecency: 0,\n\t\tLoyalty: 0,\n\t\tBrand: 0,\n\t\tInteraction: 0,\n\t\tSignedIn: 0\n\t};\n\n\tobj = visitor.getData('mm_PCObj');\n\n\tfilterAfterPoint = function(number) {\n\t\tnumber = Math.round(number * 100) * 0.01;\n\t\tnumber = (function() {\n\t\t\tswitch (true) {\n\t\t\t\tcase number < 0.05:\n\t\t\t\t\treturn 0;\n\t\t\t\tcase number < 0.15:\n\t\t\t\t\treturn 0.1;\n\t\t\t\tcase number < 0.25:\n\t\t\t\t\treturn 0.2;\n\t\t\t\tcase number < 0.35:\n\t\t\t\t\treturn 0.3;\n\t\t\t\tcase number < 0.45:\n\t\t\t\t\treturn 0.4;\n\t\t\t\tcase number < 0.55:\n\t\t\t\t\treturn 0.5;\n\t\t\t\tcase number < 0.65:\n\t\t\t\t\treturn 0.6;\n\t\t\t\tcase number < 0.75:\n\t\t\t\t\treturn 0.7;\n\t\t\t\tcase number < 0.85:\n\t\t\t\t\treturn 0.8;\n\t\t\t\tcase number < 0.95:\n\t\t\t\t\treturn 0.9;\n\t\t\t\tdefault:\n\t\t\t\t\treturn 1;\n\t\t\t}\n\t\t}());\n\n\t\treturn number;\n\t};\n\n\tif (obj) {\n\t\tobj = JSON.parse(obj);\n\t} else {\n\t\tobj = {\n\t\t\twFV: false,\n\t\t\tsD: [],\n\t\t\tss: [],\n\t\t\tcD: 0\n\t\t};\n\t}\n\n\tif (!visitor.getData('mm_Session')) {\n\n\t\tvisitor.setData('mm_Session', 1, 0);\n\n\t\ttemp = {\n\t\t\tt: new Date().getTime(),\n\t\t\tr: 0,\n\t\t\ti: 0,\n\t\t\ts: 0\n\t\t};\n\n\t\ttry {\n\t\t\tif (JSON.parse(cookies.get('Econ.user.user')).name) {\n\t\t\t\ttemp.s = 1;\n\t\t\t}\n\t\t} catch (e) {}\n\n\t\tif (document.referrer) {\n\t\t\ttemp.r = 1;\n\t\t}\n\t\tobj.ss.push(temp);\n\n\t\tif (obj.wFV) {\n\t\t\tobj.sD.push(obj.cD);\n\t\t\tobj.cD = 0;\n\t\t}\n\t} else {\n\t\tobj.cD += 1;\n\t}\n\n\tobj.wFV = 1;\n\n\tif (location.href.indexOf('/comments') + 1) {\n\t\tobj.ss[obj.ss.length - 1].i = 1;\n\t}\n\n\t// is it first visit\n\tif (obj.sD.length) {\n\t\t// -----------------------------------\n\t\t// ClickDepth\n\t\t// -----------------------------------\n\t\ttemp = 0;\n\t\t$.each(obj.sD, function(idx, val) {\n\t\t\tif (val < 4) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttemp += 1;\n\t\t});\n\n\t\ttemp = temp / obj.sD.length;\n\t\tPCs.ClickDepth = temp;\n\t\ttemp = filterAfterPoint(temp);\n\t\tvisitor.storeAttr('ClickDepth', 'Ci' + temp);\n\n\t\t// -----------------------------------\n\t\t// Recency\n\t\t// -----------------------------------\n\t\ttemp = 1;\n\t\tif (obj.ss.length > 1) {\n\t\t\ttemp = 0;\n\t\t\ttemp = obj.ss.slice(-2);\n\t\t\ttemp = (temp[1].t - temp[0].t) / (1000 * 60 * 60 * 24);\n\t\t\tif (temp < 1) {\n\t\t\t\ttemp = 1;\n\t\t\t}\n\t\t}\n\t\ttemp = 1 / temp;\n\t\tPCs.Recency = temp;\n\t\ttemp = filterAfterPoint(temp);\n\t\ttemp = 'Ri' + temp;\n\t\tvisitor.storeAttr('Recency', temp);\n\n\t\t// -----------------------------------\n\t\t// Loyalty\n\t\t// -----------------------------------\n\t\ttemp = 0;\n\t\tnowTime = new Date().getTime();\n\t\t$.each(obj.ss, function(idx, val) {\n\t\t\tvar difference = (nowTime - val.t) / (1000 * 60 * 60 * 24);\n\t\t\tif (difference > 28) {\n\t\t\t\treturn; }\n\t\t\t//\t\t\t\tvar difference = (nowTime - val.t) / (1000 * 60);\n\t\t\t//\t\t\t\tif ( difference > 30 ) { return; }\n\t\t\ttemp += 1;\n\t\t});\n\t\tif (!temp) { temp = 1; }\n\t\ttemp = 1 - 1 / temp;\n\t\tPCs.Loyalty = temp;\n\t\ttemp = filterAfterPoint(temp);\n\t\tvisitor.storeAttr('Loyalty', 'Li' + temp);\n\n\t\t// -----------------------------------\n\t\t// Interaction\n\t\t// -----------------------------------\n\t\ttemp = 0;\n\t\t$.each(obj.ss, function(idx, val) {\n\t\t\tif (obj.ss.length - 1 === idx) {\n\t\t\t\treturn; }\n\t\t\tif (!val.i) {\n\t\t\t\treturn; }\n\t\t\ttemp += 1;\n\t\t});\n\t\ttemp = temp / (obj.ss.length - 1);\n\t\tPCs.Interaction = temp;\n\t\ttemp = filterAfterPoint(temp);\n\t\tvisitor.storeAttr('Interaction', 'Ii' + temp);\n\t} else {\n\t\tvisitor.storeAttr('ClickDepth', 'New');\n\t\tvisitor.storeAttr('Recency', 'New');\n\t\tvisitor.storeAttr('Loyalty', 'New');\n\t\tvisitor.storeAttr('Interaction', 'New');\n\t}\n\n\t// -----------------------------------\n\t// Brand\n\t// -----------------------------------\n\ttemp = 0;\n\t$.each(obj.ss, function(idx, val) {\n\t\tif (val.r) {\n\t\t\treturn; }\n\t\ttemp += 1;\n\t});\n\ttemp = temp / obj.ss.length;\n\tPCs.Brand = temp;\n\ttemp = filterAfterPoint(temp);\n\tvisitor.storeAttr('Brand', 'Bi' + temp);\n\n\t// -----------------------------------\n\t// SignedIn\n\t// -----------------------------------\n\ttemp = 0;\n\tif (obj.ss.length > 0) {\n\t\t$.each(obj.ss, function(idx, val) {\n\t\t\tif (!val.s) {\n\t\t\t\treturn; }\n\t\t\ttemp += 1;\n\t\t});\n\t\ttemp = temp / obj.ss.length;\n\t}\n\ttemp = filterAfterPoint(temp);\n\tPCs.SignedIn = temp;\n\tvisitor.storeAttr('SignedIn', 'Si' + temp);\n\n\tif (obj.sD.length) {\n\t\t// -----------------------------------\n\t\t// VEI\n\t\t// -----------------------------------\n\t\ttemp = 0;\n\t\t$.each(PCs, function(idx, val) {\n\t\t\tif (val) {\n\t\t\t\ttemp += val;\n\t\t\t}\n\t\t});\n\t\ttemp = filterAfterPoint(temp / 6);\n\t\tvisitor.storeAttr('VEI', 'VEI' + temp);\n\t} else {\n\t\tvisitor.storeAttr('VEI', 'New');\n\t}\n\n\tobj.sD = obj.sD.slice(obj.sD.length - 25, obj.sD.length);\n\tobj.ss = obj.ss.slice(obj.ss.length - 25, obj.ss.length);\n\n\tvisitor.setData('mm_PCObj', JSON.stringify(obj), 365);\n\n}());\n\n/!*\n * Referrer\n * *!/\n\nvar drf = document.referrer;\nswitch (true) {\n\t// referrer contains terms: ?yahoo?, ?google? or ?bing?\n\t// THEN set PC [Referrer] = Search\n\tcase drf === \"\":\n\t\t{\n\t\t\tvisitor.storeAttr('Referrer', 'TypedBM');\n\t\t\tbreak;\n\t\t}\n\tcase !!drf.match(/^https?:\\/\\/[^?\\/]*(yahoo|google|bing)\\.\\w{1,3}(\\.\\w{2})?/i):\n\t\t{\n\t\t\tvisitor.storeAttr('Referrer', 'Search');\n\t\t\tbreak;\n\t\t}\n\tcase !!drf.match(/^https?:\\/\\/[^?\\/]*(facebook|reddit|digg)\\.\\w{1,3}(\\.\\w{2})?/i) || !!drf.match(/^https?:\\/\\/t\\.co\\/\\w+/i):\n\t\t{\n\t\t\tvisitor.storeAttr('Referrer', 'Social');\n\t\t\tbreak;\n\t\t}\n\tcase !drf.match(/^https?:\\/\\/[^?\\/]*economist.com/i):\n\t\t{\n\t\t\tvisitor.storeAttr('Referrer', 'External');\n\t\t\tbreak;\n\t\t}\n\tcase !!drf.match(/^https?:\\/\\/[^?\\/]*economist.com/i):\n\t\t{\n\t\t\tvisitor.storeAttr('Referrer', 'Internal');\n\t\t\tbreak;\n\t\t}\n\tdefault:\n\t\t{\n\t\t\tvisitor.storeAttr('Referrer', 'TypedBM');\n\t\t}\n}\n\n/!*\n * Referrer [end]\n * *!/\n\n/!*\n * Entry\n * *!/\n(function() {\n\tvar wlh = window.location.href,\n\t\tentryAttr = null,\n\t\t$mediator = $({});\n\n\tvar checkIsCategory = function($body) {\n\t\tvar isCategory = false,\n\t\t\tclassNames = [\n\t\t\t\t'page-all-blogs',\n\t\t\t\t'node-type-mtblog-site',\n\t\t\t\t//'page-latest-updates',\n\t\t\t\t'page-sections',\n\t\t\t\t'path-printedition-specialreports',\n\t\t\t\t//'node-type-channel',\n\t\t\t\t//'node-type-guest-network-forum',\n\t\t\t\t//'page-economics-a-to-z',\n\t\t\t\t'node-type-special-report',\n\t\t\t\t'page-topics' //,\n\t\t\t\t//'node-type-page',\n\t\t\t\t//'node-type-guest-network-forum',\n\t\t\t\t//'node-type-issue'\n\t\t\t];\n\n\t\t$.each(classNames, function(index, className) {\n\t\t\tif ($body.hasClass(className)) {\n\t\t\t\tisCategory = true;\n\t\t\t}\n\t\t});\n\n\t\treturn isCategory;\n\t};\n\n\tvar checkIsBlogArticle = function() {\n\t\treturn Boolean(wlh.match(/https?:\\/\\/www\\.economist\\.com\\/blogs.*!/i));\n\t};\n\n\tvar runWaiter = function() {\n\t\tvar $body = $('body');\n\n\t\tif ($body.length) {\n\t\t\tentryAttr = (function() {\n\t\t\t\tvar isCategory = checkIsCategory($body);\n\n\t\t\t\tswitch (true) {\n\t\t\t\t\tcase $body.hasClass('node-type-article'):\n\t\t\t\t\t\treturn 'Article';\n\n\t\t\t\t\tcase isCategory:\n\t\t\t\t\t\treturn 'Category';\n\n\t\t\t\t\tcase !isCategory && checkIsBlogArticle():\n\t\t\t\t\t\treturn 'Blogs';\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn 'Blank';\n\t\t\t\t}\n\t\t\t})();\n\t\t\t$mediator.trigger('finishWait');\n\t\t} else {\n\t\t\tsetTimeout(runWaiter, 19);\n\t\t}\n\t};\n\n\tif (/https?:\\/\\/www\\.economist\\.com(\\/|#.*|\\?.*|\\/#.*|\\/\\?.*)?$/i.test(wlh)) {\n\t\tentryAttr = 'Homepage';\n\t} else if (/https?:\\/\\/subscriptions\\.economist\\.com.*!/i.test(wlh)) {\n\t\tentryAttr = 'SubsPage';\n\t} else {\n\t\trunWaiter();\n\t}\n\n\n\t//set PC entry only once per session\n\tif (!visitor.getData('mm_entry_session')) {\n\t\tif (entryAttr === null) {\n\t\t\t$mediator.bind('finishWait', function() {\n\t\t\t\tvisitor.storeAttr('Entry', entryAttr);\n\t\t\t\tvisitor.setData('mm_entry_session', entryAttr, 0);\n\t\t\t});\n\t\t} else {\n\t\t\tvisitor.storeAttr('Entry', entryAttr);\n\t\t\tvisitor.setData('mm_entry_session', entryAttr, 0);\n\t\t}\n\t} else {\n\t\tvisitor.storeAttr('Entry', visitor.getData('mm_entry_session'));\n\t}\n})();\n\n\n// Detecting site version (Mobile or Desktop) Andrey Cherepovskiy 4 Nov 2014\n(function() {\n\n\tvar siteVersionAttr = 'Desktop';\n\n\tif (cookies.get('ec_device') === 'mobile-phone' || navigator.userAgent.toLowerCase().indexOf('iphone') !== -1) {\n\n\t\tsiteVersionAttr = 'Mobile';\n\n\t}\n\n\tvisitor.storeAttr('SiteVersion', siteVersionAttr);\n\n\n})();\n\n/!*\n * optlyEconomist added on 30.04.2015 by Yuliya Pshinko\n * *!/\nif (cookies.get('optly_economist_test') === 'true') {\n\tvisitor.storeAttr('OptlyEconomist', 'True');\n} else {\n\tvisitor.storeAttr('OptlyEconomist', 'False');\n}*/\n","Order":-10,"HighLevelApiVersion":"1.12"},{"Name":"Acts_MobileGlobal","Type":"script","Attrs":{"type":"text/javascript"},"Data":"// Track subscriptions with a product breakdown.\n// Assign attributes based on product bought.\n\n// Actions:\n//   Subscriptions\n\n// Cookies:\n//   mm-subs (1)\n//   MobLogin_clicked (0)\n//   mm-logged-in-state (365)\n//   mm-mob-subs-arrivals-attr (0)\n//   mm-mob-subs-entry-attr (0)\n\n// Client Cookies:\n//   Econ.user.user\n\nvar restoreMMCoreCookies = function(cookiesArray) {\n\n\tvar cookieInfoObject;\n\tvar cookieName;\n\tvar cookieExpiration;\n\tvar cookieValue;\n\n\n\tfor (var i = 0; i < cookiesArray.length; i++) {\n\n\t\tcookieInfoObject = cookiesArray[i];\n\n\t\tcookieName = cookieInfoObject.name;\n\t\tcookieExpiration = cookieInfoObject.expires;\n\n\t\tcookieValue = cookies.get(cookieName);\n\n\t\tif (typeof cookieValue !== 'undefined') {\n\t\t\tvisitor.setData(cookieName, cookieValue, cookieExpiration);\n\t\t\tcookies.remove(cookieName);\n\t\t}\n\n\t}\n\n};\n\n// Restore mmcore cookies\nrestoreMMCoreCookies([\n\t{\n\t\t'name': 'mm-subs',\n\t\t'expires': 1\n\t}, {\n\t\t'name': 'MobLogin_clicked',\n\t\t'expires': 0\n\t}, {\n\t\t'name': 'mm-logged-in-state',\n\t\t'expires': 365\n\t}, {\n\t\t'name': 'mm-mob-subs-arrivals-attr',\n\t\t'expires': 0\n\t}, {\n\t\t'name': 'mm-mob-subs-entry-attr',\n\t\t'expires': 0\n\t}\n]);\n\nvar $;\n\ntry {\n    $ = window.jQuery || window.tp.jq;\n}\ncatch(err){\n    console.log(err);\n}\n\nif(!$){\n    return false;\n}\n\nvar $document = $(document);\nvar isSubscriptionProcess = window.location.hostname.indexOf('subscriptions.economist.com') !== -1;\nvar isSubscriptionConfirmation = isSubscriptionProcess && window.location.pathname.indexOf('index.php') !== -1;\nvar isPageReloadedByF5 = (visitor.getData('mm-subs') === location.pathname);\n\nvar getPrice = function(priceString) {\n\tvar clearPrices = [];\n\t(priceString || '').toString().replace(/(\\d{1,3}(?:\\D?\\d{3})*(?:\\D(\\d{0,2})|))(?:\\D|$)/gm, function() {\n\t\tvar d = arguments[2];\n\t\tvar zeros = !d ? \"00\" : (d.length === 1 ? \"0\" : \"\");\n\t\tclearPrices.push((arguments[1].replace(/\\D/g, \"\") + zeros) * 1);\n\t});\n\treturn clearPrices;\n};\n\nvar getRevenue = function($holder) {\n\tvar result;\n\tresult = getPrice($holder.text());\n\treturn result;\n};\n\nvar convertValues = function($currencyText, revenue) {\n\tvar exchangeRates, currentRate, finalPrice;\n\n\tcurrentRate = 1; // default value\n\texchangeRates = {\n\t\t'HK$': '0.078754',\n\t\t'US$': '0.610604',\n\t\t'NZ$': '0.500276',\n\t\t'A$': '0.540821',\n\t\t'C$': '0.569724',\n\t\t'S$': '0.482690',\n\t\t'$': '0.610604',\n\t\t'£': '1',\n\t\t'¥': '0.005868',\n\t\t'€': '0.834636',\n\t\t'NZD': '0.500276',\n\t\t'CHF': '0.681384',\n\t\t'CNY': '0.100576',\n\t\t'DKK': '0.111876',\n\t\t'INR': '0.009816',\n\t\t'MYR': '0.186665',\n\t\t'NOK': '0.099609',\n\t\t'PHP': '0.013740',\n\t\t'R': '0.059091',\n\t\t'SEK': '0.093306',\n\t\t'TWD': '0.020469',\n\t\t'W': '0.000577'\n\t};\n\n\t$.each(exchangeRates, function(currencySign, exchangeRate) {\n\t\tif ($currencyText.indexOf(currencySign) > -1) {\n\t\t\tcurrentRate = exchangeRate;\n\t\t\treturn false;\n\t\t}\n\t});\n\n\tfinalPrice = Math.ceil(revenue * currentRate);\n\tfinalPrice = isNaN(finalPrice) ? revenue : finalPrice;\n\n\treturn finalPrice;\n};\n\nvar trackAction = function(actionName, actionValue, attribute) {\n\tactions\n\t\t.set(actionName, actionValue, attribute)\n\t\t.send();\n};\n\nvar getAttrForMobSubsByTypeAction = function() {\n\t/*Attributes should have the following structure: UserProductTerm:\n\n\t First (User) Parameter\n\t Reg - User purchases a regular subscription\n\t Stu - User purchases a student subscription\n\t Gift - User purchases a gift subscription\n\n\t Second (Product) Parameter\n\t PrintDig - User purchases a print and digital subscription\n\t Print - User purchases a print only subscription\n\t Dig - User purchases a digital only subscription\n\n\t Third (Term) Parameter\n\t 12w - User purchases a 12 week subscription\n\t 1y - User purchases a 1 year subscription\n\t 2y - User purchases a 2 year subscription\n\t 3y - User purchases a 3 year subscription\n\t */\n\tvar subType = $('#sub_type_id').val(),\n\t\tuserParam = 'Gift',\n\t\tproductType = $('.css3_labelb:contains(Subscription type)').parent().text().toLowerCase(),\n\t\tproductParam = 'Dig',\n\t\tproductTerm = $('.css3_labelb:contains(Subscription term)').parent().text().toLowerCase(),\n\t\ttermParam = '3y';\n\n\tif (subType === 'personal') {\n\t\tuserParam = 'Reg';\n\t} else if (subType === 'student') {\n\t\tuserParam = 'Stu';\n\t}\n\n\tif (productType.match('print') && productType.match('digital')) {\n\t\tproductParam = 'PrintDig';\n\t} else if (productType.match('print')) {\n\t\tproductParam = 'Print';\n\t}\n\n\tif (productTerm.match('12 weeks')) {\n\t\ttermParam = '12w';\n\t} else if (productTerm.match('1 year')) {\n\t\ttermParam = '1y';\n\t} else if (productTerm.match('2 year')) {\n\t\ttermParam = '2y';\n\t} else if (productTerm.match('6 months')) {\n\t\ttermParam = '6m';\n\t}\n\n\treturn userParam + productParam + termParam;\n};\n\nvar trackMobLogins = function() {\n\n\tvar mobileLoginWasClicked = visitor.getData('MobLogin_clicked');\n\tvisitor.setData('MobLogin_clicked', '', -1);\n\n\t// For all pages except subscription process\n\tif (!isSubscriptionProcess) {\n\n\t\tif ($ && $.fn.on) {\n\t\t\t$(document).on('click', 'body.econmobile input.ec-button[name=op]', function() {\n\t\t\t\tvisitor.setData('MobLogin_clicked', '1', 0);\n\t\t\t});\n\t\t}\n\n\t\t// Login buttons handling\n\t\tvar userName = JSON.parse(cookies.get('Econ.user.user') || '{\"name\": null}').name;\n\t\tvar prevLoginState = visitor.getData('mm-logged-in-state');\n\n\t\t// Processing \"Logged Out --> Logged In\" journey\n\t\tif (userName && prevLoginState !== userName.toString()) {\n\n\t\t\tvisitor.setData('mm-logged-in-state', userName, 365);\n\n\t\t// Processing \"Any State --> Logged Out\" journey\n\t\t} else if (!userName) {\n\t\t\tvisitor.setData('mm-logged-in-state', '', -1);\n\t\t}\n\n\t}\n\n};\n\nvar trackMobsSubsArrivals = function() {\n\n\t// For all pages except subscription process\n\tvar isOrderInfoPage = $('.css3_labelb:contains( Order tracking number)').length;\n\n\tif (!isSubscriptionProcess && $document.delegate) {\n\n\t\t$document.delegate('#paybarrier_subscription_link', 'click', function() {\n\n\t\t\tvar attr = '',\n\t\t\t\tpaywallName = '';\n\n\t\t\tif (\n\t\t\t\twindow.Drupal &&\n\t\t\t\twindow.Drupal.settings &&\n\t\t\t\twindow.Drupal.settings.ec_wallpage &&\n\t\t\t\twindow.Drupal.settings.ec_wallpage.ec_wallpage_paywall_name\n\t\t\t) {\n\n\t\t\t\tpaywallName = window.Drupal.settings.ec_wallpage.ec_wallpage_paywall_name;\n\n\t\t\t\tif (paywallName === 'Article Paywall Anonymous') {\n\t\t\t\t\tattr = 'Regwall';\n\t\t\t\t} else if (paywallName === 'Article Paywall Registered') {\n\t\t\t\t\tattr = 'Subwall';\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tvisitor.setData('mm-mob-subs-arrivals-attr', attr, 0);\n\t\t\tvisitor.setData('mm-mob-subs-entry-attr', attr, 0);\n\t\t});\n\n\t\t$document.delegate('a:contains(Subscribe)', 'touchstart', function() {\n\t\t\tvisitor.setData('mm-mob-subs-arrivals-attr', 'Masthead', 0);\n\t\t\tvisitor.setData('mm-mob-subs-entry-attr', 'Masthead', 0);\n\t\t});\n\n\t\t$document.delegate('#view-subscription', 'touchstart', function() {\n\t\t\tvisitor.setData('mm-mob-subs-arrivals-attr', 'Overlay', 0);\n\t\t\tvisitor.setData('mm-mob-subs-entry-attr', 'Overlay', 0);\n\t\t});\n\n\t\t// For all subscription process pages except confirmation page\n\t} else if (isSubscriptionProcess && !isSubscriptionConfirmation) {\n\n\t\tvar attr = visitor.getData('mm-mob-subs-arrivals-attr') || '';\n\t\tif (window.location.search.indexOf('tagsrc=/GLB/RPWMA') !== -1) {\n\t\t\tattr = 'Regwall';\n\t\t}\n\t\tif (window.location.search.indexOf('tagsrc=/GLB/SPWMA') !== -1) {\n\t\t\tattr = 'Subwall';\n\t\t}\n\n\t\tevents.trigger('MobsSubsArrivals', {\n\t\t\tpath: attr\n\t\t});\n\n\t\tvisitor.setData('mm-mob-subs-arrivals-attr', '', -1);\n\n\t\t//if user came from iframe (regwall or subwall)\n\t\tif (attr === 'Regwall' || attr === 'Subwall') {\n\t\t\tvisitor.setData('mm-mob-subs-entry-attr', attr, 0);\n\t\t}\n\n\t} else {\n\t\t//or thankYouID selector\n\t\tif (isOrderInfoPage) {\n\t\t\tif (!isPageReloadedByF5) {\n\n\t\t\t\tvar subscriptionRevenueHolder = $('.css3_labelb:contains(\"Subscription charge:\")').parent();\n\t\t\t\tvar subscriptionRevenue = getRevenue(subscriptionRevenueHolder)[0] || 0;\n\t\t\t\tvar convertedRevenueValue = convertValues(subscriptionRevenueHolder.text(), subscriptionRevenue);\n\t\t\t\tvar entryAttr = visitor.getData('mm-mob-subs-entry-attr') || '';\n\n\t\t\t\tevents.trigger('MobSubsByEntry', {\n\t\t\t\t\trevenue: convertedRevenueValue,\n\t\t\t\t\tpath: entryAttr\n\t\t\t\t});\n\t\t\t\tif (window.mmcore && mmcore.mediator) {\n\t\t\t\t\tmmcore.mediator.trigger('MobSubsByEntry', {\n\t\t\t\t\t\trevenue: convertedRevenueValue,\n\t\t\t\t\t\tpath: entryAttr\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tactions\n\t\t\t\t\t.set('Subscriptions', convertedRevenueValue, getAttrForMobSubsByTypeAction())\n\t\t\t\t\t.send();\n\n\t\t\t\tvisitor.setData('mm-mob-subs-entry-attr', true, -1);\n\n\t\t\t}\n\t\t}\n\t}\n\tvisitor.setData('mm-subs', location.pathname, 1);\n\n};\n\nevents.domReady(function() {\n\ttry {\n\t\ttrackMobLogins();\n\t\ttrackMobsSubsArrivals();\n\t} catch (error) {\n\t\t// Exception processing\n\t}\n});","Order":-10,"HighLevelApiVersion":"1.12"},{"Name":"Page_ArticlePage","Type":"script","Attrs":{"type":"text/javascript"},"Data":"// Page:\n//   ArticlePage\n\n;(function () {\n\n\twhen(function() {\n\t\treturn (\n\t\t\twindow.utag_data &&\n\t\t\twindow.utag_data.node_type &&\n\t\t\t(\n\t\t\t\twindow.utag_data.node_type === 'article' ||\n\t\t\t\twindow.utag_data.node_type === 'essay' ||\n\t\t\t\twindow.utag_data.node_type === 'mtblog'\n\t\t\t)\n\t\t);\n\t}, function() {\n\t\treturn document.readyState === 'complete';\n\t}).done(function () {\n\t\tvisitor.requestPage('ArticlePage');\n\t});\n\n}());","Order":0,"HighLevelApiVersion":"1.12"},{"Name":"Acts_WholeSite","Type":"script","Attrs":{"type":"text/javascript"},"Data":"// 26.01.2015. Alexander Tytskiy.\n// Actions for successful registration completions\n\n// Actions:\n//      Regwall, Overlay, Comment, Activate, Newsletter\n\n// Cookies:\n//   mm_regComment (0)\n//   mmRegisterTry (0)\n//   mm_regActivate (0)\n//   mm_regNewsletter (0)\n//   mmRWused (0)\n\n// Client Cookies:\n//   ec_omniture_user_sub\n\n\n;(function() {\n\n\tvar restoreMMCoreCookies = function(cookiesArray) {\n\n\t\tvar cookieInfoObject;\n\t\tvar cookieName;\n\t\tvar cookieExpiration;\n\t\tvar cookieValue;\n\n\n\t\tfor (var i = 0; i < cookiesArray.length; i++) {\n\n\t\t\tcookieInfoObject = cookiesArray[i];\n\n\t\t\tcookieName = cookieInfoObject.name;\n\t\t\tcookieExpiration = cookieInfoObject.expires;\n\n\t\t\tcookieValue = cookies.get(cookieName);\n\n\t\t\tif (typeof cookieValue !== 'undefined') {\n\t\t\t\tvisitor.setData(cookieName, cookieValue, cookieExpiration);\n\t\t\t\tcookies.remove(cookieName);\n\t\t\t}\n\n\t\t}\n\n\t};\n\n\t// Restore mmcore cookies\n\trestoreMMCoreCookies([\n\t\t{\n\t\t\t'name': 'mm_regComment',\n\t\t\t'expires': 0\n\t\t}, {\n\t\t\t'name': 'mmRegisterTry',\n\t\t\t'expires': 0\n\t\t}, {\n\t\t\t'name': 'mm_regActivate',\n\t\t\t'expires': 0\n\t\t}, {\n\t\t\t'name': 'mm_regNewsletter',\n\t\t\t'expires': 0\n\t\t}, {\n\t\t\t'name': 'mmRWused',\n\t\t\t'expires': 0\n\t\t}\n\t]);\n\n    var $;\n\n    try {\n    \t$ = window.jQuery || window.tp.jq;\n\t}\n\tcatch(err){\n    \tconsole.log(err);\n\t}\n\n    if(!$){\n        return false;\n    }\n\n    var delegateBody = function(events, selector, handler) {\n\n        if (!$) {\n            return;\n        }\n\n        if ($.fn.live) {\n            $(selector).live(events, handler);\n        } else if ($.fn.on) {\n            $('body').on(events, selector, handler);\n        }\n\n    };\n\n\t$(function() {\n\t\t\n\t\t$(document).ajaxComplete(function(e, xhr, settings) {\n\n\t\t\tvar welcomeHeading;\n\n\t\t\tif ((settings.url.indexOf('/js/ec_wallpage_js_reg_form') !== -1 || settings.url.indexOf('/ec_overlay_reg_form') !== -1) &&\n\t\t\t\txhr.responseText.indexOf('Thank you for registering') !== -1) {\n\n\t\t\t\twelcomeHeading = $('.overlay-header h2').text().toLowerCase().indexOf('welcome to the economist') > -1;\n\n\t\t\t\tevents.trigger('Registrations');\n\t\t\t}\n\t\t});\n\t\t\n\t\tdelegateBody('submit', 'form.context-user_register_comment', function() {\n\t\t\tvisitor.setData('mm_regComment', '1', 0);\n\t\t});\n\n\t\tif (!$('form.context-user_register_comment').length &&\n\t\t\tvisitor.getData('mm_regComment')) {\n\n\t\t\tvisitor.setData('mm_regComment', '', -1);\n\t\t}\n\t});\n\n\tif (visitor.getData('mmRegisterTry') && cookies.get('ec_omniture_user_sub')) {\n\n\t\twhen(function() {\n\t\t\t\treturn $('footer').length;\n\t\t\t}, events.domReady)\n\t\t\t.done(function() {\n\n\t\t\t\tvar isErrorPresent = $('.messages-error').length,\n\t\t\t\t\tisNoErrorField = $('#user-register .form-item-error:visible').size() === 0;\n\n\t\t\t\tif (!isErrorPresent && isNoErrorField) {\n\t\t\t\t\t(function() {\n\t\t\t\t\t\tvar attr = '';\n\t\t\t\t\t\tif (visitor.getData('mm_regActivate')) {\n\t\t\t\t\t\t\tattr = 'Activate';\n\t\t\t\t\t\t} else if (visitor.getData('mm_regNewsletter')) {\n\t\t\t\t\t\t\tattr = 'Newsletter';\n\t\t\t\t\t\t} else if (visitor.getData('mmRWused')) {\n\t\t\t\t\t\t\tattr = 'Regwall';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\t\t\t\t\t}());\n\n\t\t\t\t\tactions.send();\n\n\t\t\t\t\tvisitor.setData('mm_regNewsletter', '', -1);\n\t\t\t\t\tvisitor.setData('mm_regActivate', '', -1);\n\t\t\t\t\tvisitor.setData('mmRegisterTry', '', -1);\n\t\t\t\t\tvisitor.setData('mmRWused', '', -1);\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\t// Logic 2\n\tif (window.location.pathname === '/user/register') {\n\t\t$(function() {\n\n\t\t\tvar NOerrors;\n\n\t\t\tNOerrors = $('#user-register .form-item-error:visible').size() === 0;\n\n\t\t\tsetTimeout(function() {\n\n\t\t\t\t$('#user-register').submit(function() {\n\n\t\t\t\t\tNOerrors = $('#user-register .form-item-error:visible').size() === 0;\n\n\t\t\t\t\tif (NOerrors) {\n\n\t\t\t\t\t\tvisitor.setData('mmRegisterTry', true, 0);\n\n\t\t\t\t\t\tif (location.href.indexOf('destination=newsletters') + 1) {\n\t\t\t\t\t\t\tvisitor.setData('mm_regNewsletter', 1, 0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($('#page-title:contains(Activate digital access)').length) {\n\t\t\t\t\t\t\tvisitor.setData('mm_regActivate', 1, 0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (location.search.indexOf('rp=paywall')> -1) {\n\t\t\t\t\t\t\tvisitor.setData('mmRWused', 1, 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t}, 1000);\n\n\t\t\tif (NOerrors === false) {\n\t\t\t\tvisitor.setData('mm_regNewsletter', '', -1);\n\t\t\t\tvisitor.setData('mm_regActivate', '', -1);\n\t\t\t\tvisitor.setData('mmRegisterTry', '', -1);\n\t\t\t\tvisitor.setData('mmRWused', '', -1);\n\t\t\t}\n\n\t\t});\n\t}\n\n})();","Order":0,"HighLevelApiVersion":"1.12"},{"Name":"Acts_LoginProcess","Type":"script","Attrs":{"type":"text/javascript"},"Data":"// Cookies:\n//   mm_loginForm (7)\n//   mm_socialLogin (365)\n// Client Cookies:\n//   Econ.user.user\n\nvar restoreMMCoreCookies = function(cookiesArray) {\n\n\tvar cookieInfoObject;\n\tvar cookieName;\n\tvar cookieExpiration;\n\tvar cookieValue;\n\n\n\tfor (var i = 0; i < cookiesArray.length; i++) {\n\n\t\tcookieInfoObject = cookiesArray[i];\n\n\t\tcookieName = cookieInfoObject.name;\n\t\tcookieExpiration = cookieInfoObject.expires;\n\n\t\tcookieValue = cookies.get(cookieName);\n\n\t\tif (typeof cookieValue !== 'undefined') {\n\t\t\tvisitor.setData(cookieName, cookieValue, cookieExpiration);\n\t\t\tcookies.remove(cookieName);\n\t\t}\n\n\t}\n\n};\n\n// Restore mmcore cookies set for more than a session\nrestoreMMCoreCookies([\n\t{\n\t\t'name': 'mm_loginForm',\n\t\t'expires': 7\n\t}, {\n\t\t'name': 'mm_socialLogin',\n\t\t'expires': 365\n\t}\n]);\n\nevents.domReady(function() {\n    var $;\n\n    try {\n        $ = window.jQuery || window.tp.jq;\n    }\n    catch(err){\n        console.log(err);\n    }\n\n    if(!$){\n        return false;\n    }\n\n\tvar delegateBody = function(events, selector, handler) {\n\n\t\tif (!$) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ($.fn.live) {\n            $(selector).live(events, handler);\n\t\t} else if ($.fn.on) {\n            $('body').on(events, selector, handler);\n\t\t}\n\n\t};\n\n\tvar userCookieObject,\n\t\tuserAlreadyExists = false;\n\t\n\t// Checking for user already exists\n\ttry {\n\t\tuserCookieObject = JSON.parse(cookies.get('Econ.user.user') || '{}');\n\t\tuserAlreadyExists = userCookieObject.name;\n\t} catch (e) {\n\t\t// Exception processing\n\t}\n\n\n\t// Function gathering cookie for standard login attribute.\n\t// Possible cookie values: Blank, Activate, Comment, Regwall\n\tvar loginAttributeToCookie = function(definiteAttr) {\n\t\tvisitor.setData('mm_loginForm', definiteAttr, 7);\n\t};\n\n\t// Function that binds to all possible standard login events\n\tvar standardLoginAttributeDetection = function() {\n\n\t\t// Covering login forms on \"/user\" pages\n\t\tif (window.location.pathname.indexOf('/user') > -1) {\n\n\t\t\tdelegateBody('click', '#user-login-block input[type=\"submit\"], #user-login input[type=\"submit\"]', function() {\n\n\t\t\t\t// If validation was passed\n\t\t\t\tif (!$(this).closest('form').find('.ec-error-msg').length) {\n\n\t\t\t\t\tif ($('#page-title:contains(Activate digital access)').length) {\n\t\t\t\t\t\tloginAttributeToCookie('Activate');\n\t\t\t\t\t} else if ($('.short-reg-comment-preview').length) {\n\t\t\t\t\t\tloginAttributeToCookie('Comment');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Some unpredictable cases are tracked with blank attribute\n\t\t\t\t\t\tloginAttributeToCookie('Blank');\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t\t// Covering login forms on all other pages\n\t\t} else {\n\t\t\t// Added check on regwall click from test25 (by Andrey Cherepovskiy)\n\t\t\tdelegateBody('click', '.show-login', function() {\n\t\t\t\tif (window.mmcore &&\n\t\t\t\t\tmmcore.T25 &&\n\t\t\t\t\tmmcore.T25.isRegwallLoginClicked) {\n\t\t\t\t\tmmcore.T25.isRegwallLoginClicked = false;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tdelegateBody('submit', 'form[action*=\"www.economist.com/user/login?\"]', function() {\n\n\t\t\t\tif (window.mmcore &&\n\t\t\t\t\tmmcore.T25 &&\n\t\t\t\t\tmmcore.T25.isRegwallLoginClicked) {\n\t\t\t\t\tloginAttributeToCookie('Regwall');\n\t\t\t\t} else {\n\t\t\t\t\tloginAttributeToCookie('Blank');\n\t\t\t\t}\n\n\t\t\t});\n\n\n\n\t\t\t// Added case by Yulis Pshinko to track Regwall attribute from regwall or subwall popups\n\t\t\tif ($.fn.ajaxComplete) {\n\t\t\t\t$(document).ajaxComplete(function(e, xhr, settings) {\n\t\t\t\t\tif (/\\/ec-homepage\\/regov\\/js|\\/js\\/ec_wallpage_js_login_form/.test(settings.url) &&\n\t\t\t\t\t\txhr.responseText.indexOf('You will be redirected shortly.') + 1) {\n\t\t\t\t\t\tloginAttributeToCookie('Regwall');\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t};\n\t\n\t// Function that binds to all possible social links login events\n\tvar socialLinksLoginAttributeDetection = function() {\n\n\t\tif (window.janrain &&\n\t\t\twindow.janrain.engage &&\n\t\t\twindow.janrain.engage.signin &&\n\t\t\twindow.janrain.engage.signin.loginHandler) {\n\n\t\t\tvar _socialLoginHandler = window.janrain.engage.signin.loginHandler;\n\t\t\twindow.janrain.engage.signin.loginHandler = function() {\n\t\t\t\tvisitor.setData('mm_socialLogin', 'true', 365);\n\t\t\t\t_socialLoginHandler.apply(this, arguments);\n\t\t\t};\n\n\t\t} else {\n\n\t\t\t$(document).ajaxComplete(function(event, XMLHttpRequest, ajaxOptions) {\n\t\t\t\tif (ajaxOptions.url.indexOf('/ajax/login') + 1) {\n\n\t\t\t\t\t(function waitForLoginHandler() {\n\n\t\t\t\t\t\tif (window.janrain &&\n\t\t\t\t\t\t\twindow.janrain.engage &&\n\t\t\t\t\t\t\twindow.janrain.engage.signin &&\n\t\t\t\t\t\t\twindow.janrain.engage.signin.loginHandler) {\n\n\t\t\t\t\t\t\tvar _socialLoginHandler = window.janrain.engage.signin.loginHandler;\n\t\t\t\t\t\t\twindow.janrain.engage.signin.loginHandler = function() {\n\t\t\t\t\t\t\t\tvisitor.setData('mm_socialLogin', 'true', 365);\n\t\t\t\t\t\t\t\t_socialLoginHandler.apply(this, arguments);\n\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsetTimeout(waitForLoginHandler, 100);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t})();\n\n\t\t\t\t}\n\t\t\t});\n\n\t\t}\n\n\t};\n\t\n\t// All these checks run on every page load throughout the site\n\t// These two for standard processing\n\tstandardLoginAttributeDetection();\n\t// These two for social links processing\n\tsocialLinksLoginAttributeDetection();\n\n});","Order":0,"HighLevelApiVersion":"1.12"},{"Name":"Cookies_WholeSite","Type":"script","Attrs":{"type":"text/javascript"},"Data":"// Cookies:\n//   mm_attrSubsByEntry (0)\n//   mm_attrSubsByRoute (0)\n//   mm_FPsent (0)\n//   mm_PW (0)\n//   mm_UpsellsAttr (0)\n\n// Client Cookies:\n//   Econ.user.user\n\n;(function($) {\n\n\tif (!$ || !$.fn) {\n\t\treturn;\n\t}\n\n\tvar restoreMMCoreCookies = function(cookiesArray) {\n\n\t\tvar cookieInfoObject;\n\t\tvar cookieName;\n\t\tvar cookieExpiration;\n\t\tvar cookieValue;\n\n\n\t\tfor (var i = 0; i < cookiesArray.length; i++) {\n\n\t\t\tcookieInfoObject = cookiesArray[i];\n\n\t\t\tcookieName = cookieInfoObject.name;\n\t\t\tcookieExpiration = cookieInfoObject.expires;\n\n\t\t\tcookieValue = cookies.get(cookieName);\n\n\t\t\tif (typeof cookieValue !== 'undefined') {\n\t\t\t\tvisitor.setData(cookieName, cookieValue, cookieExpiration);\n\t\t\t\tcookies.remove(cookieName);\n\t\t\t}\n\n\t\t}\n\n\t};\n\n\t// Restore mmcore cookies\n\trestoreMMCoreCookies([\n\t\t{\n\t\t\t'name': 'mm_FPsent',\n\t\t\t'expires': 0\n\t\t}\n\t]);\n\n\tvar delegateBody = function(events, selector, handler) {\n\n\t\tif (!window.jQuery) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (jQuery.fn.live) {\n\t\t\tjQuery(selector).live(events, handler);\n\t\t} else if (jQuery.fn.on) {\n\t\t\tjQuery('body').on(events, selector, handler);\n\t\t}\n\n\t};\n\n\tvar lh = window.location.href;\n\tvar dr = document.referrer;\n\n\tevents.domReady(function() {\n\t\t// -----------------------------------\n\t\t// For action SubsByEntry\n\t\t// -----------------------------------\n\t\tdelegateBody('click', '#overlay-wrapper a[href*=\"subscriptions.economist.com\"]', function() {\n\n\t\t\tif (lh.indexOf('www.economist.com/ec-overlay/init/emptyframe') > -1) {\n\n\t\t\t\tvisitor.setData('mm_attrSubsByEntry', 'Overlay', 0);\n\n\t\t\t} else if (lh.indexOf('www.economist.com/ec-wallpage-js/init/emptyframe') > -1) {\n\n\t\t\t\tvar isLoggedIn;\n\t\t\t\ttry {\n\t\t\t\t\tisLoggedIn = Boolean(JSON.parse(cookies.get('Econ.user.user') || '{}').name);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tisLoggedIn = false;\n\t\t\t\t}\n\n\t\t\t\tif (isLoggedIn) {\n\t\t\t\t\tvisitor.setData('mm_attrSubsByEntry', 'Subwall', 0);\n\t\t\t\t} else {\n\t\t\t\t\tvisitor.setData('mm_attrSubsByEntry', 'Regwall', 0);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t});\n\n\t\tdelegateBody('click', '#subslug-ad a', function() {\n\t\t\tvar attr, width;\n\n\t\t\twidth = parseFloat($(this).find('img').attr('width'), 10);\n\t\t\tattr = (width > 300) ? 'PencilSlugAd' : 'SlugAd';\n\n\t\t\tvisitor.setData('mm_attrSubsByEntry', attr, 0);\n\t\t});\n\n\t\t(function() {\n\t\t\tvar flag;\n\n\t\t\tdelegateBody('mouseover', '#block-ec_ads-pencil_slug_ad', function() {\n\t\t\t\tflag = true;\n\t\t\t});\n\n\t\t\tdelegateBody('mouseout', '#block-ec_ads-pencil_slug_ad', function() {\n\t\t\t\tflag = false;\n\t\t\t});\n\n\t\t\t$(window).blur(function() {\n\t\t\t\tif (!flag) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvisitor.setData('mm_attrSubsByEntry', 'PencilSlugAd', 0);\n\t\t\t});\n\t\t}());\n\n\t\t(function() {\n\t\t\tvar flag;\n\n\t\t\tdelegateBody('mouseover', '#block-ec_ads-subscription_ad', function() {\n\t\t\t\tflag = true;\n\t\t\t});\n\n\t\t\tdelegateBody('mouseout', '#block-ec_ads-subscription_ad', function() {\n\t\t\t\tflag = false;\n\t\t\t});\n\n\t\t\t$(window).blur(function() {\n\t\t\t\tif (!flag) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvisitor.setData('mm_attrSubsByEntry', 'SlugAd', 0);\n\t\t\t});\n\t\t}());\n\n\t\tdelegateBody('click', '.mh-user-menu a:contains(\"Subscribe to\"), .mh-user-menu .show-subscribe', function() {\n\t\t\tvisitor.setData('mm_attrSubsByEntry', 'Masthead', 0);\n\t\t});\n\n\t\tdelegateBody('mouseup', '#subscription_slider #main a', function() {\n\t\t\tvisitor.setData('mm_attrSubsByEntry', 'SliderAd', 0);\n\t\t});\n\t\tdelegateBody('click', '#superhero .cover-image-container a:contains(\"Subscribe\")', function() {\n\t\t\tvisitor.setData('mm_attrSubsByEntry', 'LatestIssue', 0);\n\t\t});\n\t\tdelegateBody('click', 'aside.site-index a:contains(\"Subscribe\")', function() {\n\t\t\tvisitor.setData('mm_attrSubsByEntry', 'Footer', 0);\n\t\t});\n\t\tif (lh.indexOf('//www.economist.com/printedition') > -1 && !/economist\\.com\\/printedition\\/(covers|specialreports)/i.test(lh)) {\n\t\t\tdelegateBody('click', '#column-content a:contains(\"Subscribe\")', function() {\n\t\t\t\tvisitor.setData('mm_attrSubsByEntry', 'PrintEd', 0);\n\t\t\t});\n\t\t}\n\t\tif (lh.indexOf('//www.economist.com/digital') > -1) {\n\t\t\tdelegateBody('click', '#digitalsubscribebutton', function() {\n\t\t\t\tvisitor.setData('mm_attrSubsByEntry', 'DigEd', 0);\n\t\t\t});\n\t\t}\n\t\tif ($('meta[property=\"og:type\"][content=\"article\"]').size() > 0) {\n\t\t\tdelegateBody('click', '#block-ec_components-print_sub a[href$=\"/products/subscribe\"]', function() {\n\t\t\t\tvisitor.setData('mm_attrSubsByEntry', 'UnderArticle', 0);\n\t\t\t});\n\t\t}\n\n\t\t(function() {\n\t\t\tvar flag;\n\n\t\t\tdelegateBody('mouseover', '#paywall-slug-size-ad', function() {\n\t\t\t\tflag = true;\n\t\t\t});\n\t\t\tdelegateBody('mouseout', '#paywall-slug-size-ad', function() {\n\t\t\t\tflag = false;\n\t\t\t});\n\n\t\t\t$(window).blur(function() {\n\t\t\t\tif (!flag) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvisitor.setData('mm_attrSubsByEntry', 'Regwall', 0);\n\t\t\t});\n\t\t}());\n\n\t\t//if we are on subscription page\n\t\tif (lh.indexOf('subscriptions.economist.com') !== -1) {\n\t\t\tif (/google/.test(dr) || /bing/.test(dr) || /yahoo/.test(dr) || /ask/.test(dr)) {\n\t\t\t\tvisitor.setData('mm_attrSubsByEntry', 'ExternalSearch', 0);\n\t\t\t} else if (dr !== '' && !/economist\\.com/.test(dr.split('/')[2]) && !/subscriptions\\.economist\\.com/.test(dr.split('/')[2]) && lh.indexOf('tagsrc=/GLB/SLG/') === -1) {\n\t\t\t\tvisitor.setData('mm_attrSubsByEntry', 'ExternalOther', 0);\n\t\t\t}\n\t\t}\n\n\n\t\t// -----------------------------------\n\t\t// For action SubsByType\n\t\t// -----------------------------------\n\t\tif (lh.indexOf('//www.economist.com/user/password') > -1) {\n\t\t\t$('#user-pass').submit(function() {\n\t\t\t\tvisitor.setData('mm_FPsent', 1, 0);\n\t\t\t});\n\t\t}\n\t\tif (lh.indexOf('//www.economist.com/user/password-reset') > -1) {\n\t\t\tif (visitor.getData('mm_FPsent')) {\n\t\t\t\tvisitor.setData('mm_PW', 1, 0);\n\t\t\t}\n\t\t}\n\t\tvisitor.setData('mm_FPsent', '', -1);\n\n\n\t\t// -----------------------------------\n\t\t// For action SubsByRoute\n\t\t// -----------------------------------\n\t\tdelegateBody('click', 'a.view-subscription-link', function() {\n\t\t\tvar $welcomeHeading = $('.overlay-header h2');\n\n\t\t\tif ($welcomeHeading.text().toLowerCase().indexOf('welcome to the economist') > -1) {\n\t\t\t\tvisitor.setData('mm_attrSubsByRoute', 1, 0);\n\t\t\t}\n\t\t});\n\n\n\t\t// Clear cookies for Upsells action for not TY Pages\n\t\tif (lh.indexOf('//subscriptions.economist.com/GLB/ECOM/') === -1 ||\n\t\t\tlh.indexOf('index.php') === -1) {\n\t\t\tvisitor.setData('mm_UpsellsAttr', '', -1);\n\t\t}\n\n\n\t});\n\n}(window.jQuery));","Order":0,"HighLevelApiVersion":"1.12"},{"Name":"IM_CrazyEgg","Type":"script","Attrs":{"type":"text/javascript"},"Data":"(function() {\n    var CrazyEgg = {\n        version: '0.0.1',\n        campaignRequired: true,\n        exec: function(integration) {\n            if (integration.multipage) {\n              window.CE_SNAPSHOT_NAME = integration.campaign.getName().toUpperCase() + '=' + integration.campaignExperience.toUpperCase() + '|' + window.location.pathname;\n            } else {\n              window.CE_SNAPSHOT_NAME = integration.campaign.getName().toUpperCase() + '=' + integration.campaignExperience.toUpperCase();\n            }\n        }\n    };\n\n    // Register and export\n    if (typeof modules === 'object' && typeof modules.define === 'function') {\n        modules.require('Integrations').register('CrazyEgg', CrazyEgg);\n    }\n})();","Order":-10,"HighLevelApiVersion":"1.12"},{"Name":"Plugin_CookiesModule","Type":"script","Attrs":{"type":"text/javascript"},"Data":"// Version: 0.1.0\n\nvar getCookieValuesArrayFromRegularStorage = function(name) {\n\tvar regExp = new RegExp('(?:^|; )' + encodeURIComponent(name).replace(/([.$?*|{}()\\[\\]\\\\\\/+^])/g, '\\\\$1') + '=([^;]+)', 'g');\n\tvar valuesArray = [];\n\tvar currentMatch;\n\n\twhile ((currentMatch = regExp.exec(document.cookie)) !== null) {\n\t\tvaluesArray.push(decodeURIComponent(currentMatch[1] || ''));\n\t}\n\n\treturn valuesArray;\n};\n\nvar checkCookieInMainCDAPIStorages = function(cookieNameToFind, isInfoRequired) {\n\n\tvar readCookieStorage = function(name) {\n\t\tvar res = {},\n\t\t\twhole = '',\n\t\t\ti = 0,\n\t\t\tchunk;\n\t\twhile ((chunk = getCookieValuesArrayFromRegularStorage(name + i++)[0])) {\n\t\t\twhole += chunk;\n\t\t}\n\t\twhole = decodeURIComponent(whole);\n\t\ttry {\n\t\t\tres = JSON.parse(whole);\n\t\t} catch (e) {}\n\t\treturn res;\n\t};\n\n\tvar mmapiP = readCookieStorage('mmapi.store.p.') || {};\n\tvar mmapiS = readCookieStorage('mmapi.store.s.') || {};\n\tvar storageTypes = [mmapiP, mmapiS];\n\n\tvar mmapiSiteLevelHeader = '\\nMMAPI site level cookie found:\\n\\n';\n\tvar mmapiCmapaignLevelHeaderByName = function(campaignName) {\n\t\treturn '\\nMMAPI camapign level cookie found (' + campaignName + '):\\n\\n';\n\t};\n\tvar mmapiSystemLevelHeader = '\\nMMAPI system cookie found:\\n\\n';\n\n\tvar getExpiraion = function(expirationPlusValue) {\n\n\t\tvar millisToDaysHoursMinutes = function(millis) {\n\t\t\tvar minutesPerDay = 60 * 24;\n\t\t\tvar seconds = Math.floor(millis / 1000);\n\t\t\tvar totalMinutes = Math.floor(seconds / 60);\n\n\t\t\tvar days = Math.floor(totalMinutes / minutesPerDay);\n\t\t\ttotalMinutes -= minutesPerDay * days;\n\t\t\tvar hours = Math.floor(totalMinutes / 60);\n\t\t\ttotalMinutes -= hours * 60;\n\t\t\tvar minutes = totalMinutes;\n\n\t\t\treturn (days ? days + 'd ' : '') +\n\t\t\t\t(hours ? hours + 'h ' : '') +\n\t\t\t\t(minutes ? minutes + 'm ' : '');\n\t\t};\n\n\t\tvar expDate = Number(expirationPlusValue.split('|')[0]);\n\t\tvar expGap = expDate - (new Date()).getTime();\n\t\tvar expData = expDate ? millisToDaysHoursMinutes(expGap) : 'session';\n\n\t\treturn '\\n\\nExpires in: ' + expData + '\\n\\n';\n\n\t};\n\n\tvar getClearValue = function(expirationPlusValue) {\n\t\treturn (expirationPlusValue.match(/\\|\"([^\"]+)\"/) || [])[1];\n\t};\n\n\tvar createMessage = function(header, cookieValue) {\n\n\t\tvar message;\n\n\t\tif (isInfoRequired) {\n\t\t\tmessage = (header +\n\t\t\t\tgetClearValue(cookieValue) +\n\t\t\t\tgetExpiraion(cookieValue) +\n\t\t\t\t'\\n\\n');\n\t\t} else {\n\t\t\tmessage = getClearValue(cookieValue);\n\t\t}\n\n\t\treturn message;\n\n\t};\n\n\tvar result = '';\n\tvar cookieValue;\n\n\tfor (var l = storageTypes.length; l--;) {\n\t\tvar storageType = storageTypes[l];\n\t\tfor (var storageKey in storageType) {\n\t\t\tfor (var existingCookieName in storageType[storageKey]) {\n\t\t\t\tif (cookieNameToFind === existingCookieName) {\n\t\t\t\t\tcookieValue = storageType[storageKey][existingCookieName];\n\t\t\t\t\tif (storageKey === 'mmengine') {\n\t\t\t\t\t\tresult += createMessage(mmapiSiteLevelHeader, cookieValue);\n\t\t\t\t\t} else if (storageKey.indexOf('mmparams') > -1) {\n\t\t\t\t\t\tresult += createMessage(mmapiSystemLevelHeader, cookieValue);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult += createMessage(mmapiCmapaignLevelHeaderByName(storageKey), cookieValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n\n};\n\nvar checkCookieInRegularCookieStorage = function(cookieNameToFind, isInfoRequired) {\n\n\tvar cookieValuesArray = getCookieValuesArrayFromRegularStorage(cookieNameToFind);\n\tvar cookieValue;\n\tvar result = '';\n\n\tfor (var i = 0; i < cookieValuesArray.length; i++) {\n\t\tcookieValue = cookieValuesArray[i];\n\t\tif (isInfoRequired) {\n\t\t\tresult += 'Regular cookie found:\\n' + cookieValue + '\\n\\n';\n\t\t} else {\n\t\t\tresult += cookieValue + '\\n\\n';\n\t\t}\n\t}\n\n\treturn result;\n\n};\n\n\nvar getCookie = function(cookieNameToFind, isInfoRequired) {\n\n\tvar result = '';\n\n\tresult +=\n\t\tcheckCookieInMainCDAPIStorages(cookieNameToFind, isInfoRequired) +\n\t\tcheckCookieInRegularCookieStorage(cookieNameToFind, isInfoRequired);\n\n\treturn console.log(\n\t\tresult.replace(/\\n\\n$/, '') ||\n\t\t'Cookie was not found in any of accessible storages'\n\t);\n\n};\n\nvar setRegularCookie = function(name, value, expiryDays, optionsObject) {\n\n\tvar expires, domain, expiryDate;\n\n\tif (typeof expiryDays === 'number' && expiryDays) {\n\n\t\texpiryDate = new Date();\n\t\texpiryDate.setTime(expiryDate.getTime() + expiryDays * 1000 * 60 * 60 * 24);\n\n\t\t// Includes implicit path setting for proper removal\n\t\tif (expiryDays < 0) {\n\t\t\texpires = '; path=/; expires=' + expiryDate.toUTCString();\n\t\t// Simple date in future logic\n\t\t} else {\n\t\t\texpires = '; expires=' + expiryDate.toUTCString();\n\t\t}\n\n\t}\n\n\t// Options are explicitly passed\n\tif (Object.prototype.toString.call(optionsObject) === '[object Object]') {\n\t\tif (typeof optionsObject.domainName === 'string' && optionsObject.domainName) {\n\t\t\tdomain = '; domain=' + encodeURIComponent(domainName);\n\t\t}\n\t}\n\n\tdocument.cookie =\n\t\tname + '=' +\n\t\tencodeURIComponent(value) +\n\t\t(expires || '') +\n\t\t(domain || '');\n\n};\n\nvar setVisitorCookie = function() {\n\treturn visitor.setData.apply(visitor, arguments);\n};\n\nif (typeof mmsystem === 'object') {\n\tmmsystem.debug = mmsystem.debug || {};\n\tmmsystem.debug.getCookie = getCookie;\n\tmmsystem.debug.setRegularCookie = setRegularCookie;\n\tmmsystem.debug.setVisitorCookie = setVisitorCookie;\n}","Order":0,"HighLevelApiVersion":"1.12"},{"Name":"T75_Acts","Type":"script","Attrs":{"type":"text/javascript"},"Data":"var trackSubscription = function () {\n    var siteObj = window.theeconomist_pagetrack;\n    var isConfirmation = /\\/checkout\\/confirmation\\/?$/i.test(location.pathname) && siteObj.pageType === 'confirmation';\n    var attr = sessionStorage.getItem('entrySubsPoint');\n    var isRenewal = siteObj && siteObj.isRenewal;\n\n    if (isConfirmation && attr && !isRenewal) {\n        actions.send('T75_Subscription', 1, attr);\n        sessionStorage.removeItem('entrySubsPoint');\n    }\n};\n\nvar bindAttrSetter = function () {\n    var timeIsOut = false;\n    var attrs = {\n        '.hit-paywall-maxymiser-campaign a[href=\"https://www.economist.com/signup\"]': 'Regwall',\n        '.ribbon__header [href=\"/free-email-newsletter-signup\"], .ribbon__body [href=\"/free-email-newsletter-signup\"]': 'Ribbon',\n    };\n\n    setTimeout(function () {\n        timeIsOut = true;\n    }, 10000);\n\n    when(function () {\n        return window.tp && window.tp.jq;\n    }, function () {\n        return timeIsOut;\n    }).done(function () {\n        var $ = window.tp.jq;\n        var isResetPage = !/\\/login|\\/registration-confirmation|free-email-newsletter-signup/.test(location.pathname);\n\n        if (isResetPage) {\n            visitor.clearData('entryRegPoint');\n        }\n\n        Object.keys(attrs).forEach(function (sel) {\n            $(document).on('click', sel, function () {\n                visitor.setData('entryRegPoint', attrs[sel], 1);\n            });\n        });\n\n        $(document).on('submit', '.exit-pop form', function () {\n            visitor.setData('entryRegPoint', 'Exit pop-up', 1);\n        });\n    });\n\n};\n\nevents.on('SplashArrArrival', function () {\n    var attrs = {\n        'anonRibbon':   'Ribbon_Anon',\n        'OFVRibbon':    'Ribbon_OFV',\n        'OFVRibbonM':    'Ribbon_OFV',\n        'regRibbon':    'regRibbon',\n        'Masthead':     'Masthead',\n        'RegWall':      'Regwall',\n        'SubWall':      'Paywall',\n        'EndOfArticle': 'End of article',\n    };\n    var page = (new RegExp('/(' + Object.keys(attrs).join('|') + ')$', 'i').exec(location.pathname) || [])[1];\n    var attr = (page && attrs[page]) || 'Other';\n\n    sessionStorage.setItem('entrySubsPoint', attr);\n    actions.set('T75_SubPageArrival', 1, attr);\n});\n\nevents.on('registrationArrivals', function () {\n    var attr = visitor.getData('entryRegPoint') || 'Other';\n    actions.set('T75_RegArrival', 1, attr);\n});\n\nevents.on('registrationConfirmationArrivals', function () {\n    var attr = visitor.getData('entryRegPoint') || 'Other';\n    actions.set('T75_Registration', 1, attr);\n});\n\nevents.domReady(function () {\n    trackSubscription();\n    bindAttrSetter();\n});","Order":5,"HighLevelApiVersion":"1.12"},{"Name":"Acts_Registrate","Type":"script","Attrs":{"type":"text/javascript"},"Data":"events.domReady(function () {\n    var isRegPage = /authenticate/.test(location.host) && /\\/login/.test(location.pathname);\n    var isConfirmPage = /www.economist.com/.test(location.host) && /\\/registration-confirmation/.test(location.pathname);\n\n    if (isRegPage) {\n        events.trigger('registrationArrivals');\n        actions.send('RegArrival', 1);\n    }\n\n    if (isConfirmPage) {\n        events.trigger('registrationConfirmationArrivals');\n        actions.send('Registration', 1);\n    }\n});\n\n","Order":10,"HighLevelApiVersion":"1.12"},{"Name":"Act_SplashArr","Type":"script","Attrs":{"type":"text/javascript"},"Data":"events.on('SplashArrArrival', function () {\n    actions.set('SplashArr_Global', 1);\n});\n\nvar checkConditions = function () {\n    return document.querySelector('#country-selector')\n        && /The Economist Subscription|Subscribe to The Economist/.test(document.querySelector('title').innerText)\n        && /Choose your(.*)subscription to The Economist/.test(document.querySelector('.Wrapper h1 p').innerText)\n        && document.querySelectorAll('.Card-deck > div').length === 3;\n};\n\nevents.domReady(function () {\n    if (checkConditions()) {\n        events.trigger('SplashArrArrival', {}, function () {\n            actions.send();\n        });\n    }\n});\n","Order":100,"HighLevelApiVersion":"1.12"},{"Name":"Module_Toolbox","Type":"script","Attrs":{"type":"text/javascript"},"Data":"modules.define('Toolbox', { autoDefine: false }, function () {\n    var emptyFn = function () {};\n\n    var decorate = function (config) {\n        config.originalFunction = typeof config.originalFunction === 'function' ? config.originalFunction : emptyFn;\n        return (function (fn) {\n            return function () {\n                var result;\n                var afterCallArgs = [].slice.call(arguments);\n\n                if (typeof config.beforeOriginalCall === 'function') {\n                    config.beforeOriginalCall.apply(config.context || this, arguments);\n                }\n\n                result = fn.apply(this, arguments);\n\n                if (typeof config.afterOriginalCall === 'function') {\n                    afterCallArgs.unshift(result);\n                    config.afterOriginalCall.apply(config.context || this, afterCallArgs);\n                }\n\n                return result;\n            };\n        }(config.originalFunction));\n    };\n\n    var isSubscriber = function () {\n        // cookie ec_omniture_user_sub can exist for two domains .economist.com & www.economist.com\n        var subCookies = document.cookie.match(/ec_user_type=([^;]*);/g) || [];\n\n        return subCookies.some(function (subCookie) {\n            return (!/ex-subscriber|registered|user_register/.test(subCookie));\n        });\n    };\n\n    var isMobile = function () {\n        return /Android|webOS|iPhone|iPad|iPod/i.test(navigator.userAgent);\n    };\n\n    return {\n        decorate: decorate,\n        isSubscriber: isSubscriber,\n        isMobile: isMobile,\n    };\n});","Order":-100,"HighLevelApiVersion":"1.12"},{"Name":"Plugin_ReactEvents","Type":"script","Attrs":{"type":"text/javascript"},"Data":"var event = site.scope.event;\nvar currentURL = location.pathname;\n\nwhen(function () {\n    return window.React;\n})\n    .done(function () {\n        events.trigger(event.REACT_LOADED);\n\n        window.React.createElement = (function (fnOriginal) {\n            return function () {\n                var args = Array.prototype.slice.call(arguments);\n\n                if (args[1] && args[1].currentUrl && currentURL !== args[1].currentUrl) {\n                    currentURL = args[1].currentUrl;\n\n                    events.trigger(event.PAGE_CHANGED, args);\n                }\n\n                events.trigger(event.ELEMENT_CREATED, args);\n\n                return fnOriginal.apply(this, arguments);\n            };\n        })(window.React.createElement);\n    });","Order":-100,"HighLevelApiVersion":"1.12"}],"Campaigns":[{"Name":"T63_Helper","Type":"ABnMVT","CSName":"","HighLevelApiVersion":"1.12","PagePrefix":"","Scripts":[{"Name":"T63_UserRegion","Type":"script","Attrs":{"type":"text/javascript"},"Data":"(function T63_UserRegion() {\n    site.scope.T63_Region = campaign.getExperience()['a_helpert63'];\n})();","Order":10,"HighLevelApiVersion":"1.12"}],"Elements":[{"Name":"a_helpert63","VariantName":"us","HTMLId":"A_HelperT63","Data":[],"Order":5}],"Recommendations":[]}],"MRRules":[],"PersistData":[{"Name":"srv","IsGlobal":false,"Value":"nycvwcgeu02","Expiration":365},{"Name":"pd","IsGlobal":false,"Value":"1104312218|AQAAAApVAwC2S46FhREHLQABEQABQggt/IcBAD/51C05wNZIP/nULTnA1kgAAAAA//////////8ABkRpcmVjdAGFEQEAAAAAAAABAAD///////////////8BAHalAAC834CHoIURAFqeAAAFhRGFEf//AQAAAQAAAAAB3bcBAIgvAgAAAAAAAAABRQ==","Expiration":365}],"SiteInfo":[{"Url":"economist.com","ID":550}],"SystemData":[{"Version":"1.0","RequestId":1,"ResponseId":1}],"GenInfo":{"T63_Helper":{"a_helpert63":"us"}},"ServerAttributes":{},"Iteration":"ZEcIgNso45duh0AnpE5FJHlIZ3Y","Packages":["mmpackage-1.12.js"]});