// Piwik config array var _paq = _paq || []; // womtp - namespace init var womtp = womtp || {}; // womtp - init v_vars womtp.v_vars = womtp.v_vars || []; (function () { // Create vars var u = (("https:" == document.location.protocol) ? "https" : "http") + "://t.womtp.com"; var d = document, g = d.createElement("script"), s = d.getElementsByTagName("script")[0]; var i = 0; // Set visit labels for (i = 0; i < 11; i++) { if (typeof window['v_var_'+i] !== 'undefined') { womtp.v_vars[i] = womtp.v_vars[i] || window['v_var_'+i]; } } // cambio 18092025 DLIO 18342 var DFI_client = typeof DFI_client !== "object" ? {} : DFI_client; if (DFI_client && DFI_client.optanon_consent_preferences === false) {         _paq.push(["disableCookies"]);      } // Through womtp.v_vars womtp.v_vars.forEach(function(v_var, i){ _paq.push(['setCustomVariable', i, 'v_var_name_'+i, v_var, window.scope = 'page']); }); // fig values _paq.push(["trackPageView"]); _paq.push(["enableLinkTracking"]); _paq.push(['getAttributionInfo']); _paq.push(["setTrackerUrl", u + "/t"]); _paq.push(["setSiteId", "a6a0a8ecef11a0990889b9fd587159b1"]); // Insert w.js g.type = "text/javascript"; g.defer = true; g.async = true; g.src = u + "/js/w.js"; s.parentNode.insertBefore(g, s); })(); var isIE = /*@cc_on!@*/false || !!document.documentMode, // Internet Explorer 6-11 isEdge = !isIE && !!window.StyleMedia; // Edge 20+ if(isIE || isEdge){ if(document.getElementById("pcondiciones") !== null) document.getElementById("pcondiciones").value ="on" } if (typeof renewVisitTag === "undefined") { var renewVisitTag = setInterval(function () { if ( typeof statusDFI != "undefined" && statusDFI.visitTrackLoad === true && typeof DFI != "undefined" && typeof DFI.resultShowRules != "undefined" && typeof window.DFI.DFI_configuration.services.serviceList.ringPool != "undefined" && typeof window.DFI.getUrlVar != "undefined" && window.DFI.DFI_configuration.services.serviceList.ringPool != "" ) { clearInterval(renewVisitTag); DFI.labels.EDeclaratives.landingSite = window.location.href; DFI.labels.EDeclaratives.referrerURL = document.referrer; DFI.labels.EDeclaratives.sf_reyg_source = DFI.getUrlVar( "sf_reyg_source", window.location.href ); DFI.labels.EDeclaratives.sfreyg_source = DFI.getUrlVar( "sf_reyg_source", window.location.href ); if (DFI.labels.EDeclaratives.sf_reyg_source == "") { DFI.labels.EDeclaratives.sf_reyg_source = DFI.getUrlVar( "sf_reyg_source", document.referrer ); DFI.labels.EDeclaratives.sfreyg_source = DFI.getUrlVar( "sf_reyg_source", document.referrer ); } // recogemos valor de meta business if (document.querySelector('meta[name="rp-business"]')) { var businessC = document.querySelector( 'meta[name="rp-business"]' ).content; DFI.labels.EDeclaratives.Bussiness__C = businessC; } // declarativa ProductFamily try { if (window.localStorage) { if (localStorage.getItem("product_name")) { DFI.labels.EDeclaratives.ProductFamily = localStorage .getItem("product_name") .replace(/['"]+/g, ""); } } var productFam = sessionStorage.rpVar_family_name; if (productFam && !DFI.labels.EDeclaratives.ProductFamily) { DFI.labels.EDeclaratives.ProductFamily = productFam.replace( /['"]+/g, "" ); } // declarativa LandingEyG if(window.sessionStorage){ const landingEyG = sessionStorage.getItem("landingEyG") ? sessionStorage.getItem("landingEyG") : "landingEyG no existe"; if(landingEyG){ DFI.labels.EDeclaratives.Landing_page__c = landingEyG.replace(/['"]+/g, ""); } } } catch (error) { console.log("Error localStorage", error); } // cookies fb var fbCv = DFI.getCookie("_fbc"); var fbPv = DFI.getCookie("_fbp"); if (fbCv) { DFI.labels.EDeclaratives.Facebook_FBC = fbCv; } if (fbPv) { DFI.labels.EDeclaratives.Facebook_FBP = fbPv; } if (typeof dataLayer === "object") { // etiquetas adobe de dataLayer var target_exp = dataLayer.find(function (i) { if (i.event == "target_experiment") { return i; } }); if (typeof target_exp != "undefined") { DFI.labels.EDeclaratives.campaign_name_Adobe = target_exp.campaign_name; DFI.labels.EDeclaratives.experience_name_Adobe = target_exp.experience_name; DFI.labels.EDeclaratives.campaign_id_Adobe = target_exp.campaign_id; DFI.labels.EDeclaratives.cro_campaign_id = target_exp.cro_campaign_id; DFI.labels.EDeclaratives.cro_campaign_name = target_exp.cro_campaign_name; DFI.labels.EDeclaratives.cro_experience_name = target_exp.cro_experience_name; if (typeof DFI_client !== "undefined") { DFI_client.cro_campaign_id = target_exp.cro_campaign_id; DFI_client.cro_campaign_name = target_exp.cro_campaign_name; DFI_client.cro_experience_name = target_exp.cro_experience_name; } } // target_experiment_gtm var target_exp_gtm = dataLayer.find(function (i) { if (i.event == "target_experiment_gtm") { return i; } }); if ( typeof target_exp_gtm != "undefined" && typeof target_exp_gtm.campaign_id != "undefined" ) { DFI.labels.EDeclaratives.campaign_id_Adobe = target_exp_gtm.campaign_id; } } // var formsToInterfereNow = document.querySelectorAll(DFI.resultShowRules.interfereButtonsWithClass); // for (var i = 0, len = formsToInterfereNow.length; i < len; i++) { // var formId = DFI.getparentFormFromSubmitButton(formsToInterfereNow[i]); // if( formId != undefined && document.getElementById(formId.id + "new_field") === null ){ // DFI.addInputElement(formId, formId.id + "new_field", "landingSitel", "", window.location.href); // } // } if (typeof DRP !== "undefined") { DRP.loadLabels(); } } }, 50); } if (typeof DFI_client != "object") { DFI_client = {}; } if (typeof DFI_client.containers != "object") { DFI_client.containers = {}; } function getAnalyticsCookies() { const cookies = document.cookie.split(";"); let ga4_cid = ""; let gaNew = ""; let ga4_session = ""; cookies.forEach((cookie) => { const [name, value] = cookie.split("="); if (name.trim() === "_ga") { ga4_cid = value; } else if (name.trim() === "_gid") { gaNew = value; } else if (name.startsWith(" _ga_4ET1JJ48NX")) { ga4_session = value; } }); return [ga4_cid, gaNew, ga4_session]; } [ DFI_client.containers.ga, DFI_client.containers.gid, DFI_client.containers.gaSession, ] = getAnalyticsCookies(); DFI_client.containers.idTagForGA4Cookies = "a6a0a8ecef11a0990889b9fd587159b1"; DFI_client.containers.timeIntervalGA4SCookies = 350; //We send Universal Analytycs and GA4S if ( DFI_client.containers.g4sFlag != true && DFI_client.containers.gaSession != null ) { DFI_client.containers.intervalPiwikGA4SCookies = setInterval(() => { if ( typeof Piwik != "undefined" && typeof Piwik.getAsyncTracker() != "undefined" && Boolean(Piwik.getAsyncTracker().getVisitorId()) ) { clearInterval(DFI_client.containers.intervalPiwikGA4SCookies); if (DFI_client.containers.timeIntervalGA4SCookies === 350) { DFI_client.containers.timeIntervalGA4SCookies = 50000000; DFI_client.containers.g4sFlag = true; //Universal Analytics and ga4 id DFI_client.containers.analyticsEpst = `https://t.womtp.com/epst/v2?idsite=${ DFI_client.containers.idTagForGA4Cookies }&idvisitor=${Piwik.getAsyncTracker().getVisitorId()}&v=1&gaid4=${ DFI_client.containers.ga }&gaid=${DFI_client.containers.gid}&ga4sid=${ DFI_client.containers.gaSession }`; if (globalThis.DAL != null && typeof globalThis.DAL != "undefined") { DAL.Ajax({ type: "jsonp", url: DFI_client.containers.analyticsEpst, method: "GET", }); } } } }, DFI_client.containers.timeIntervalGA4SCookies); } if (typeof renewVisitTag === "undefined") { var renewVisitTag = setInterval(function () { if ( typeof statusDFI != "undefined" && statusDFI.visitTrackLoad === true && typeof DFI != "undefined" && typeof DFI.resultShowRules != "undefined" && typeof window.DFI.DFI_configuration.services.serviceList.ringPool != "undefined" && typeof window.DFI.getUrlVar != "undefined" && window.DFI.DFI_configuration.services.serviceList.ringPool != "" ) { clearInterval(renewVisitTag); DFI.labels.EDeclaratives.landingSite = window.location.href; DFI.labels.EDeclaratives.referrerURL = document.referrer; DFI.labels.EDeclaratives.sf_reyg_source = DFI.getUrlVar( "sf_reyg_source", window.location.href ); DFI.labels.EDeclaratives.sfreyg_source = DFI.getUrlVar( "sf_reyg_source", window.location.href ); if (DFI.labels.EDeclaratives.sf_reyg_source == "") { DFI.labels.EDeclaratives.sf_reyg_source = DFI.getUrlVar( "sf_reyg_source", document.referrer ); DFI.labels.EDeclaratives.sfreyg_source = DFI.getUrlVar( "sf_reyg_source", document.referrer ); } // recogemos valor de meta business if (document.querySelector('meta[name="rp-business"]')) { var businessC = document.querySelector( 'meta[name="rp-business"]' ).content; DFI.labels.EDeclaratives.Bussiness__C = businessC; } // declarativa ProductFamily try { if (window.localStorage) { if (localStorage.getItem("product_name")) { DFI.labels.EDeclaratives.ProductFamily = localStorage .getItem("product_name") .replace(/['"]+/g, ""); } } var productFam = sessionStorage.rpVar_family_name; if (productFam && !DFI.labels.EDeclaratives.ProductFamily) { DFI.labels.EDeclaratives.ProductFamily = productFam.replace( /['"]+/g, "" ); } } catch (error) { console.log("Error localStorage", error); } // cookies fb var fbCv = DFI.getCookie("_fbc"); var fbPv = DFI.getCookie("_fbp"); if (fbCv) { DFI.labels.EDeclaratives.Facebook_FBC = fbCv; } if (fbPv) { DFI.labels.EDeclaratives.Facebook_FBP = fbPv; } /*Comprobamos si existe dataLayer */ if (typeof dataLayer == "object") { // etiquetas adobe de dataLayer var target_exp = dataLayer.find(function (i) { if (i.event == "target_experiment") { return i; } }); if (typeof target_exp != "undefined") { DFI.labels.EDeclaratives.campaign_name_Adobe = target_exp.campaign_name; DFI.labels.EDeclaratives.experience_name_Adobe = target_exp.experience_name; DFI.labels.EDeclaratives.campaign_id_Adobe = target_exp.campaign_id; DFI.labels.EDeclaratives.cro_campaign_id = target_exp.cro_campaign_id; DFI.labels.EDeclaratives.cro_campaign_name = target_exp.cro_campaign_name; DFI.labels.EDeclaratives.cro_experience_name = target_exp.cro_experience_name; } // target_experiment_gtm var target_exp_gtm = dataLayer.find(function (i) { if (i.event == "target_experiment_gtm") { return i; } }); if ( typeof target_exp_gtm != "undefined" && typeof target_exp_gtm.campaign_id != "undefined" ) { DFI.labels.EDeclaratives.campaign_id_Adobe = target_exp_gtm.campaign_id; } } // var formsToInterfereNow = document.querySelectorAll(DFI.resultShowRules.interfereButtonsWithClass); // for (var i = 0, len = formsToInterfereNow.length; i < len; i++) { // var formId = DFI.getparentFormFromSubmitButton(formsToInterfereNow[i]); // if( formId != undefined && document.getElementById(formId.id + "new_field") === null ){ // DFI.addInputElement(formId, formId.id + "new_field", "landingSitel", "", window.location.href); // } // } if (typeof DRP !== "undefined") { DRP.loadLabels(); } } }, 50); } console.log("Hecho en script")