Master Microsoft Bing Consent Mode on Magento 2: Setup Guide



Microsoft Bing Ads Conversion Consent Mode for Magento 2 via GTM

Here at Scommerce Mage, we know that driving traffic and conversions is the lifeblood of your Magento 2 store. While you’ve likely spent weeks optimizing for Google, .it’s easy to overlook a critical revenue stream: Microsoft Advertising. That’s why setting up Microsoft Bing Consent Mode on Magento 2 is essential.

But in today’s privacy-focused world, simply having the Bing UET tag on your site isn’t enough. Without a proper consent mode implementation, you’re flying blind. When users decline cookies, you lose valuable conversion data, your remarketing audiences shrink, and your Bing Ads ROAS suffers.

The problem? Most guides are generic. They don’t account for sophisticated, integrated solutions like your Magento 2 store.

That’s where we come in.

This definitive guide will show you how to seamlessly integrate our Scommerce Mage GDPR and GTM Module with Microsoft Bing Consent Mode using Google Tag Manager. We’ll bypass the standard, inflexible setups and build a robust solution that sends the right signals to Bing, every single time.

Why Microsoft Bing Consent Mode is Crucial

With global privacy laws like GDPRePrivacy, and CCPA tightening the way user data is captured and processed, ensuring true cookie consent compliance is now essential—not optional. While platforms such as Google have established Consent Mode, Microsoft Advertising (Bing Ads) has introduced a similar mechanism called Microsoft UET Consent Mode.

This gives you the power to:

  • Respect user privacy preferences
  • Still track conversions compliantly
  • Avoid data loss that impacts ROAS and remarketing
Goal: Ensure Microsoft Bing’s tracking respects cookie consent choices set by the user using our Magento 2 GDPR & Cookie Popup extension—without needing a third-party CMP!

Prerequisites

Before we start, you’ll need:

  1. The Scommerce Mage GDPR and GTM Extension installed and configured on your Magento 2 store.
  2. Your Microsoft Advertising UET Tag ID.
  3. A working Google Tag Manager (GTM) container installed on your site.

The Technical Magic: How Our Module Works with GTM

Our GDPR module is engineered to communicate directly with Google Tag Manager. When a user interacts with the cookie banner on your site, our extension automatically pushes a clean, structured event to the dataLayer. This event, named user_consent_set, contains the user’s precise choices.

{
  event: "user_consent_set",
  gtm: {uniqueEventId: 4},
  ad_storage: "denied",
  ad_user_data: "granted",
  ad_personalization: "granted",
  analytics_storage: "granted",
  consent_timestamp: "2025-07-10T14:38:54.735Z"
}

This is the key that unlocks a truly custom and reliable implementation.

Step 1: The First Step to Microsoft Bing Consent Mode on Magento 2

The standard Microsoft UET tag in GTM lacks the granular control we need. We’ll use a powerful community template instead.

  1. In your GTM container, go to Templates > Tag Templates > Search Gallery.
  2. Search for Microsoft UET Consent Mode. Select the one by mbaersch.
  3. Click Add to workspace and approve the permissions.

Template:- https://github.com/mbaersch/microsoft-consent-mode-tag

Step 2: Configure the “Default” Consent State

First, we set a default, “denied” state that fires on every page load before a user interacts with our cookie banner.

  1. Navigate to Tags > New.
  2. Name the tag Microsoft Consent - Default.
  3. For Tag Configuration, choose the Microsoft UET Consent Mode template.
  4. Consent Command: Set this to Default.
  5. Wait for Update: Set this to 15000 (milliseconds). This gives the user 15 seconds to interact with the banner before the default denied signal is sent, preventing data loss.
  6. ad_storage Status: Set it to Denied. This ensures you are compliant by default.
  7. Triggering: Select the Consent Initialization – All Pages trigger. This is crucial for firing the tag at the earliest possible moment.
  8. Click Save.

Step 3: Create GTM Variables to Read Our Module’s Data

Now, we need GTM to listen for the consent choices sent by the Scommerce Mage GDPR module.

  • Go to Variables > User-Defined Variables > New.
  • Select Data Layer Variable.
  • Data Layer Variable Name: ad_storage (must match the key in the dataLayer push).
  • Name your GTM variable ad_storage.
Microsoft Bing Consent Mode on Magento 2 : Ad Storage Variable
  • Save and check whether your variable is collecting the value correctly

Step 4: Create the Trigger to Fire on User Choice

We need a trigger that fires only when our GDPR module pushes the user_consent_set event.

  1. Go to Triggers > New.
  2. Name the trigger Event - user_consent_set.
  3. For Trigger Configuration, choose Custom Event.
  4. Event name: user_consent_set.
  5. Click Save.
Microsoft Bing Consent Mode on Magento 2: Trigger

Step 5: Configure the “Update” Consent State

This tag will send the user’s actual choices to Microsoft, overriding the default.

  1. Go to Tags > New.
  2. Name the tag Microsoft Consent - Update.
  3. Choose the Microsoft UET Consent Mode template.
  4. Consent Command: Set this to Update.
  5. Ad Storage Status: Click the variable icon (the lego brick) and select your {{ad_storage}} variable.
  6. Triggering: Select the Event - user_consent_set trigger you just created.
  7. Save the tag.

Step 6: Update Your Main Microsoft UET Tag

Finally, we tell your main Bing tag to listen to these new consent signals.

  1. Find your existing Microsoft Advertising UET Tag in GTM.
  2. Click to edit it, then expand the Consent Settings(Experimental) section.
  3. clear the checkboxes for “Enable Consent updates from GTM” and “Inherit Initial Consent from GTM”. This is a critical step that hands over full control to our manual Default and Update tags.
  4. Ensure its trigger is set to Initialization – All Pages.
  5. Save the tag.

Verification: Confirming Your Microsoft Bing Consent Mode on Magento 2 Setup

You don’t have to guess if it’s working. You can prove it.

  • Enter GTM Preview Mode and navigate to your Magento 2 store.
  • Open your browser’s Developer Tools (F12 or Cmd+Opt+I) and go to the Network tab. Filter the requests by typing bat.bing.com.
  • Before clicking the cookie banner: You will see a bat.bing.com request. Click it. In the request URL (under Headers), look for the asc parameter. It will be asc=f (false). This is your Default state working perfectly.https://bat.bing.com/action/0?ti=...&Ver=2&mid=...&asc=D...
Microsoft Bing Consent Mode on Magento 2 : Denied
  • Now, accept cookies using the Scommerce Mage banner.
  • A new bat.bing.com request will fire. Inspect this new one. The asc parameter will now be asc=t (true). You will also see Microsoft cookies (_MUID_MUIDB) being set in the Application tab. This is your Update state working perfectly.https://bat.bing.com/action/0?ti=...&Ver=2&mid=...&asc=G...
Microsoft Bing Consent Mode on Magento 2 : Granted

Take Control of Your Microsoft Bing Ads Data Today

By pairing the Scommerce Mage GDPR and GTM module with this GTM configuration, you’ve built a best-in-class consent solution for your Magento 2 store. You’re now fully compliant, capturing more valuable data, and empowering Microsoft’s algorithms to get you the best possible return on your ad spend.

This entire set up is included with our GTM module and you can directly use the setup using the import file provided with the module. Ready to unlock accurate Bing Ads tracking on your Magento 2 store?

Similar Posts