Complianz Privacy Suite

Upgrade to Google Analytics 4

Aert Hulsebos

Aert Hulsebos

Categories

Popular articles

Records of Consent

Table of Contents Records of Consent is available in premium, from 4.9.2 onwards In the free plugin and our premium plugin below version 4.9.2 we

Read More

Integrations for WooCommerce

In this article, we will explain the many integrations available for your WooCommerce shop. We will look at specific questions in our wizard and configuring

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