How we added Microsoft Ads consent tracking to Magento with Absolute Consent Mode

7 August 2025

Most Magento stores using Amasty’s GDPR and Consent Mode modules are well-covered for Google tools, but Microsoft Ads (UET) often gets left behind. We built a custom Magento module to bridge that gap.

Magento consent mode limitations


Managing user consent across multiple marketing platforms is essential for compliance. Consent can be granted by a user when they select an option on the cookie dialog. This consent state is sent to Google using GTM on every subsequent page load. However, there is no out-of-the-box support for sending consent state to UET in the Amasty modules. 


Why we built a Magento UET consent module

 

To overcome this, we implemented a solution to add this feature. It was originally developed for our client, Furniture @ Work. Their website uses both GTM and UET and they wanted the consent state to appear in both their Google GTM and Microsoft Ads UET accounts.

 

How our Magento consent module works

 

Our module builds on the Amasty GDPR Cookie and Pixel modules to enable Microsoft Ads tracking based on the user’s consent choice.

 

The module extends the existing Amasty consent system with the following flow:

 

  • Visitor makes consent choice (i.e. Allow/Decline cookies)

  • Consent choice is stored in Amasty Cookie Storage

  • When events are triggered (eg. page load), consent state is retrieved from cookie

  • Consent state is sent to Microsoft

 

Managing user consent in Magento for Microsoft Ads

 

Consent management isn't just about collecting a yes or no — it’s about ensuring every tool on your site behaves responsibly based on what the user chooses. The Absolute ConsentMode module hooks into Amasty's consent workflow and applies the user’s preference.

 

Here’s a breakdown of how the module responds to different consent scenarios:

 

User accepts all cookies:

  • Consent state set to "granted"

  • UET tags fully initialise and track events

 

User declines all cookies:

  • Consent state set to "denied"

  • UET sends cookieless pings only

 

User selects specific preferences:

  • Only selected cookie groups are active

  • UET responds accordingly

 

Magento module features for Microsoft Ads consent

 

To make Microsoft Ads consent tracking work seamlessly alongside existing tools, we extended Amasty's modules with a few lightweight but powerful technical enhancements.

 

These additions ensure the system behaves intelligently based on user choices, without bloating the site or requiring major structural changes.

 

JavaScript Mixins:

Custom mixins intercept Amasty’s consent manager and extend it to send consent state to Microsoft Ads.

 

Template override:

A custom consent.phtml adds the Microsoft logic to Amasty’s interface.

 

Event Listeners:

The module listens for Amasty’s amcookie_save and amcookie_allow events to trigger updates.

 

Best practices:


All customisations were made using Magento development best practices, ensuring the code is stable, maintainable and plays nicely with the existing extensions.

 

Testing consent tracking in Magento

 

We validated consent handling by:

  • Clearing cookies and testing various consent scenarios

  • Verifying network calls to bat.bing.com

  • Checking the asc=G (granted) and asc=D (denied) parameters via browser dev tools

 

Outcome and results for consent tracking in Magento

 

With Absolute ConsentMode, our Magento clients can now manage Microsoft Ads tracking with the same precision and flexibility as Google tools. It’s another step toward unified, GDPR-compliant tracking in multi-platform environments.

 

Need consent management across multiple platforms?

 

We can tailor custom solutions like this for your Magento website, get in touch to learn more about our Magento support services and how we can boost your store's performance and support your growth.

 

Contact Us to discuss how we can help increase sales and boost your online performance!

INSIGHTS

CONTACT

Are you excited to get your next project up and running? Or are you unsure what is dragging you down?

Contact Us to discuss how we can help increase sales and boost your online performance!

files/ContactUsBlockDesktop_fede44d1-525a-48b1-9790-5fa1703ec11c.jpg

Enter your email address to sign up to our newsletter, featuring case studies, insights, industry news and much more.

If this is something you would like help with, please get in touch.