Skip to main content
All CollectionsGoogle consent mode v2
Disable Google consent mode v2
Disable Google consent mode v2

Learn how to disable Google consent mode v2 in Cookie Information.

Updated over a week ago

In this article, we’ll show you how to disable Google consent mode v2.

Before you start

Here are a few things to know before you start:

  • All consent solutions created on or after February 12, 2024, include the default template and the main installation code that help you use Google consent mode v2.

    However, to disable Google consent mode v2, you’ll need to change the cookie consent popup template and remove the Google consent mode v2 attribute from the main installation code.

  • To meet the requirements of the Danish Data Protection Agency (Datatilsynet), we recommend using Overlay v2 or Overlay v3 templates.

  • Changing the cookie consent template applies only to the current consent solution and the domains connected to it. It won’t affect other consent solutions within your account.

  • Google consent mode v2 processes the consent preferences of your users obtained through your consent popup. It adjusts the functioning of analytics, ads, and third-party tags responsible for creating or accessing cookies based on these preferences.

    There are two different modes available in this version: basic and advanced. You can implement both in Cookie Information. The basic consent mode doesn’t allow you to collect any user data, not even consent status until the user agrees. In the advanced consent mode, Google tags are loaded before the consent popup displays to users. Google collects cookieless data without personal identifiers.

Disable Google consent mode v2

To disable Google consent mode v2, follow these steps:

1. Log in to Cookie Information.

2. Go to Consent solutions.

3. Find the consent solution where you want to change the cookie consent popup template.

Choose consent solution in Cookie Information

4. Navigate to Pop-up appearance and click the Template drop-down list under Change template.

5. Choose the Overlay v2 or Overlay v3 templates.

Choose cookie consent overlay v2 in Cookie Information

6. Click Save and publish.

Note: Changing your template will reset any customizations including text or styling, you have made earlier.

7. Go to your website's source code.

8. Remove the Google consent mode v2 attribute data-gcm-version="2.0" from the main installation code.

Your script should look like this

<script id="CookieConsent" src="https://policy.app.cookieinformation.com/uc.js"
data-culture="EN" type="text/javascript"></script>

Note: The attribute data-culture = "EN" controls the language in which the popup will appear on the page – in this example, it will be displayed in English. To change the language, set the data-culture attribute to a different language code. For more details, see this article.

9. (Optionally) If you had an advanced Google consent mode v2, remove the following code snippet from your website source code:

<script>
window.dataLayer = window.dataLayer || [];
function gtag(){ dataLayer.push(arguments); }
// Set default consent to 'denied' as a placeholder
// Determine actual values based on customer's own requirements
gtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied',
'wait_for_update': 500
});
gtag('set', 'ads_data_redaction', true);
gtag('set', 'url_passthrough', true);
</script>

Related articles

Did this answer your question?