Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GTM activiated by user #1979

Merged
merged 6 commits into from
Jun 19, 2024

Conversation

ScottDormand96
Copy link
Collaborator

https://eaflood.atlassian.net/browse/IWTF-4081

banner activates GTM if approved

@ScottDormand96 ScottDormand96 added the enhancement New feature or request label Jun 12, 2024
@@ -132,7 +132,6 @@ export default (path, view, completion, getData) => ({
pageData.analyticsMessageDisplayed = retrieveKeyOrFalse(analytics, ANALYTICS.seenMessage)
pageData.analyticsSelected = retrieveKeyOrFalse(analytics, ANALYTICS.selected)
pageData.acceptedTracking = retrieveKeyOrFalse(analytics, ANALYTICS.acceptTracking)
pageData.gtmContainerId = process.env.GTM_CONTAINER_ID || false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need this value as it's included in the GTM script on the page (see lines 175 and 177 of the njk file)

Comment on lines 17 to 23
if (optDebug && gtmContainerId) {
if (canTrack === true) {
debug(`GTM Container Id: ${gtmContainerId} is being tracked`)
} else if (pageOmit === true) {
debug(`GTM Container Id: ${gtmContainerId} is not being tracked for current page`)
} else {
debug(`GTM Container Id: ${gtmContainerId} is not being tracked`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logging here doesn't quite match up with what we had previously – it used to be that we would log if the session was being tracked, and that's what it looks like you are still intending from the tests. However this will just output the same GTM container ID each time, as that is a set thing for the environment.

Copy link

sonarcloud bot commented Jun 18, 2024

@ScottDormand96 ScottDormand96 merged commit 8b07cee into develop Jun 19, 2024
3 checks passed
@ScottDormand96 ScottDormand96 deleted the feature/iwtf-4081-gtm-activiated-by-user branch June 19, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants