What Bing Consent Mode is
When the Microsoft UET (Universal Event Tracking) tag fires, it sends a consent parameter that tells Microsoft whether the visitor agreed to advertising cookies. Two values, two outcomes:
denied— the tag fires but doesn’t drop advertising cookies, doesn’t track conversions for remarketing, doesn’t build retargeting audiences from this visitor.granted— the tag behaves normally: cookies, conversions, audiences, everything.
In code, the UET tag is set with a default consent state right after it loads, and updated when the visitor changes their mind:
html
<script>
window.uetq = window.uetq || [];
window.uetq.push('consent', 'default', { 'ad_storage': 'denied' });
</script>
When the visitor accepts:
html
<script>
window.uetq = window.uetq || [];
window.uetq.push('consent', 'update', { 'ad_storage': 'granted' });
</script>
For EU traffic under GDPR, the default state must be denied and only flip to granted after the visitor’s explicit opt-in. PixelYourSite handles the UET tag injection and the consent signal. You only need to decide which consent plugin drives the opt-in.
Three setup paths
| Setup | Bing tag | Consent plugin | When to use |
|---|---|---|---|
| Recommended | PYS Bing add-on | ConsentMagic | New install, or you want the cleanest path. Native integration, no configuration glue. |
| Alternative 1 | PYS Bing add-on | Any other consent plugin that supports filters | You’re committed to a different consent tool (Cookiebot, Complianz, Iubenda, etc.). Use the PYS filter pys_disable_bing_by_gdpr to tell PYS the visitor’s state. |
| Alternative 2 | PYS Bing add-on | None, or a consent plugin that blocks scripts upstream | Your consent plugin blocks the Bing tag entirely until consent is given. PYS sends granted on every fire, because the tag only runs when consent is already there. |
Recommended: PixelYourSite + ConsentMagic
- Install the Bing add-on for PixelYourSite Pro. Add your UET Tag ID in PixelYourSite Pro → Bing.
- Install ConsentMagic and configure the banner. Default rule for the EU region: ask first, deny by default.
- That’s it. ConsentMagic writes the Bing consent state via PYS’s native integration (
cs_bing_consent_mode.ad_storage). The UET tag fires on every page with the correct consent value automatically.
Alternative 1: PixelYourSite + another consent plugin
PYS exposes a developer filter, pys_disable_bing_by_gdpr, that any consent plugin can hook into. When the filter returns true, PYS sets Bing Consent Mode to denied. When it returns false (the default), PYS sets it to granted.
For Cookiebot specifically, PYS includes a built-in mapping. In PixelYourSite Pro → GDPR there’s a field Bing consent category (default value marketing) that ties the Bing consent state to the category Cookiebot uses for marketing.
For other plugins (Complianz, Iubenda, OneTrust, custom), hand the developer this filter and the category name they should map to:
php
add_filter( 'pys_disable_bing_by_gdpr', function( $disabled ) {
// return true if the visitor hasn't granted marketing consent
return ! my_consent_plugin_has_marketing_consent();
} );
Alternative 2: Fire Bing tags with consent already granted
For sites where the consent plugin blocks the UET tag from loading at all until consent is given, PYS doesn’t need to send denied. In PixelYourSite Pro → Bing settings, enable Fire Bing tags with consent mode granted. PYS sends granted on every fire, because if the script ran, consent must already be there.
This is the right path when:
- Your consent plugin uses script blocking (the Bing tag literally doesn’t execute pre-consent).
- Your traffic isn’t subject to GDPR and you don’t want a consent banner at all.
It’s the wrong path when the Bing tag fires before consent is given. In that case the visitor gets tracked as granted without their actual opt-in, which is a GDPR violation.
Verify it’s working
Install the Bing Pixel Helper Chrome extension.
- Open your site in an incognito window so no prior consent is cached.
- Open the Bing Pixel Helper. Go to Events. Click Parameter details on any reported event.
- Find the
ascparameter.D= Denied.G= Granted.
- Accept ad/data consent in your banner.
- Reload. The
ascvalue should flip fromDtoG.
If asc is D after you accepted consent, your consent plugin isn’t telling PYS about the change. If it’s G before you accepted, your default state is wrong.
Things to know
- GDPR isn’t the only consent regime. UK GDPR, Switzerland’s revFADP, Brazil’s LGPD, and several US state laws (CCPA / CPRA, Virginia, Colorado) follow similar logic. Use Consent Mode for any region with explicit opt-in requirements; check with legal counsel about which regions apply to your traffic.
- Bing Consent Mode is per-visit. A visitor who declines on day one, returns and accepts on day five, will start counting toward conversions from day five. Earlier visits aren’t retroactively granted.
- No conversion attribution without consent. A visitor who never accepts ad cookies won’t appear in Bing Ads conversion reports for that visit, even if they purchased. The UET tag still fires, but Microsoft doesn’t tie the conversion to the click.
- Don’t double-block. If your consent plugin both blocks the UET script upstream AND PYS sends
denied, the tag runs zero times. Use one mechanism at a time. The Recommended setup uses ConsentMagic’s signal, not script blocking, so the UET tag fires on every page with the consent state attached. - Bing modeled conversions. Microsoft uses modelling to estimate conversions lost to declined consent. Coverage depends on data volume; small advertisers see less.