From aa1db55d538c745c89fa793b4e1f47966a672ac1 Mon Sep 17 00:00:00 2001 From: Andrei Tuicu Date: Mon, 15 Apr 2024 21:14:01 +0200 Subject: [PATCH 1/3] fix: Correctly Set eVar30 --- aemeds/blocks/blog-list/blog-list.js | 1 - aemeds/scripts/scripts.js | 11 ++++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/aemeds/blocks/blog-list/blog-list.js b/aemeds/blocks/blog-list/blog-list.js index 68b6eed..fe32537 100644 --- a/aemeds/blocks/blog-list/blog-list.js +++ b/aemeds/blocks/blog-list/blog-list.js @@ -31,7 +31,6 @@ function clickTrack(card) { event: { pageArea: 'body', eVar22, - eVar30: getAnalyticsSiteName(), click: { componentName: 'blog-list', destination: link.href, diff --git a/aemeds/scripts/scripts.js b/aemeds/scripts/scripts.js index 1f7e2e1..1ca5ec8 100644 --- a/aemeds/scripts/scripts.js +++ b/aemeds/scripts/scripts.js @@ -44,9 +44,18 @@ export function analyticsGlobalClickTrack(digitalData, event) { window.appEventData = window.appEventData || []; const data = { name: 'global_click', - digitalData, + digitalData: { + page: { + category: { + primaryCategory: getAnalyticsSiteName(), + }, + }, + ...digitalData, + }, event, }; + + window.appEventData.push(data); // eslint-disable-next-line no-console console.log(JSON.stringify(data, undefined, 4)); From 4f0b58f732cce41028accab254a611687c9b2c36 Mon Sep 17 00:00:00 2001 From: Andrei Tuicu Date: Mon, 15 Apr 2024 21:16:50 +0200 Subject: [PATCH 2/3] fix: Correctly Set eVar30 --- aemeds/blocks/blog-list/blog-list.js | 1 - aemeds/blocks/blog-topics/blog-topics.js | 1 - aemeds/blocks/blogheader/blogheader.js | 1 - aemeds/blocks/cards/cards.js | 1 - aemeds/scripts/scripts.js | 1 - 5 files changed, 5 deletions(-) diff --git a/aemeds/blocks/blog-list/blog-list.js b/aemeds/blocks/blog-list/blog-list.js index fe32537..fc48c38 100644 --- a/aemeds/blocks/blog-list/blog-list.js +++ b/aemeds/blocks/blog-list/blog-list.js @@ -55,7 +55,6 @@ function loadMoreClickTrack(e, loadMoreText) { event: { pageArea: 'body', eVar22, - eVar30: getAnalyticsSiteName(), click: { componentName: 'blog-list', destination: window.location.href, diff --git a/aemeds/blocks/blog-topics/blog-topics.js b/aemeds/blocks/blog-topics/blog-topics.js index 93accd9..466e991 100644 --- a/aemeds/blocks/blog-topics/blog-topics.js +++ b/aemeds/blocks/blog-topics/blog-topics.js @@ -37,7 +37,6 @@ export function clickTrack(block) { event: { pageArea: 'body', eVar22, - eVar30: getAnalyticsSiteName(), click: { componentName: block.classList[0], destination: link.href, diff --git a/aemeds/blocks/blogheader/blogheader.js b/aemeds/blocks/blogheader/blogheader.js index 214dfd1..32dc810 100644 --- a/aemeds/blocks/blogheader/blogheader.js +++ b/aemeds/blocks/blogheader/blogheader.js @@ -142,7 +142,6 @@ function addClickTracking(link, block) { event: { pageArea: 'body', eVar22: `blogs:heading:${analyticsCanonicStr(link.textContent)}`, - eVar30: getAnalyticsSiteName(), click: { componentName: block.classList[0], destination: link.href, diff --git a/aemeds/blocks/cards/cards.js b/aemeds/blocks/cards/cards.js index af1964a..6e56616 100644 --- a/aemeds/blocks/cards/cards.js +++ b/aemeds/blocks/cards/cards.js @@ -84,7 +84,6 @@ function clickTrack(card) { event: { pageArea: 'body', eVar22, - eVar30: getAnalyticsSiteName(), click: { componentName: 'cards', destination: link.href, diff --git a/aemeds/scripts/scripts.js b/aemeds/scripts/scripts.js index 1ca5ec8..0486098 100644 --- a/aemeds/scripts/scripts.js +++ b/aemeds/scripts/scripts.js @@ -329,7 +329,6 @@ function articleLinksClickTrack(main) { event: { pageArea: 'body', eVar22, - eVar30: getAnalyticsSiteName(), click: { componentName: link.closest('.block')?.classList[0] || 'default-content-wrapper', destination: link.href, From fff1173a64e833b2a479643a41416992758076b5 Mon Sep 17 00:00:00 2001 From: Andrei Tuicu Date: Mon, 15 Apr 2024 21:21:01 +0200 Subject: [PATCH 3/3] fix: Correctly Set eVar30 --- aemeds/blocks/blog-list/blog-list.js | 1 - aemeds/blocks/blog-topics/blog-topics.js | 1 - aemeds/blocks/blogheader/blogheader.js | 1 - aemeds/blocks/cards/cards.js | 1 - aemeds/scripts/scripts.js | 1 - 5 files changed, 5 deletions(-) diff --git a/aemeds/blocks/blog-list/blog-list.js b/aemeds/blocks/blog-list/blog-list.js index fc48c38..a8ddbc8 100644 --- a/aemeds/blocks/blog-list/blog-list.js +++ b/aemeds/blocks/blog-list/blog-list.js @@ -7,7 +7,6 @@ import { formatDate, getLocaleInfo, serviceNowDefaultOrigin, - getAnalyticsSiteName, analyticsGlobalClickTrack, analyticsCanonicStr, } from '../../scripts/scripts.js'; diff --git a/aemeds/blocks/blog-topics/blog-topics.js b/aemeds/blocks/blog-topics/blog-topics.js index 466e991..0fb2dfd 100644 --- a/aemeds/blocks/blog-topics/blog-topics.js +++ b/aemeds/blocks/blog-topics/blog-topics.js @@ -4,7 +4,6 @@ import { BLOG_FILTERS, analyticsCanonicStr, analyticsGlobalClickTrack, - getAnalyticsSiteName, } from '../../scripts/scripts.js'; import { p, a } from '../../scripts/dom-helpers.js'; diff --git a/aemeds/blocks/blogheader/blogheader.js b/aemeds/blocks/blogheader/blogheader.js index 32dc810..4e431d3 100644 --- a/aemeds/blocks/blogheader/blogheader.js +++ b/aemeds/blocks/blogheader/blogheader.js @@ -7,7 +7,6 @@ import { BLOG_QUERY_INDEX, analyticsCanonicStr, analyticsGlobalClickTrack, - getAnalyticsSiteName, getLocale, getLocaleInfo, } from '../../scripts/scripts.js'; diff --git a/aemeds/blocks/cards/cards.js b/aemeds/blocks/cards/cards.js index 6e56616..6c3a731 100644 --- a/aemeds/blocks/cards/cards.js +++ b/aemeds/blocks/cards/cards.js @@ -9,7 +9,6 @@ import { getTopicTags, getTemplate, BLOG_QUERY_INDEX, - getAnalyticsSiteName, analyticsGlobalClickTrack, analyticsCanonicStr, } from '../../scripts/scripts.js'; diff --git a/aemeds/scripts/scripts.js b/aemeds/scripts/scripts.js index 0486098..ce5e2f3 100644 --- a/aemeds/scripts/scripts.js +++ b/aemeds/scripts/scripts.js @@ -55,7 +55,6 @@ export function analyticsGlobalClickTrack(digitalData, event) { event, }; - window.appEventData.push(data); // eslint-disable-next-line no-console console.log(JSON.stringify(data, undefined, 4));