Skip to content

Draft: Google Tag Manager/OneTrust Blocker

Miracle Banks requested to merge gtm-ot-blocker into master

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.

Changes you should see locally Screenshot_2022-12-02_at_2.22.52_PM

How to set up and validate locally

  1. 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.
  2. Grab you GTM id from the admin tabScreenshot_2022-12-02_at_2.14.37_PM
  3. In gitlab.yml, add a your GTM ID in the extra block for both the google_tag_manager_id and google_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'
  1. Head to the FreeTrial page: /-/trial_registrations/new
  2. Search for optanon-category-C0001 or googletagmanager 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.

Edited by Miracle Banks

Merge request reports

Loading