Working with Google Consent Mode v2 + Automatic Blocking Code
The Google Consent Mode differentiates between two modes: Basic Implementation and Advanced Implementation. When using automatic blocking some settings need to be done in order to achieve the implementations:
Note: This page describes the use case when you are using Automatic Blocking Code and Google Analytics or Google Ads Tracking directly in the website (no GTM is used). For GTM use cases please see here.
Google Consent Mode v2 "Basic Implementation" via Automatic Blocking Code
If you are using the automatic Blocking Code in your website and want to achieve the "Basic Implementation" (also known as "hard blocking"). The advantage here is a higher legal safety. The downside is a less accurate tracking (for users that did not give consent).
You will not need to do any additional changes. Please keep sure that you have the Automatic Blocking code correctly implemented:
- Ensure the Automatic Blocking Code is placed before any Google Code
- Ensure Google Analytics, Google Ads or the other Google services are in your vendorlist
Google Consent Mode v2 "Advanced Implementation" via Automatic Blocking Code
The Advanced Implementation is the way in which the Google Analytics Tags or Google Ads Tags are fired even if no consent is given. In this case the Consent Mode signals are used to tell Google Analytics or Google Ads to limit the tracking. This is usually also called "soft blocking". The advantage here is a higher accuracy in tracking. The downside is a lower legal safety.
In order to implement the Advanced Implementation of either Google Analytics or Google Ads when Automatic Blocking is used please follow these steps:
- Ensure that the Automatic Blocking Code is placed before any Google Code
- Add the attribute
data-cmp-ab="1"to all Google Codes in your website
- (optional, for higher accuracy) Ensure that Google Codes are not blocked by the Automatic Blocking Code by adding the following domains to the list of ignored domains:
(add more google... domains according to your country)