FAQ: Universal Event Tracking

Universal Event Tracking (UET) is a useful way to track what happens after someone has clicked on your ad. Here, find some common user questions, tips, and best practices when getting started with UET.

Universal Event Tracking (UET) is a useful way to track what happens after someone has clicked on your ad. Here, find some common user questions, tips, and best practices when getting started with UET:

What is UET and how does it related to Conversion Tracking and Remarketing features?expando image

Universal Event Tracking (UET) is a mechanism for advertisers to report user activity on their websites to Microsoft Advertising by installing one site-wide tag. UET is a prerequisite for advertisers to track conversions and/or do remarketing. Once the UET tag is installed by the advertiser across their website, the tag reports user activity on the advertiser website to Microsoft Advertising. Advertisers can then create conversion goals to specify which subset of user actions on the website qualify to be counted as conversions. If Microsoft Advertising finds a match between a conversion goal and the user activity logged by the UET tag installed on their website, it counts a conversion. Similarly, advertisers can create remarketing lists based on user activity on website and Microsoft Advertising matches the list definitions with UET logged user activity to put users into those lists.

Learn more about conversion tracking

Learn more about remarketing

Which tag management systems can I use when working with UET?expando image

UET will work with all industry ready tag management systems. Here is the current list of (and links to instructions for) tested and supported tag managers:

Which website platforms can I use when working with UET?expando image

UET is designed to work with all major website platforms. Here is the current list of (and links to instructions for) tested and supported platforms that allow you to install UET tags:

How do I validate if my UET tag is set up properly?expando image

See this troubleshooter to find out how to validate if your UET tag is set up properly.

Should I update my existing UET tags to the new syntax?expando image

We recommend doing so to take advantage of the new syntax's benefits. Learn more about the new syntax.

Are the tags SSL compliant? If so, how does it work?expando image

Yes, the tags are SSL compliant. The way it works is that it reads the protocol of whatever page it's placed on (http or https) and matches the protocol.

What data does UET collect once I install it on my website?expando image

UET collects the following data and Microsoft Advertising retains it for 390 days. UET will also collect the IP address and the Microsoft cookie (with an expiration date of 13 months). This cookie contains a GUID assigned to the user’s browser, and/or an ID assigned to a user as long as it authenticated through their Microsoft account. In general, the cookie in the relevant domain and IP address are always passed with every http request and not just via UET. Microsoft Advertising doesn't resell this data to third parties or share it with other advertisers.

Parameter Value Passed Purpose
ea Event action (custom value passed by advertiser)
ec Event category (custom value passed by advertiser) These are needed if advertiser chooses to use custom events for conversion tracking or remarketing.
el Event label (custom value passed by advertiser)
ev Event value (custom value passed by advertiser)
evt Event type (page load or custom) Distinguishes page load event from custom events.
gc Variable revenue currency (custom value passed by advertiser) Needed if advertiser chooses to track variable revenue.
gv Variable revenue (custom value passed by advertiser) Needed if advertiser chooses to track variable revenue.
ifm 1 A value of 1 indicates that the tag is being fired from within an iFrame.
kw Keyword
lg Browser language setting
lt Page load time
mid GUID generated by UET tag Used to relate page load and any custom events passed with each other.
msclkid

Ad select information, generated at ad select time and appended to the landing page URL when auto-tagging of Microsoft Click ID is enabled.

Format: GUID followed by extra byte indicating whether the current value is a new one (unique to that session), as in "cdd4afcccb1c9a4cad9544dd7e5006d5-1". Note:

  • This value will be "N" if cookies are blocked by the browser or no ad select information exists in cookie, and the msclkid parameter isn't in the landing page URL.
  • The Microsoft Click ID will have "1N" added to the end if cookies are blocked by the browser and the msclkid parameter is in the landing page URL.

Cookie name: _uetmsclkid

Cookie expiration date: 90 days

