(function(window,undefined){ if (typeof(dataLayer) == 'undefined' || !Array.isArray(dataLayer)) { dataLayer = []; } var prepareDataLayer = {"visitorLoginState":false,"customerID":null,"pageLanguage":"en","pagePool":"Store","pageName":"\/nbcq\/api_account\/gtmdatalayer","siteCountry":"INTERNATIONAL","siteLanguage":"en","englishPagePath":"\/nbcq\/api_account\/gtmdatalayer","storeLoggedIn":"loggedOut","customerClass_kvgr3":null}; var englishPath = typeof(MAGE_ENGLISH_PATH) != 'undefined' ? MAGE_ENGLISH_PATH : ''; //If page doesn't have english path. var countryLangPath = location.pathname.match(/^\/([a-z]{2}|international)\/[a-z]{2}\//); var isWebAr = location.hostname.match(/^secureweb[^\.]*\.nobelbiocare.com/); if (!isWebAr) { if (countryLangPath && !englishPath) { countryLangPath = countryLangPath[0]; englishPath = location.pathname.substr(countryLangPath.length); prepareDataLayer.pagePool = 'web'; } }else { englishPath = location.pathname; prepareDataLayer.pagePool = 'WebAR'; } if (englishPath.indexOf('/') !=0) { englishPath = '/' + englishPath; } prepareDataLayer.pageName = document.title; prepareDataLayer.englishPagePath = englishPath; dataLayer.push(prepareDataLayer); })(window,undefined)