How to implement Microsoft Ads Consent Mode with CookieFirst?
Over the course of the next months we will add it natively in our banner code but for now it's easy to implement consent mode. Just take the following helper script and put it in the <head> of the website before the UET code or if you're using gtm just put it above the gtm script.
<script>
function handleConsentChange(e) {
var consent = e.detail || {};
var advertisingConsent = consent.advertising || null; // Get advertising consent from event detail
// Set default Bing Ads consent to 'denied'
window.uetq = window.uetq || [];
window.uetq.push('consent', 'default', {
'ad_storage': 'denied'
});
if (advertisingConsent === true) {
// Bing Ads: Push Ads enabled
window.uetq.push('consent', 'update', {
'ad_storage': 'granted'
});
} else if (advertisingConsent === false || advertisingConsent === null) {
// Bing Ads: Push Ads Disabled
window.uetq.push('consent', 'update', {
'ad_storage': 'denied'
});
} else {
console.error("Unexpected advertising consent value:", advertisingConsent);
}
}
// Add event listeners for cf_consent and cf_consent_loaded
window.addEventListener("cf_consent", handleConsentChange);
window.addEventListener("cf_consent_loaded", handleConsentChange);
</script>
Microsoft Ads Consent Mode: Enhancing Privacy and Compliance
In today's digital marketing world, privacy regulations like GDPR have made it essential for businesses to respect user preferences regarding data collection. Microsoft Ads Consent Mode is a powerful tool that helps advertisers balance compliance with effective campaign performance.
Consent Mode adjusts how Microsoft Ads collects and processes data based on user consent. When a user grants consent, data collection proceeds as usual, allowing full tracking of conversions and remarketing. However, if consent is denied, Microsoft Ads limits data collection to non-personalized data, ensuring compliance without compromising all insights.
Why is this Important?
Consent Mode helps businesses navigate privacy regulations while maintaining ad performance. By respecting user preferences, companies can build trust while still gathering essential data to optimize their campaigns. Additionally, it allows advertisers to create accurate remarketing lists and conversion tracking, even when consent isn't granted, by using non-personalized data.
To implement Consent Mode for Microsoft Ads effectively, ensure that your website's tracking tags are properly configured to respond to user consent. This approach ensures that your campaigns remain compliant and effective, providing a seamless user experience.
By integrating Microsoft Ads Consent Mode, you can protect your business from potential legal issues while optimizing your ad performance. It's a win-win for both privacy and marketing.
For more details, you can visit the official Microsoft Ads Help page.