Microsoft Click ID, which is used to improve the accuracy of conversion tracking. Note: UET sets a first-party cookie on your site’s domain for this parameter.
p URL of the page Identifies webpage.
pi Digital signature - one way hash of tl, lt, lg, sc, sh, sw.
r Referrer URL Identifies referrer URL.
rn Random number Handles browser cache.
sc Screen color depth
sh Screen height
sid Session ID
sv Subversion Identifies the version of UET.
sw Screen width
ti UET tag ID Identifies tag.
tl Page title Used to construct digital signature so that we can detect fraud.
uid User ID A unique, non-personally identifiable ID representing a signed-in user. Advertisers may choose to store the user ID in a first-party cookie named "_uetuid". It'll be automatically read when UET events fire.
ver Version Identifies the version of UET.
vid Visitor ID A unique, anonymized visitor ID, assigned by UET, representing a unique visitor. UET stores this data in a first-party cookie named "_uetvid".
If your UET tag has UET Insights enabled, these additional data points will be collected:
Data point Purpose
Interactions: clicks, scroll Helps us detect fraud activity to optimize advertiser spend
Number of visits per page Helps advertisers optimize their websites for greater engagement and conversions
Page performance (speed, load time) Helps us detect fraud activity to optimize advertiser spend
Purchase cart extraction (product name, price, number of products) Helps us improve audience targeting for advertisers
Cart abandonment extraction Helps us improve audience targeting for advertisers
Traffic: user and session breakdown by country, device Helps advertisers optimize their websites for greater engagement and conversions
Browser-based signal Helps us detect fraud activity to optimize advertiser spend
Quick backs Helps advertisers optimize their websites for greater engagement and conversions
JavaScript errors in browser Helps us detect drops in conversions
Time spent Helps advertisers optimize their websites for greater engagement and conversions

If you do not want the UET tag to set any first-party cookies, you can opt-out by including the following parameter in your UET tracking code: storeConvTrackCookies:false

Example:

Here is what this opt-out code looks like within your UET tracking code:

<script>(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"TAG_ID_HERE", storeConvTrackCookies:false};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>

Note

For additional details about Microsoft privacy policies for usage of data, please refer to Microsoft Privacy Statement. Also note that we will not be reselling the data we collect via UET to third parties and/or share it with other advertisers using Microsoft Advertising.

What cookies does UET use?expando image

The following table lists the cookies that UET stores or accesses in your browser. Microsoft Advertising doesn't resell this data to third parties or share it with other advertisers.

Cookie ID Cookie Description
MUID This is a Microsoft cookie that contains a GUID assigned to your browser. It gets set when you interact with a Microsoft property, including a UET beacon call or a visit to a Microsoft property through the browser.
_uetmsclkid This is the Microsoft Click ID, which is used to improve the accuracy of conversion tracking.
Note: UET sets a first-party cookie on your site’s domain for this parameter. When auto-tagging of the Microsoft Click ID is enabled, the ad click information is generated at ad click time and appended to the landing page URL.
_uetsid This contains the session ID for a unique session on the site. Note: As of as of July 2023, _uetsid has been updated with additional parameters as follows: insights_sessionId, timestamp, pagenumber, upgrade, upload.
_uetvid UET assigns this unique, anonymized visitor ID, representing a unique visitor. UET stores this data in a first-party cookie. Note: As of as of July 2023, _uetvid has been updated with additional parameters as follows: insights_userId, cookieVersion, expiryTime, consent, cookie_creation_time.
How can I mark first-party cookies set by UET as secure?expando image

If your website enforces the https protocol for all pages, you can modify your UET tag to mark first-party cookies as secure. Just add the highlighted code to the base UET tag on each page of your website:

<script>(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"TAG_ID_HERE", cookieFlags: "SameSite=None;Secure"};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>

Important

This change will break UET functionality if any part of your site is not using the https protocol.

How can I stop UET events from being fired for users who request to restrict data sharing? expando image

Set the cookie named "_uetmsdns" with a value of 1. Advertisers are responsible for setting this cookie, and it must be set in a first-party context (for example, in the advertiser's domain, such as contoso.com). This cookie is read by the client-side UET JavaScript during runtime, and if the value is set to 1, no UET events will fire.

Does the tag use browser caching and does it have an expiration date?expando image

Yes, it leverages browser caching with an expiration time of 30 minutes.

I received the following warning message in Google Chrome: "A cookie associated with a cross-site resource at http://bat.bing.com/ was set without the 'SameSite' attribute." What does this mean?expando image

This is a temporary warning, and clearing your browser's cookies should resolve it. It has no impact on your website or conversion tracking functionality for your website.

See more videos...