Advertising cookie · Microsoft Advertising

_uetvid Cookie: What It Is, Who Sets It, and Consent Rules

Last verified 2026-10-17 · Updated 2026-10-17

On this page
  1. What the _uetvid cookie does
  2. Who sets the _uetvid cookie
  3. Does the _uetvid cookie need consent?
  4. How to block the _uetvid cookie
  5. How long the _uetvid cookie lasts
  6. Cookies that work with _uetvid
  7. Scripts and requests of Microsoft Advertising
  8. Changes to the _uetvid cookie
  9. _uetvid cookie FAQs

What the _uetvid Cookie Does on Your Site

The _uetvid cookie is a first-party advertising cookie that the Microsoft Advertising UET tag sets to recognise a returning visitor for conversion tracking. The UET tag assigns each visitor a "unique, pseudoanonymized visitor ID" and stores the ID in the _uetvid cookie on your domain, according to the Microsoft Advertising help on UET. The UET tag sends the ID with every page view and conversion to Microsoft, which counts the conversions that follow a click on a Microsoft ad.

The _uetvid cookie works with the _uetsid cookie, which holds the ID of the current session for 1 day. The UET tag keeps a copy of both IDs in the local storage of the browser, under the keys _uetvid and _uetsid.

_uetvid cookie facts
Cookie name_uetvid
VendorMicrosoft Advertising
CompanyMicrosoft Corporation (Microsoft Ireland Operations Limited for visitors in the EU)
CategoryAdvertising
PartyFirst-party
DomainYour own root domain, for example example.com
Set byJavaScript, through the UET tag (bat.js) from bat.bing.com
Retention13 months (390 days)
Value example1c3e2480ca2611f1a297f18b5d6e4c21
HttpOnlyNo
SecureNo
SameSiteLax
Cookie Consent categorytargeting
Privacy Consent vendor categoryAdvertising (advertising)

Who Sets the _uetvid Cookie

The Microsoft Advertising UET tag sets the _uetvid cookie with JavaScript on your root domain. Microsoft stores the visitor ID "in a first-party cookie" named _uetvid, according to the Microsoft FAQ on Universal Event Tracking (UET). The tag loads bat.js from bat.bing.com and then a configuration script for your UET tag ID.

A TermsFeed check in Chrome on 17 October 2026, from a region where Microsoft enforces consent, found no _uetvid cookie before the consent update and a beacon with asc=D. The _uetvid and _uetsid cookies appeared after the update call with ad_storage set to granted, together with the local storage keys _uetvid, _uetvid_exp, _uetsid, and _uetsid_exp.

Read how Microsoft Corporation handles the data in the Microsoft Advertising privacy policy. Both documents appear in the sources at the end of this page.

How to Block the _uetvid Cookie Until Visitors Accept

Block the _uetvid cookie by holding back the UET tag until the visitor accepts advertising cookies. TermsFeed Free Cookie Consent and TermsFeed Privacy Consent place Microsoft Advertising in the advertising category. Check whether an exemption applies to your own use of Microsoft Advertising in the consent rules for the _uetvid cookie.

The UET tag writes no _uetvid cookie while the UET tag waits as a tagged script, and Microsoft receives no page view from a visitor who declines.

Block the _uetvid Cookie With TermsFeed Free Cookie Consent

TermsFeed Free Cookie Consent runs a tagged script only after the visitor accepts its category. Change type="text/javascript" to type="text/plain" and add data-cookie-consent="targeting", the Cookie Consent category for advertising cookies. The tagged the UET tag looks like this.

<script type="text/plain" data-cookie-consent="targeting">
  (function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"YOUR_TAG_ID", enableAutoSpaTracking: true};o.q=w[u],w[u]=new UET(o),w[u].push("pageLoad")},n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){var s=this.readyState;s&&s!=="loaded"&&s!=="complete"||(f(),n.onload=n.onreadystatechange=null)},i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)})(window,document,"script","//bat.bing.com/bat.js","uetq");
</script>

Cookie Consent runs the tagged code after the visitor clicks "I agree" or accepts the targeting category in the Preferences Center. The illustration shows the consent banner and the script it releases.

The TermsFeed Free Cookie Consent banner: (1) the visitor clicks "I agree", (2) Cookie Consent runs the script tagged targeting. Illustration of the consent banner.

Cookie Consent is free and needs no account. Build your free consent banner with TermsFeed Free Cookie Consent.

Block the _uetvid Cookie With TermsFeed Privacy Consent

Add Microsoft Advertising from its template in TermsFeed Privacy Consent and type your UET tag ID, which Microsoft Advertising shows under Tools, Conversions, and UET tag. Privacy Consent sends the default ad_storage signal of Microsoft UET Consent Mode before any tag runs and loads the UET tag only after the visitor accepts the Advertising vendor category.

Remove every other copy of the UET tag from your theme, plugins, and tag manager, so the UET tag never loads before the consent signal.

The Microsoft Advertising template asks for the UET tag ID and fills every other field of the vendor. Pick the "Microsoft Advertising" card under Advertising, enter the UET tag ID, and click "Add Microsoft Advertising". Find the UET tag ID in Microsoft Advertising under Tools › Conversions › UET tag. The illustration shows the template form in the TermsFeed app.

