This guide describes how to implement Google and Microsoft Consent Mode. Converge has additional tools for handling consent for all your destination that you can read about here.
Why implement Consent Mode?
Consent Mode allows you to respect users’ privacy preferences while still collecting meaningful data for analytics and advertising. Without it, you risk either violating privacy laws or losing valuable insight and attribution.Google vs Microsoft Consent Mode
Even though both frameworks are called “Consent Mode” and work similarly, they’re separate. If you use products from both companies, you’ll need to implement both frameworks.Consent Mode process
Google and Microsoft Consent Mode have the same basic requirements:- Default: Set a default consent status for all users before they interact with your cookie banner. You can customize defaults per country.
- Update: When a user makes a choice on your cookie banner, update the Consent Mode status to match.
Consent types
Consent Mode requires you to set statuses for different types of consent. These affect how tracking behaves.Consent type | Description | Required by Google | Required by Microsoft |
---|---|---|---|
ad_storage | Allows storage (like cookies) for advertising. | Yes | Yes |
ad_user_data | Sets consent for sending user data related to ads. | Yes | No |
ad_personalization | Sets consent for personalized ads. | Yes | No |
analytics_storage | Allows storage (like cookies) for analytics. | Yes | No |
You can extend Consent Types, but Google and Microsoft tracking tools won’t use them. Examples: functionality_storage, personalization_storage, security_storage. These add no value for tracking today.
Consent mode behavior
When you have implemented Consent Mode correctly, the tracking products from Google and Microsoft will automatically adjust their tracking behavior based on the consent that has been given. A few examples are:- analytics_storage granted: GA4 web tracking will place cookies and process IP addresses.
- analytics_storage denied: GA4 web tracking will not use cookies or process IP addresses but will send cookieless pings used in behavioral modeling.
- ad_storage granted: Google Ads web tracking will place cookies and process click id’s in the URL.
- ad_storage denied: Google Ads web tracking will not use cookies or process click id’s in the URL but will send cookieless pings used in conversion modeling.
As Google Consent Mode and Microsoft Consent Mode will impact behavior of its tracking based on the users consent, you do not have to set up additional consent settings in Converge. It is best practice to always load Google and Microsoft destinations from Converge, regardless of consent given. Read more about it here.
If you implement Consent Mode after previously tracking users without it, you may see a drop in tracked users or conversions in your Google or Microsoft products.
Implementing Consent Mode
The Google and Microsoft destinations in Converge (like GA4, Google Ads, Microsoft Ads) respect Consent Mode settings automatically but Converge doesn’t set them for you. You have two options:- Consent Management Platform (CMP): Many CMPs (like Cookiebot, CookieYes, OneTrust) offer Consent Mode support out of the box.
- Custom implementation: You can implement Consent Mode manually with developer help.
Key requirements
For Converge to work with your Consent Mode setup:- Set the default consent mode before the Converge JavaScript pixel loads.
- Set the update consent mode (if the user already gave consent) after the default but still before the Converge pixel loads.
Examples
You can use the following examples to implement Consent Mode for Converge.Cookiebot
Cookiebot
Shopify Cookie Banner
Shopify Cookie Banner
Custom implementation
Custom implementation
You can use this code as a basis for your custom implementation. It does not integrate with any cookie banner and it is not set up to process an update with different values for the Consent Types.Add this code before the Converge pixel in the <head> of your website. It:
- Sets default consent statuses for Google Consent Mode and Microsoft Consent Mode.
- Includes an
updateConsent
function to call when a user accepts all cookies or has done previously.
Custom implementation (granted by default)
Custom implementation (granted by default)
If you want to always enable full tracking features in Google and Microsoft tracking you can set a default consent status that sets all Consent Types to granted. As all Consent Types are set to granted by default, you don’t have to sent an update.Add this code before the Converge pixel in the <head> of your website. It:
- Sets default consent statuses for Google Consent Mode and Microsoft Consent Mode with all Consent Types as granted.
Using Consent Mode with Consent settings in Converge
You can also configure which destinations in Converge will load by using the Consent settings for each destinations. Since Consent Mode is already handling how products from Google and Microsoft will behave based on consent given by the user, it is best practice to not enable any additional restrictions in Converge. For the best results you configure consent as followed:- Choose the Analytics or Marketing category based on the type of destination.
- Set the Consent mode setting to Off.

Verify your implementation
You can validate your Google Consent Mode implementation by following these docs. You can validate your Microsoft Consent Mode implementation by following these docs.Disclaimer: This guide provides general information. It is not intended as legal advice, and readers should consult with qualified counsel for advice regarding their specific circumstances. Converge disclaims any liability for actions taken based on the information provided in this post.