msclkid
msclkid is the ID Microsoft Advertising adds to the landing page URL when someone clicks an ad with auto-tagging on, which is the default. The UET tag keeps it in the _uetmsclkid cookie on your domain for 90 days and, with consent granted, sends it with later UET events, so Microsoft Advertising can tie the conversion to that click.
By TagALead. Last checked 1 December 2026.
How msclkid gets onto the page
With auto-tagging on, Microsoft Advertising adds a unique click ID to the landing page URL (Auto-tagging of Microsoft Click ID). Auto-tagging is on by default, and it is set under Account level options.
The parameter is msclkid, as in example.com/foo?msclkid=Example-123. It goes before any # fragment, after a & when the URL already has a query string (How do I see if auto-tagging works?).
The value is a GUID and is always 32 characters long. Each ad click gets its own.
The UET tag keeps the click ID in a first-party cookie on your site’s domain, _uetmsclkid. Microsoft lists its expiry as 90 days (FAQ - Universal event tracking).
Microsoft says the click ID is then included in all subsequent UET events for that visitor. Microsoft says UET fires bat.bing.com/action/0 when an event is fired, and Microsoft’s example requests carry the click ID in the msclkid query parameter.
In that parameter the GUID carries a suffix, as in -1, which says whether the click ID is new to the session (FAQ - Universal event tracking).
If the browser blocks cookies, the parameter reads N when the URL has no click ID. When the URL does carry one, 1N is added to its end.
A site that cannot run the JavaScript tag stores the click ID itself. The IMG tag guide suggests a first-party cookie named _uetmsclkid that lasts 90 days.
From a server, the Conversions API takes the click ID as msclkid in userData, written without hyphens. It suggests keeping the newest value for 90 days.
Where msclkid goes missing
Each cause below comes with a way to spot it.
Auto-tagging turned off
Auto-tagging is turned off by clearing the box "Add Microsoft Click ID (MSCLKID) to URLs to allow conversion tracking" under Campaigns, Settings, Account level options (Auto-tagging).
To spot it, open Campaigns, Settings, then Account level options in the Microsoft Advertising account and check that the box is ticked.
A redirect that drops the parameter
Microsoft asks that redirects preserve the msclkid URL parameter. The UET tag expects it as a top-level parameter in the URL of the page where the tag loads.
A redirect can have several legs, so you may have to check more than one to find where the click ID is lost.
To spot it, record the Network tab in DevTools and open the final URL with ?msclkid=Example-123 added. Read the Location header of each 301 or 302 response to see where the parameter drops.
A rewrite that changes or cuts the value
If a URL rewrite engine alters the msclkid value, UET cannot tell which click the session came from.
Microsoft also asks that logs, storage and redirects handle the full 32 characters, so none of them truncates it.
To spot it, load the page with msclkid=01234567890123456789012345678901, the test value Microsoft gives, and check that all 32 characters arrive.
UET cookies turned off
A UET tag set up with storeConvTrackCookies:false sets no first-party cookies. No _uetmsclkid is written, so a later page without msclkid in its URL has no stored click ID to read.
To spot it, search the UET tag code in GTM, or the page source, for storeConvTrackCookies.
A form on another domain
A form can run on another company’s domain, linked from your page or embedded in an iframe. The _uetmsclkid cookie is first-party on your site’s domain.
A browser makes a cookie available to the domain it names and that domain’s subdomains, and a site can name only its own domain or a parent of it (MDN: Using HTTP cookies).
The other domain’s page also has its own URL, and UET looks for msclkid in the URL of the page where it loads.
To spot it, check which domain the thank-you event fires on. If it is not yours, UET there sees neither your cookie nor the msclkid in your page’s URL.
An ifm=1 parameter on the event request means the tag fired inside an iframe.
Denied consent
When ad_storage is denied, UET neither reads nor writes first-party cookies. _uetmsclkid is one of those cookies, so a later page has no click ID from it.
In the EEA, the UK and Switzerland, Microsoft enforces consent mode, and there the default is denied. Without a granted signal after the visitor accepts, conversions are lost.
Whether a denied event still sends msclkid from the URL is not documented by Microsoft. For Advanced Consent Mode, the consent page says only that anonymized data is collected when consent is denied.
In our capture of 1 December 2026 with ad_storage denied, UET sent every request to bat.bing.net, not bat.bing.com, with no msclkid. A filter for bat.bing finds both hosts.
To spot it, read the asc parameter on the UET events, which Microsoft documents as denied or granted. In our captures of 1 December 2026 it read D with consent denied and G with it granted.
How to check msclkid by hand
Follow one test click ID from the URL to the UET request. Microsoft’s own check uses the Network tab in Edge DevTools.
-
Open DevTools on the Network tab before the page loads. Then open the landing page with
?msclkid=Example-123at the end of the URL, or&msclkid=Example-123when it already has a query string. -
Once the page has loaded, check that
msclkidis still in the address bar. If it is gone, your site likely does not keep query parameters, for example a redirect dropped it. -
A UET tag on an earlier page may already have sent it, so also check the
bat.bingrequest in step 5 before you conclude it is lost. -
In the Application tool, expand Cookies under Storage and pick your site. Find
_uetmsclkid. If it is missing, check the causes above, for example denied consent or UET cookies turned off.Microsoft’s UET FAQ lists the cookie but not its value. In our capture of 1 December 2026, opened with
msclkid=cdd4afcccb1c9a4cad9544dd7e5006d5, it read_uetcdd4afcccb1c9a4cad9544dd7e5006d5: the click ID with_uetin front. -
Filter the Network tab for
bat.bingand trigger the conversion. Open the event request and, under Query String Parameters, look formsclkidstarting withExample-123. The UET FAQ says the value carries a suffix, such as-1. -
On the same request, read
asc. It shows the consent state that event carried.
In TagALead
The template reads msclkid from the page URL and records the time it read it there, or else from _uetmsclkid, with no time, sending the cookie value as stored, _uet in front of the click ID; the click ID with the latest known time is the lead’s source. A lead with no click ID is flagged as one that cannot be matched to an ad click. When ad_storage is denied, the template drops the click ID and still sends the lead ID.
Related
Sources
- Microsoft Advertising Help: Auto-tagging of Microsoft Click ID. Checked 1 December 2026.
- Microsoft Advertising Help: How do I see if Microsoft Advertising auto-tagging works?. Checked 1 December 2026.
- Microsoft Advertising Help: FAQ - Universal event tracking. Checked 1 December 2026.
- Microsoft Advertising Help: Setting up UET for consent mode. Checked 1 December 2026.
- Microsoft Advertising Help: Universal event tracking (UET) using an IMG tag. Checked 1 December 2026.
- Microsoft Advertising API: Conversions API (CAPI). Checked 1 December 2026.
- Microsoft Edge DevTools: View, edit, and delete cookies. Checked 1 December 2026.
- MDN Web Docs: Using HTTP cookies. Checked 1 December 2026.