Help centre · Microsoft UET Consent Mode
Send Microsoft Ads the visitor’s choice
Connect your Microsoft Advertising UET tag to Velo, so it follows each visitor’s advertising choice, then test the signal and the cookies.
How Velo controls UET
Microsoft Advertising needs a consent signal from UET for visitors in the European Economic Area, the UK and Switzerland. Without one, it stops tracking your UET conversions and filling your remarketing lists.
Velo sends that signal for you. UET reads one value, ad_storage, and Velo ties it to the Advertising category. There is nothing to switch on in Velo.
| Visitor | ad_storage | UET cookies |
|---|---|---|
| Has not chosen yet, in a region where consent comes first | denied | None yet |
| Allows advertising | granted | Set |
| Rejects advertising, or withdraws it later | denied | None, and Velo deletes existing ones |
| Has not rejected, in a region where tracking is on by default | granted | Set |
Your regional settings decide which regions ask first.
Set up UET in your website
Keep your UET tag and install Velo as usual. UET loads straight away and sends only anonymised data until the visitor allows advertising. Microsoft calls this Advanced Consent Mode and recommends it.
Velo’s snippet loads asynchronously, so UET can start first. Add the default line right after the UET tag, so its first event waits for Velo and is denied if Velo is late.
Example only · use your own site ID<script>
/* Microsoft’s UET tag, unchanged */
</script>
<script>
window.uetq = window.uetq || [];
window.uetq.push('consent', 'default', { ad_storage: 'denied', wait_for_update: 500 });
</script>
<script src="https://cdn.veloconsent.com/v1/velo.js"
data-api="https://app-staging.veloconsent.com"
data-velo-site="YOUR-SITE-ID"
async></script>Do not add your own consent update. Velo sends one each time a choice takes effect, on every page.
Block UET until the visitor accepts
If you want nothing from UET before a choice, mark the tag so it stays inert. Velo runs it when the visitor allows advertising. Microsoft calls this Basic Consent Mode, and its conversion modelling is more generic with this setup.
Example only<script type="text/plain" data-velo-category="ads"> /* Microsoft’s UET tag, unchanged */ </script>
Set up UET in GTM
- Install Velo with the Velo CMP template on Consent Initialization - All Pages.
- Add UET with Microsoft’s official UET template. It reads the consent state from GTM.
- In the template’s consent options, keep Enable consent updates on.
- Turn on Inherit initial consent, so a returning visitor’s choice still counts when the UET tag fires after Velo has applied it.
Read Microsoft’s GTM template guide for the template’s full options.
Test the signal
- Open your site in a fresh private window, with the Network panel filtered to
bat.bing. Microsoft’s UET Tag Helper extension shows the same value. - Before you choose, UET requests carry
asc=Dand there are no_uetsidor_uetvidcookies. - Choose Accept all. A new request carries
asc=G, and both cookies appear. - Reload the page. Events still carry
asc=G. - Reject from the privacy button. A new request carries
asc=D, and the cookies are gone.
Then, in Microsoft Advertising, go to Conversions → UET and read the Consent signal column. Healthy means more than 75% of the last seven days’ events had a valid signal. The Test your tag tab shows it for a single session.
When a visitor withdraws
Velo sends denied, then deletes UET’s IDs from your site: the _uetsid, _uetvid and _uetmsclkid cookies and their copies in local storage. It leaves _uetmsdns, Microsoft’s opt-out flag, in place.
Cookies Microsoft sets on its own domains are out of reach from your site. With consent denied, Microsoft says it does not write its third-party cookies and reads them only for fraud and spam checks.
If you also use Microsoft Clarity
Clarity has its own consent signal, separate from UET’s. Velo sends it with Microsoft’s Clarity Consent API each time a choice takes effect, on every page. analytics_Storage follows the analytics category and ad_Storage follows the advertising category. A visitor in an opt-in region who has not chosen yet counts as denied. You do not need to add any code.
In Clarity, open your project’s Settings → Setup and turn off its cookie setting, so Clarity waits for the signal everywhere. Microsoft already does this for visitors in the European Economic Area, the UK and Switzerland. With the setting on, Clarity can write its cookies before Velo’s signal arrives.
Clarity still runs before a choice and after a rejection, without its cookies and with a new ID on each page view, and it still sends page data to Microsoft. If you want nothing from Clarity until the visitor allows analytics, mark its tag with type="text/plain" and data-velo-category="analytics". Velo runs it at that point.
To test the signal, open your site in a fresh private window and run clarity('metadata', (d, u, consent) => console.log(consent), false, true, true) in the console. Before you choose, both values read denied. After Accept all, both read granted and the _clck and _clsk cookies appear. A blocked tag has nothing to show until you accept.
When a visitor withdraws, Velo sends denied and deletes _clck, _clsk and _cltk from your site. Cookies Microsoft set on its own domains once the visitor allowed advertising, such as MUID, stay there, because your site cannot reach them.
A visitor who arrives with Clarity cookies from another consent tool, or from an older version of your policy, loses them before choosing. If they then accept, Clarity counts them as a new visitor.
Velo is not on Microsoft’s list of supported CMPs. It uses the Consent API Microsoft offers for consent tools that are not on the list.
If something does not look right
UET still sends requests after a rejection.
That is how Advanced Consent Mode works. The requests carry asc=D and no visitor ID. If you want no requests at all, block the tag.
The first event shows asc=D for a visitor who already accepted.
The event left before Velo applied the saved choice, usually on a slow connection. A consent event with asc=G follows, and later events carry it. If it happens on most pages, check that the default line is on the page and that nothing delays velo.js.
The Consent signal column says Moderate or Missing.
Some of your pages are sending events without a signal. Check that Velo is on every page and template that has the UET tag. The status covers the last seven days, so give it time after a fix.
Another consent tool or TCF is also on the site.
Microsoft says never to use Consent Mode and TCF together. Remove the other tool, along with any consent updates you added for UET, then test again.
Still stuck?
Tell us where you got to and we will pick it up from there.