The Microsoft Advertising template in TermsFeed Privacy Consent: (1) pick the card, (2) enter the UET tag ID, (3) click "Add Microsoft Advertising". Illustration of the TermsFeed app.

Privacy Consent detects the location of each visitor and records every answer in a consent log. Set up Microsoft Advertising from its template with TermsFeed Privacy Consent.

Block the _uetvid Cookie With Microsoft UET Consent Mode

Set ad_storage to denied with a consent default call before the UET tag runs, and send an update with ad_storage set to granted once the visitor accepts advertising cookies. The UET tag neither reads nor stores first-party cookies while ad_storage is denied, according to the Microsoft guide on setting up UET for consent mode.

Microsoft enforces consent signals for visitors in the EEA, the UK, and Switzerland, and the UET tag treats ad_storage as denied there when no signal arrives. Set up the 2 calls with how to integrate Microsoft UET Consent Mode with Cookie Consent.

<script>
  window.uetq = window.uetq || [];
  window.uetq.push('consent', 'default', { 'ad_storage': 'denied' });
</script>
<script type="text/plain" data-cookie-consent="targeting">
  window.uetq = window.uetq || [];
  window.uetq.push('consent', 'update', { 'ad_storage': 'granted' });
</script>

Stop the _uetvid Cookie in the UET Tag Code

Add storeConvTrackCookies: false to the settings object of the UET tag to stop the first-party cookies of UET, according to the Microsoft FAQ on Universal Event Tracking. The UET tag then sets no _uetvid cookie on your domain.

The setting stops the first-party cookies only. The UET tag still sends every page view to Microsoft, so the UET tag needs consent with storeConvTrackCookies set to false as well.

How to Verify That the _uetvid Cookie Waits for Consent

Verify the setup in a private window. Open Chrome DevTools, select the Application tab, and open Cookies. Click "I decline" on the consent banner and reload the page. The _uetvid cookie must not appear in the list until you accept advertising cookies.

How Long the _uetvid Cookie Lasts

The _uetvid cookie lasts 13 months (390 days). Safari caps the cookies that JavaScript sets at 7 days of Safari use without an interaction with your site, according to the WebKit team behind Safari.

The _uetvid cookie expired 390 days (about 13 months) after the visit in a TermsFeed check in Chrome on 17 October 2026. The TermsFeed Privacy Consent template lists 13 months. Microsoft gives no lifetime for the _uetvid cookie in the UET FAQ.

The UET tag writes the expiry into the _uetvid_exp local storage key as well, so the local storage copy of the visitor ID follows the same lifetime as the cookie.

Scripts and Requests of Microsoft Advertising That Come With the _uetvid Cookie

The catalog lists 2 scripts, pixels, and data endpoints of Microsoft Advertising, which a cookie scanner or the Network tab of Chrome DevTools shows next to the _uetvid cookie. Block the main script, and the requests in the table stop with the main script.

TypeResourceHostWhat it does
ScriptUET tag (bat.js)bat.bing.comThe UET tag loads from bat.bing.com and writes the _uetvid and _uetsid cookies once ad_storage is granted.
Data endpointUET event endpoint (bat.bing.com/action)bat.bing.com
bat.bing.net
The UET event endpoint receives every page view and conversion, with the vid from the _uetvid cookie and the consent state in the asc parameter.

Changes to the _uetvid Cookie

The catalog records 1 dated change that affect the _uetvid cookie. The newest change comes first.

DateChange
5 May 2025Microsoft started to enforce consent signals for UET visitors in the EEA, the UK, and Switzerland. Without a signal, the UET tag treats ad_storage as denied and writes no _uetvid cookie for those visitors.

_uetvid Cookie FAQs

Is _uetvid a necessary cookie?

No, the _uetvid cookie is not a strictly necessary cookie. Firstly, your site works the same for a visitor who refuses the _uetvid cookie. Secondly, Microsoft uses the cookie to recognise a returning visitor for conversion tracking, a purpose the ePrivacy Directive exemption does not cover. Thirdly, Microsoft itself holds the cookie back while UET Consent Mode reports ad_storage as denied.

What is the difference between _uetvid and _uetsid?

The _uetvid cookie identifies a returning visitor for about 13 months, and the _uetsid cookie identifies the current session for 1 day. Microsoft calls the _uetvid value a "unique, pseudoanonymized visitor ID", and the _uetsid value "contains the session ID for a unique session on the site".

Why is the _uetvid cookie missing for visitors in the EU?

The UET tag treats ad_storage as denied for visitors in the EEA, the UK, and Switzerland until a consent signal arrives. The UET tag writes no _uetvid cookie while ad_storage is denied. Send an update call with ad_storage set to granted after the visitor accepts advertising cookies, and the _uetvid cookie appears.

How do I check the UET consent state?

Open the Network tab of Chrome DevTools and read the asc parameter of the requests to bat.bing.com or bat.bing.net. The value D means denied and the value G means granted, according to the Microsoft FAQ on UET and user consent.

Sources for the _uetvid Cookie

The facts on this page come from the documentation Microsoft publishes, checked on 2026-10-17. The catalog lists every source so you check each fact yourself.