(function () { if (window.location.hostname === "welcome.unibet.com" && BF_prop.RegionCode === 'se') window.location.hostname = "welcome.unibet.se"; // Footer pages should be excluded from DTM tracking var isFooter = window.location.href.indexOf('-footer-') > -1; // Pop pages should be excluded from DTM tracking var isPopPage = window.location.href.indexOf('/pop/') > -1; if(!isPopPage){ isPopPage = window.location.href.indexOf('/popunder/') > -1; } var triggerTealium = (window.location.search.toLowerCase().indexOf('tealium_block=true') === -1); if (!(isFooter || isPopPage) && triggerTealium) { // Tealium - BannerFlow profile. (function (a, b, c, d) { a = '//tags.tiqcdn.com/utag/kindred/bannerflow/prod/utag.js'; b = document; c = 'script'; d = b.createElement(c); d.src = a; d.type = 'text/java' + c; d.async = true; a = b.getElementsByTagName(c)[0]; a.parentNode.insertBefore(d, a); })(); } else if (!isFooter) { var idList = { gb: '1437591169856709', it: '349976165212687', be: '922725971072024', ro: '517828918380620', ee: '174253192934633', au: '408072722663305', de: '1865769903752618' } var fbId = idList[BF_prop.RegionCode] ? idList[BF_prop.RegionCode] : null; if (fbId) { !function (f, b, e, v, n, t, s) { if (f.fbq) return; n = f.fbq = function () { n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments) }; if (!f._fbq) f._fbq = n; n.push = n; n.loaded = !0; n.version = '2.0'; n.queue = []; t = b.createElement(e); t.async = !0; t.src = v; s = b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t, s) }(window, document, 'script', 'https://connect.facebook.net/en_US/fbevents.js'); fbq('init', fbId); fbq('track', 'PageView'); } } // POPUNDER PIXEL if (!isFooter) { // Automatically fires pixels according to page URI var eventBaseUrl = 'https://secure.adnxs.com/seg?add='; var events = [ { name: 'pop', id: '9755599', match: '/pop/' }, ]; var pageUrl = document.location.href.toLowerCase(); var matches = events.filter(function (e) { return pageUrl.indexOf(e.match) > -1; }); for (var i = 0; i < matches.length; i++) { var img = new Image(); img.src = eventBaseUrl + matches[i].id; } } /* Adform Impression Pixel for Popunders ADC-1537*/ if(isPopPage){ var adform_id = ""; if(/welcome.unibet.com/i.test(location.host) ){ /* unibet no-No*/ if(/^\/no\//.test(location.pathname)) adform_id = 37342745; /* unibet fi_FI*/ if(/^\/fi\//.test(location.pathname)) adform_id = 37346170; /* unibet pl_PL*/ if(/^\/pl\//.test(location.pathname)) adform_id = 37365257; /* unibet hu_HU*/ if(/^\/hu\//.test(location.pathname)) adform_id = 37364511; }else if(/welcome.unibet.be/i.test(location.host)){ adform_id = 37361230; /* nl_BE */ if(/^\/be-fr\//.test(location.pathname)) adform_id = 37361119; /* fr_BE */ }else if(/welcome.unibet.ro/i.test(location.host) ){ /* ro_RO */ adform_id = 37357909; }else if(/welcome.unibet.de/i.test(location.host) ){ /* de_DE */ adform_id = 37346199; }else if(/welcome.unibet.ee/i.test(location.host) ){ /* et_EE */ adform_id = 37346133; }else if(/welcome.vladcazino.ro/i.test(location.host) ){ /* vladcazino_ro_RO */ adform_id = 37360993; }else if(/welcome.casinohuone.com/i.test(location.host) ){ /* huone fi_FI*/ if(/^\/fi\//.test(location.pathname)) adform_id = 37364546; } var getQueryString = function (field) { var reg = new RegExp('[?&]' + field + '=([^&#]*)', 'i'); var string = reg.exec(location.href); return string ? string[1] : null; }; if(adform_id!=="" && getQueryString("ch")=="popunder"){ /*document.write("");*/ var adform_img = document.createElement("img"); adform_img.src = "//track.adform.net/adfserve/?bn="+adform_id+";extvars=popunder:"+getQueryString("sub_ch")+":"+getQueryString("kpid"); adform_img.src = adform_img.src+";1x1inv=1;srctype=3;ord="+(new Date()).getTime(); adform_img.border = 0; adform_img.width = 1; adform_img.height = 1; document.head.appendChild(adform_img) } } const relativePaths = document.location.pathname.substring(1).split('/'); const secondPathIsPop = relativePaths.length >= 2 && relativePaths[1] === 'pop'; if (secondPathIsPop) { // Initiate GTM tracking for Pop pages (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-PF2RVHC'); } })();