{ const affiliateURL = (window.location.origin + window.location.pathname).replace(“-uat”, “”); const affiliateURLArray = [ ‘https://njcom-sandbox.taboola-content-affiliation.com/personal-finance/’, ‘https://www.nj.com/personal-finance/’, ]; return !!affiliateURLArray.find(element => affiliateURL.includes(element)); }; const isBettingMarket = () => { return typeof platform !== ‘undefined’ && platform === ‘WordPress’; }; if (isAffiliateMarket()) { window.adiData.entryUrl = window.location.href; window.adiData.pageType = window.location.href.includes(‘/article’) ? ‘affiliate-article’ : ‘affiliate’; window.adiData.rgProduct = ‘affiliate’; } if (isBettingMarket()) { window.adiData.entryUrl = window.location.href; window.adiData.pageType = ‘index’; window.adiData.rgProduct = ‘index’; window.adiData.preview = ‘false’; window.adiData.siteSection = ‘Uncategorized’; } var environment = window.location.toString().includes(“uat”) || window.location.toString().includes(“localhost”) ? “uat” : “prod”; window.adiData.environment = environment; ]]>

Source

Leave a Reply

Your email address will not be published. Required fields are marked *