Complianz Privacy Suite

Upgrade to Google Analytics 4

Aert Hulsebos

Aert Hulsebos

Categories

Popular articles

TCF for WordPress

The Transparency Consent Framework () is an initiative by IAB Europe and IAB Tech Lab to provide a platform for vendors, publishers, and consent management

Read More

TCF V2.0 release (Update)

Update: Released on October 5th 2020 Since August 15th the Transparency and Consent Framework V2.0 from IAB Europe or V2 has been adapted by Google

Read More
Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Update: you can now add your G-*** tracking code in Complianz and it will be handled for you.

If you want to upgrade to Google Analytics 4 you will need to upgrade your tracking code. If you have implemented Analytics with Complianz, please follow these instructions or wait until we have updated Complianz to handle this for you. We are working on full integration with Google Consent Mode and gtag.js to adhere to the new structure.

If you can’t wait, please follow these instructions. If you know your way around gtag.js and javascript, this article will have an overview of how to proceed.

  1. Upgrade to Google Analytics 4 – and collect your Measurement ID (instead of UA-****-* you will get a G-****-*)
  2. Go to the Complianz Wizard – Cookies – Statistics and now choose either:
    1. Yes, Anonymous (to set analytics before consent)
    2. Yes, and the personal data is available to us ( to set analytics after consent on the statistics category)
  3. Change the G-code in the below script and add this to your website (outside of Complianz) for example with a plugin like Header Footer Code Manager
  4. Done. Now Complianz will recognize the script, and you can use gtag.js for Google Analytics 4. For more events and granular consent, please visit this article.

Yes, Anonymous (to set analytics before consent)


<script async type="text/javascript" class="cmplz-native" src="https://www.googletagmanager.com/gtag/js?id=G-7KV63YNMJS"></script>
<script type="text/javascript" class="cmplz-native">
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
gtag('config', '<G_MEASUREMENT_ID>', { 'anonymize_ip': true });
</script>

Yes, and the personal data is available to us ( to set analytics after consent on the statistics category)


<script async type="text/plain" class="cmplz-stats" src="https://www.googletagmanager.com/gtag/js?id=G-7KV63YNMJS"></script>
<script type="text/plain" class="cmplz-script">
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
gtag('config', '<G_MEASUREMENT_ID>')
</script>

Recent articles

Subscribe