Home > Docs > GDPR Cookie Consent > Consent-Driven UET: Using GTM and CMP to Track Responsibly

Consent-Driven UET: Using GTM and CMP to Track Responsibly

Last updated on June 19, 2025

This article provides a straightforward explanation of how setting up Google Tag Manager (GTM) and a Consent Management Platform (CMP) can help ensure Universal Event Tracking (UET) functions correctly based on user consent. GTM is configured to listen for consent signals provided by the CMP and is set up to trigger the UET tag only when the user has granted appropriate consent, particularly for advertising cookies. The following section outlines a step-by-step process to implement this setup effectively.

  1. Add Consent Management Platform (CMP) : Install the GDPR cookie Consent plugin. It sets a cookie or data layer variable that records consent choices (e.g., for analytics and marketing).
    1. In the General tab, choose the consent law as GDPR.
    2. From the Google Consent Mode tab Enable GCM.
  2. Create a variable(Ads_Variable): In the Google Tag Manager, create a variable of type 1st party cookie to set the triggers necessary for the Microsoft Advertising tag to fire. Inside this variable (say Ads_Variable), set the plugin’s cookie name as wt_consent.
Custom variable in GTM - Consent Driven UET
Custom variable in GTM – Consent driven UET
  1. Create a trigger (Ads_trigger): In this step, let’s create a trigger (say Ads_trigger) that enables UET consent mode when consent mode is enabled through the plugin.
    • Create a trigger of type Custom Event.
    • Provide the event name as wcc_gcm_consent_update.
    • Select the Some Custom Events radio button.
    • Now select the variable created in the previous step (Ads_Variable) and specify the condition as shown in the illustration below.
Custom trigger in GTM - Consent Driven UET
Custom trigger in GTM – Consent driven UET
  1. Create Microsoft Advertising UET Tag: Create a Microsoft UET tag to collect data about the user’s consent choices on your website.
    • In the Google Tag Manager, click on New tag.”
    • In the Tag Configuration pane, search and choose the tag type as Microsoft Advertising Universal Event Tracking.
    • Ensure that the track type is set to UET config/page view (required).
    • Enter your Microsoft Advertising UET Tag ID. You can find the tag ID in Microsoft Advertising by selecting Conversion Tracking > UET tags.
    • Set the triggers to ‘Ads_trigger’. Ads_trigger is the custom trigger we created to read consent choices from the data layer.

For more detailed steps, follow the instructions in the article: Set up UET tags using Google Tag Manager for a comprehensive guide.

Microsoft Advertising UET Tag - Consent driven UET
Microsoft Advertising UET Tag – Consent driven UET