OneTrust Country ID
What does this MR do and why?
Describe in detail what your merge request does and why.
This MR turn off Google Analytics entirely in Denmark, Austria, France, Italy and Norway. Laws have changed in those countries respectively, making GA illegal
Related to: gitlab-com/marketing/digital-experience/buyer-experience#1617 (closed)
Screenshots or screen recordings
How to set up and validate locally
-
In the rails console, enable the
gitlab_gtm_datalayer
feature flagFeature.enable(:gitlab_gtm_datalayer)
-
Create a Google Tag Manager account and container ID. You should just need to follow the step 1 of the instructions. The GTM container can be empty - it just needs to exist.
-
In
gitlab.yml
, add a your GTM ID in theextra
block for both thegoogle_tag_manager_id
andgoogle_tag_manager_nonce_id
values. Make sure to restart GDK for settings to take effect.extra: google_tag_manager_id: 'GTM-YOURIDHERE' google_tag_manager_nonce_id: 'GTM-YOURIDHERE'
-
Type dataLayer in the console and you'll see and event with the name
OneTrustCountryLoad
with the respective countryID as the one you're currently in.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.