//tealium universal tag - utag.37 ut4.0.202603271538, Copyright 2026 Tealium.com Inc. All Rights Reserved.
window._elqQ=window._elqQ||[];try{(function(id,loader){var u={"id":id};utag.o[loader].sender[id]=u;if(utag.ut===undefined){utag.ut={};}
var match=/ut\d\.(\d*)\..*/.exec(utag.cfg.v);if(utag.ut.loader===undefined||!match||parseInt(match[1])<41){u.loader=function(o,a,b,c,l,m){utag.DB(o);a=document;if(o.type=="iframe"){m=a.getElementById(o.id);if(m&&m.tagName=="IFRAME"){b=m;}else{b=a.createElement("iframe");}o.attrs=o.attrs||{};utag.ut.merge(o.attrs,{"height":"1","width":"1","style":"display:none"},0);}else if(o.type=="img"){utag.DB("Attach img: "+o.src);b=new Image();}else{b=a.createElement("script");b.language="javascript";b.type="text/javascript";b.async=1;b.charset="utf-8";}if(o.id){b.id=o.id;}for(l in utag.loader.GV(o.attrs)){b.setAttribute(l,o.attrs[l]);}b.setAttribute("src",o.src);if(typeof o.cb=="function"){if(b.addEventListener){b.addEventListener("load",function(){o.cb();},false);}else{b.onreadystatechange=function(){if(this.readyState=="complete"||this.readyState=="loaded"){this.onreadystatechange=null;o.cb();}};}}if(o.type!="img"&&!m){l=o.loc||"head";c=a.getElementsByTagName(l)[0];if(c){utag.DB("Attach to "+l+": "+o.src);if(l=="script"){c.parentNode.insertBefore(b,c);}else{c.appendChild(b);}}}};}else{u.loader=utag.ut.loader;}
if(utag.ut.typeOf===undefined){u.typeOf=function(e){return({}).toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase();};}else{u.typeOf=utag.ut.typeOf;}
u.ev={"view":1};u.scriptrequested=false;u.map={};u.extend=[];u.WaitUntilCustomerGUIDIsRetrieved=function(){if(!!(u.timerId)){if(u.timeout==0){return;}
if(typeof this.GetElqCustomerGUID==="function"){document.forms[u.data.elqFormName].elements[u.data.elqFormGUIDElement].value=GetElqCustomerGUID();return;}
u.timeout-=1;}
u.timerId=setTimeout(u.WaitUntilCustomerGUIDIsRetrieved,500);return;};u.send=function(a,b){if(u.ev[a]||u.ev.all!==undefined){utag.DB("send:37");utag.DB(b);var c,d,e,f,key,form_match=/true|on|yes/;u.data={"base_url":"//img.en25.com/i/elqCfg.min.js","elqSetSiteId":"451761973","form_tracking":"","elqFormName":"","elqFormGUIDElement":"","elqDomainName":"","custom":{}};utag.DB("send:37:EXTENSIONS");utag.DB(b);for(d in utag.loader.GV(u.map)){if(b[d]!==undefined&&b[d]!==""){e=u.map[d].split(",");for(f=0;f<e.length;f++){if(u.data.hasOwnProperty(e[f])){u.data[e[f]]=b[d];}else{u.data.custom[e[f]]=b[d];}}}}
utag.DB("send:37:MAPPINGS");utag.DB(u.data);if(!u.data.elqSetSiteId){utag.DB(u.id+": Tag not fired: Required attribute elqSetSiteId not populated");return;}
_elqQ.push(["elqSetSiteId",u.data.elqSetSiteId]);if(u.data.elqDomainName!==""){_elqQ.push(["elqUseFirstPartyCookie",u.data.elqDomainName]);}
_elqQ.push(["elqTrackPageView"]);for(key in u.data.custom){if(u.data.custom.hasOwnProperty(key)){_elqQ.push(key,u.data.custom[key]);}}
if(u.data.form_tracking===true||form_match.test(u.data.form_tracking.toLowerCase())){u.timeout=5;u.timerId=null;u.WaitUntilCustomerGUIDIsRetrieved();_elqQ.push(["elqGetCustomerGUID"]);}
if(!u.scriptrequested){u.scriptrequested=true;u.loader({"type":"script","src":u.data.base_url,"cb":null,"loc":"script","id":"utag_37","attrs":{}});}
utag.DB("send:37:COMPLETE");}};utag.o[loader].loader.LOAD(id);}("37","royalmail.ebiz"));}catch(error){utag.DB(error);}
