From 3febbe71b9a9b0e13e5d7dfd82ba7763d13c7b63 Mon Sep 17 00:00:00 2001 From: Nicole Emer Date: Mon, 11 Mar 2024 13:55:28 +0100 Subject: [PATCH 1/2] Some keys are needed for snowplow and no via window.sp_* available --- extensions/doPlugins_global.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/extensions/doPlugins_global.js b/extensions/doPlugins_global.js index 5465c1fb..30262594 100644 --- a/extensions/doPlugins_global.js +++ b/extensions/doPlugins_global.js @@ -518,12 +518,12 @@ s._articleViewTypeObj = { if (!s._utils.isAdWall(s)) { if (s._utils.isArticlePage()) { - s._articleViewType = s.eVar44 = pageViewEvent; - s.eVar37 = s.prop59 = channel || 'no-entry'; - s.eVar38 = s.prop60 = channelCategory; + s._articleViewType = s.eVar44 = window.sp_events = pageViewEvent; + s.eVar37 = s.prop59 = window.sp_m_channel = channel || 'no-entry'; + s.eVar38 = s.prop60 = window.sp_m_channel_category = channelCategory; s._eventsObj.addEvent(pageViewEvent); this.setPageSourceAndAgeForCheckout(s); - } + } if (this.isPageViewFromHome(pageViewEvent)) { s._eventsObj.addEvent('event20'); @@ -657,11 +657,11 @@ s._setExternalReferringDomainEvents = function (s) { }); if (isRegexMatch || isDomainMatch) { s._eventsObj.addEvent(event); - s.eVar44 = s.eVar44 ? s.eVar44 + ',' + event : s.eVar44 = event; - s.eVar37 = s.prop59 = channel || 'no-entry'; - s.eVar38 = s.prop60 = channelCategory; + s.eVar44 = window.sp_events = s.eVar44 ? s.eVar44 + ',' + event : s.eVar44 = event; + s.eVar37 = s.prop59 = window.sp_m_channel = channel || 'no-entry'; + s.eVar38 = s.prop60 = window.sp_m_channel_category = channelCategory; s._articleViewType = s.eVar44; - } + } }); } }; @@ -721,9 +721,9 @@ s._setTrackingValueEvents = function (s) { channelCategory = 'Other organic Social'; } s._eventsObj.addEvent(event); - s._articleViewType = s.eVar44 += ',' + event; - s.eVar37 = s.prop59 = channel || 'no-entry'; - s.eVar38 = s.prop60 = channelCategory; + s._articleViewType = s.eVar44 = window.sp_events += ',' + event; + s.eVar37 = s.prop59 = window.sp_m_channel = channel || 'no-entry'; + s.eVar38 = s.prop60 = window.sp_m_channel_category = channelCategory; } } } @@ -790,9 +790,9 @@ s._homeTeaserTrackingObj = { const blockValue = this.getBlockValue(); const pageId = this.getPageId(); if (trackingValue) { - s.eVar66 = trackingValue; - s.eVar92 = trackingValue + '|' + pageId; - s.eVar97 = blockValue; + s.eVar66 = window.sp_teaser_position = trackingValue; + s.eVar92 = window.sp_teaser_position_page = trackingValue + '|' + pageId; + s.eVar97 = window.sp_teaser_block = blockValue; } }, From 7b20c66ae3c9717c95fc3f725193b6edd159eaf5 Mon Sep 17 00:00:00 2001 From: Nicole Emer Date: Mon, 11 Mar 2024 14:54:17 +0100 Subject: [PATCH 2/2] improvements --- extensions/doPlugins_global.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/doPlugins_global.js b/extensions/doPlugins_global.js index 30262594..f34c6cd3 100644 --- a/extensions/doPlugins_global.js +++ b/extensions/doPlugins_global.js @@ -657,7 +657,7 @@ s._setExternalReferringDomainEvents = function (s) { }); if (isRegexMatch || isDomainMatch) { s._eventsObj.addEvent(event); - s.eVar44 = window.sp_events = s.eVar44 ? s.eVar44 + ',' + event : s.eVar44 = event; + s.eVar44 = window.sp_events = s.eVar44 ? s.eVar44 + ',' + event : event; s.eVar37 = s.prop59 = window.sp_m_channel = channel || 'no-entry'; s.eVar38 = s.prop60 = window.sp_m_channel_category = channelCategory; s._articleViewType = s.eVar44; @@ -723,7 +723,7 @@ s._setTrackingValueEvents = function (s) { s._eventsObj.addEvent(event); s._articleViewType = s.eVar44 = window.sp_events += ',' + event; s.eVar37 = s.prop59 = window.sp_m_channel = channel || 'no-entry'; - s.eVar38 = s.prop60 = window.sp_m_channel_category = channelCategory; + s.eVar38 = s.prop60 = window.sp_m_channel_category = channelCategory || ''; } } }