This guide is meant to provide you with a complete walk-through on how Google Consent mode can be implemented using Usercentrics CMP, and the minimum info to recognize a Google Consent mode implementation and troubleshoot it. This guide will not explain how to block scripts or GTM tags. About that, please refer to the following articles:
Important
Google Ads consent controls: change effective June 15, 2026. Please find more details here: Google Consent Mode General Information
You can start here and read through, or go directly to the section you need:
About Google Consent Mode in short
Setting up Google Consent mode with Usercentrics
How to check if Google Consent Mode is properly implemented
About Google Consent Mode in short
Google Consent mode is an additional implementation required by Google that adjusts the tracking behavior of Google products (like Google Analytics or Google Ads) based on the user's consent choice. A complete implementation requires:
- The "Consent Default" event, which loads first on every page,
- The "Consent Update" event, which loads on the page after the user makes a consent choice.
These events must happen on the same page load and need to set the consent values of the 4 parameters that are part of Google Consent mode V2, namely:
- ad_storage
- analytics_storage
- ad_user_data
- ad_personalization
These parameters can receive two values, either granted or denied.
Depending on how scripts are fired relative to the consent choice, Google Consent mode can have two types of implementation:
- Basic: no script is loaded on the page until a consent choice is made
- Advanced: scripts are loaded before a consent choice is made, and are adjusted depending on the values of the 4 parameters.
For a more detailed explanation of Google Consent mode and its requirements, you can refer to Google's official documentation:
You can also learn more about the differences between basic and advanced implementations in our detailed article Advanced and Basic Google Consent Mode v2.
Setting up Google Consent mode with Usercentrics
The consent default event
As described above, the implementation of Google Consent mode requires the loading of the Consent Default event on every page. The event has to set the default consent for the 4 parameters based on the legal framework required for that specific user. For example, a European user who falls under GDPR requires that all parameters are set as denied in the default event. Usercentrics CMP does not handle the default event natively, so it can either be added manually with a script or it can be handled via the Usercentrics GTM template.
Adding the default event manually
The consent default event can be added manually via the following script:
<script>
gtag('consent','default',{
'ad_storage':'denied',
'ad_user_data':'denied',
'ad_personalization':'denied',
'analytics_storage':'denied',
'functionality_storage': 'denied',
'personalization_storage': 'denied',
'security_storage': 'granted'
});
</script>
Depending on your implementation, you might also need to define the gtag function and the dataLayer object if these have not been defined previously. In this case, the script will look as follows:
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('consent','default',{
'ad_storage':'denied',
'ad_user_data':'denied',
'ad_personalization':'denied',
'analytics_storage':'denied',
'functionality_storage': 'denied',
'personalization_storage': 'denied',
'security_storage': 'granted'
});
</script>The script for the default event needs to be added as high as possible in the head of the page, after the banner, so that it is loaded before other tracking scripts. If it does not include any event for a Google product, like for example the configuration for GA4 as described in the next code block, it does not need to be adjusted.
gtag('config', 'STREAM_ID')If you need to set the default event and other scripts for Google products, you can keep them in separate elements and adjust only those that track the user's behavior on the page.
Adding the default event via the Usercentris template
The GTM template for Usercentrics has a dedicated section to handle the default event, as well as multiple regions. In the template, scroll down to the section that reads "Default Consent State" and click on " Add region".
In the following menu, add a region if necessary, using the ISO code for the specific region or regions separated by a comma. If no region is added, this setting will be used globally. After that, add the default value for the 4 parameters based on the legal requirement for that region, and click on "Add".
Save the tag and publish the GTM container.
The consent update event
The banner is set to push the update event by default. Still, make sure that Google Consent mode is enabled for your configuration. You can find the toggle in the admin interface following the path: Configuration > CMP Settings
ATTENTION
Usercentrics does not map Google Consent mode to categories but to a series of Google Services from our database. The parameters and services are mapped as follows:
| Name | Template Id | Consent Type |
| Conversion Linker | LykAT-gy | ad_storage |
| Display & Video 360 | UekC8ye4S | ad_storage |
| Google Ads | S1_9Vsuj-Q | ad_storage |
| Google Ads Conversion Tracking | twMyStLkn | ad_storage |
| Google Ads Remarketing | B1Hk_zoTX | ad_storage |
| Google Analytics | HkocEodjb7 | analytics_storage |
| Google Analytics 4 | 87JYasXPF | analytics_storage |
| Google Campaign Manager 360 | dyHOCwp5Y | ad_storage |
| Search Ads 360 | DHS2sEi4b | ad_storage |
The remaining parameters for Google Consent mode V2, namely ad_personalization and ad_user_data, will follow the value set for ad_storage.
If no service is added to your configuration, or it is added as a custom service, no parameter will be updated when the update event is added to the page.
If more than one service is added for the same parameter, all services need to have consent set to true for the parameter to be set to granted in the update event.
To have a complete and correct update event, please make sure that at least one service for each parameter is added to your configuration.
ATTENTION
Depending on the specific implementation, the scanner might not pick up all services on the page; therefore, it might be necessary to add the service manually. To do that, follow the path Service Settings > Data Processing Services, and click on the button at the bottom that reads "Add DPS via Database" and search for the service name in the widget. Select the service with the correct id, add it to one category, and click "Add DPS".
Important
- The remaining parameters, functionality_storage, personalization_storage, and security_storage, are not part of Consent mode as they do not affect tracking behavior. For this reason, our banner does not update them.
- Google Consent mode affects the tracking behavior of Google products only; non-Google scripts and tags will still need to be adjusted to be compliant.
How to check if Google Consent Mode is properly implemented
The correct setup of default and update events is the minimum requirement for a Google Consent mode implementation. Based on whether you want to use the Basic or the Advanced, you might still need to adjust scripts or tags. You can find more information in the articles mentioned at the beginning of this article.
The steps to check the implementation of Google Consent mode are:
- Check whether the two events are pushed within the same page load
- Check whether the parameters are updated correctly
Additionally, it is worth checking whether events are being sent to Google platforms with the correct consent value. Google platforms can send two values that describe the consent status. The two parameters change depending on the Google Consent mode version and are:
- gcs: with value G1--, where the two last digit described ad_storage and analytics_storage, with a O(denied) or a 1(granted)
- gcd: that contains the consent state of both events for all Google Consent mode V2 parameters in one string.
The latter parameter can be hard to read; therefore, you can use a Google Consent mode decipher (as this one, for example)
Depending on your preference, these checks can be made in the Tag Assistant preview or the Chrome Dev Tools.
Tag Assistant preview
- Open the GTM preview or use this link https://tagassistant.google.com/
- Enter your website URL and load the page
First, check if in the column on the left you can see the two events. Second, click on the Consent section in the middle of the page, and check the parameter values for each event. If you don't see any data, please make sure to click on the domain name at the top of the columns on the left, which will show a summary of all events that happened during this page load.
If you are viewing the data for a Google Tag and not Google Tag Manager (the highlighted ID on the top is not GTM-XXXXX), you can also view the data sent for a specific event. Click on the domain name to view all hits sent, and click on one hit to expand the data.
Check the gcs and gcd parameters sent with that event.
If the parameters mirror the settings for both the default and update event, the implementation of Google Consent mode is complete.
Dev tool:
Load the page and open the Dev Tool console. Look for a variable called dataLayer and expand the resulting object. Check if there is a default event and an update event, and if the update event follows the consent choice set by the user.
Additionally, you can check if the consent signals are being sent with the network request to the Google servers. Open the network section, reload the page if necessary, and search for either collect (GA4) or random (Google Ads). You should see a network request that contains the stream ID of your GA4 or your Google Ads conversion ID. Open the request, click on payload, and check the parameters that have been sent. Depending on the version, there might be one or both of these parameters:
If the parameters mirror the settings for both the default and update event, the implementation of Google Consent mode is complete.