-
Notifications
You must be signed in to change notification settings - Fork 3
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
GTM activiated by user #1979
Conversation
https://eaflood.atlassian.net/browse/IWTF-4081 Update banner to activate or deactiviate GTM instead of Hapi Gapi
@@ -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 |
There was a problem hiding this comment.
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)
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`) |
There was a problem hiding this comment.
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.
|
https://eaflood.atlassian.net/browse/IWTF-4081
banner activates GTM if approved