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
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.
| Cookie name | _uetvid |
|---|---|
| Vendor | Microsoft Advertising |
| Company | Microsoft Corporation (Microsoft Ireland Operations Limited for visitors in the EU) |
| Category | Advertising |
| Party | First-party |
| Domain | Your own root domain, for example example.com |
| Set by | JavaScript, through the UET tag (bat.js) from bat.bing.com |
| Retention | 13 months (390 days) |
| Value example | 1c3e2480ca2611f1a297f18b5d6e4c21 |
| HttpOnly | No |
| Secure | No |
| SameSite | Lax |
| Cookie Consent category | targeting |
| Privacy Consent vendor category | Advertising (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.
Does the _uetvid Cookie Need Consent?
Yes, the _uetvid cookie needs consent in the EU and the UK, and needs no prior opt-in in California. The table gives the rule for each law.
| Law | Consent before the cookie is set | Opt-out right | Source |
|---|---|---|---|
| EU ePrivacy Directive + GDPR | Required | Withdraw at any time | Article 5(3), ePrivacy Directive |
| UK PECR | Required | Withdraw at any time | Regulation 6 and Schedule A1, PECR |
| California CCPA | No general opt-in | Opt out of sale and sharing | Cal. Civ. Code 1798.120 |
The consent table describes what each law requires and is not legal advice. Whether a law applies to your site depends on where your visitors are, where your business is based, and how you set up Microsoft Advertising, such as Microsoft UET Consent Mode and auto-tagging of the Microsoft Click ID.
The ePrivacy Directive requires consent before a site sets the _uetvid cookie. The General Data Protection Regulation (GDPR) sets the standard for that consent: freely given, specific, informed, and unambiguous.
The UK Privacy and Electronic Communications Regulations (PECR) require consent before a site sets the _uetvid cookie.
The California Consumer Privacy Act (CCPA) sets no general opt-in requirement before a site sets the _uetvid cookie. The CCPA treats the data the _uetvid cookie collects for cross-context behavioral advertising as sharing. Offer visitors a way to opt out of sale and sharing, such as a "Do Not Sell or Share My Personal Information" link or the alternative opt-out link the CCPA regulations allow. Honor Global Privacy Control (GPC) signals as opt-out requests. Sharing the data of a consumer under 16 needs opt-in consent instead: from the consumer from 13 to 15 years, and from a parent under 13.
Read how each law decides which cookies need consent in the EU ePrivacy Directive + GDPR guide, the UK PECR guide, and the California CCPA guide.
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.
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.
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.
| Type | Resource | Host | What it does |
|---|---|---|---|
| Script | UET tag (bat.js) | bat.bing.com | The UET tag loads from bat.bing.com and writes the _uetvid and _uetsid cookies once ad_storage is granted. |
| Data endpoint | UET event endpoint (bat.bing.com/action) | bat.bing.combat.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.
| Date | Change |
|---|---|
| 5 May 2025 | Microsoft 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.
- Microsoft Learn, FAQ: Universal Event Tracking
- Microsoft Learn, Setting up UET for consent mode
- Microsoft Learn, FAQ: UET and user consent
- Microsoft Advertising Blog, Providing user consent signals by May 5, 2025
- TermsFeed check of the UET tag in Chrome before and after a consent update, 17 October 2026 (internal)
- Microsoft Advertising privacy policy