Skip to content

OneTrust Country ID

Miracle Banks requested to merge ot-countryID into master

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

Changes you'll see image

How to set up and validate locally

  1. In the rails console, enable the gitlab_gtm_datalayer feature flag

    Feature.enable(:gitlab_gtm_datalayer)
  2. 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.

  3. Grab your GTM ID from the Admin Tab Screenshot_2022-12-02_at_2.14.37_PM

  4. 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 for settings to take effect.

    extra:
     google_tag_manager_id: 'GTM-YOURIDHERE'
     google_tag_manager_nonce_id: 'GTM-YOURIDHERE'
  5. 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.

Edited by Miracle Banks

Merge request reports