Draft: Google Tag Manager/OneTrust Blocker
What does this MR do and why?
OneTrust blocks Google Tag Manager from loading unless if the user consents to both cookie category C0002 and C0004 (performance analytics and targeting). A class attribute needs to be added optanon-category-C0001
to allow GTM to load at all times.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
- 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.
- Grab you GTM id from the admin tab
- 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 (or do this step prior to starting GDK) for settings to take effect.
extra:
google_tag_manager_id: 'GTM-YOURIDHERE'
- Head to the FreeTrial page: /-/trial_registrations/new
- Search for
optanon-category-C0001
orgoogletagmanager
in devtools under elements
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.
Edited by Miracle Banks