On this page
What this issue is
When someone clicks a Microsoft Advertising (Bing) ad, the landing page URL can carry an msclkid parameter. This is the click ID. The Universal Event Tracking (UET) tag reads it and, depending on your settings, stores it in a first-party cookie called _uetmsclkid.
Why it costs you leads or sales
Without the click ID, Microsoft Ads may not credit conversions to the campaign, ad group or keyword that earned them. Reports look worse than reality, automated bidding learns from less data, and you may cut campaigns that actually work.
- Microsoft ad clickURL carries ?msclkid=...
- Landing pageRedirect strips the parameter or the UET tag is missing
- _uetmsclkid cookieNever written
- ConversionCannot be matched to the click
The cookie is only written if the msclkid reaches a page where the UET tag runs.
Example: 40 real conversions from Microsoft ads in a month. With the cookie missing, far fewer are matched to the ads.
How to check if your site has it
Open your landing page with a test click ID
Visit your page with a made-up value, for example https://example.com/landing?msclkid=test123 (use your own URL). Use the same entry URL your ads use.
Open DevTools
In Chrome press F12, go to Application, then Cookies, and select your domain.
Look for _uetmsclkid
After the page loads and consent is given, the cookie should be listed. Reload once if needed.
Check the UET request
In the Network tab filter for bat.bing.com. You should see a request to bat.bing.com/action or bat.bing.com/bat.js, and the page URL in the request should still include msclkid.
Test after redirects
Look at the final address bar. If msclkid vanished, a redirect removed it.
How to fix it
| Cause | How to spot it | Fix |
|---|---|---|
| UET tag not installed or wrong ID | No bat.bing.com requests | Install the tag with the correct tag ID |
| Redirect strips msclkid | Parameter missing in final URL | Pass query strings through redirects |
| Consent blocks the tag | Cookie appears only after accepting, or never | Fire UET according to your consent setup |
| Tag loads on some pages only | Cookie missing on landing pages | Load UET site-wide |
| Auto-tagging off in Microsoft Ads | No msclkid in ad URLs | Turn on auto-tagging |
Use the Microsoft Advertising UET tag template
Create a tag of type Microsoft Advertising Universal Event Tracking and enter your UET tag ID.
Trigger on all pages
Use the All Pages trigger, or your consent-aware trigger if you use consent settings.
Preview and publish
Test in Preview mode with ?msclkid=test123 on the URL, then publish.
Find how the tag is added
Check your tag plugin, theme header settings or Google Tag Manager. Avoid installing it in two places.
Add the tag site-wide
Add the UET snippet to the header through your plugin or theme, or through GTM.
Clear caches
Purge page cache and CDN cache, then recheck the cookie.
Check the Microsoft channel or custom pixel
In Settings, then Customer events, check for a Microsoft pixel or add a custom pixel with the UET code.
Confirm the tag ID
Make sure the UET tag ID matches the one in Microsoft Advertising, under Tools, then UET tag.
Add the snippet in project settings
Go to Project settings, then Custom code, and paste the UET snippet in Head code.
Publish
Publish the site, since custom code only runs on published pages.
Add the snippet to every page head
Place the UET snippet from Microsoft Advertising in the head of every template, replacing the tag ID with yours.
Keep the query string on redirects
See the redirect rules below.
Turn on auto-tagging
In Microsoft Advertising, open Settings, then Account level options, then Auto-tagging, and turn it on so ads carry msclkid.
Preserve query strings in redirects
Make sure http to https, www, trailing slash and landing page redirects keep the full query string.
Check consent rules
Make sure your cookie banner or Consent Mode setup lets the UET tag run once the visitor allows advertising cookies.
server {
listen 80;
server_name example.com;
return 301 https://example.com$request_uri;
}RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]Cookie missing
- Redirect drops ?msclkid
- UET tag loads only on some pages
- Conversions show as unattributed
Cookie set
- Final URL keeps msclkid
- UET loads site-wide
- _uetmsclkid appears after consent
How to confirm it's fixed
- Landing page with ?msclkid=test123 keeps the parameter in the final URL
- Requests to bat.bing.com appear in the Network tab
- _uetmsclkid is listed under Cookies after consent
- Cookie is present on the landing page and later pages
- Microsoft Advertising's UET tag status shows the tag as active
- A test conversion shows up in Microsoft Advertising after a delay
How to prevent it happening again
Most cases return after a redirect change, a theme update, a cookie banner change or a tag container edit. Re-test the landing page with a test msclkid after each of these. Keep one owner for the UET tag so it is not removed or duplicated by accident.
Day 1
A new redirect or banner setting goes live.
Day 2
Microsoft ad clicks arrive without the cookie being set.
Week 2
Reported conversions drop and bidding has less data.
Week 3
Someone checks the cookie and restores the parameter.
How FunnelGuard handles this
FunnelGuard detects this issue today. Its robot visitor runs your real customer journeys on a schedule, from the EU or the US, and checks whether the _uetmsclkid cookie is present where it should be. A failure is re-checked from a second region before one alert goes out, with a screenshot and a likely cause.
Test traffic is marked (utm_source=funnelguard, fg_test=1, an fg_test cookie and its own user agent) and never clicks real ads. FunnelGuard does not bypass CAPTCHAs or bot protection. The Free plan covers 1 site and 2 journeys with daily checks and no card, and a free read-only website audit is available.
Questions people ask
What is the _uetmsclkid cookie?
It is a first-party cookie set by the Microsoft Advertising UET tag. It stores the msclkid click ID from a Microsoft ad so that a later conversion can be matched to the click.
Why is my _uetmsclkid cookie not being set?
The usual causes are a missing or wrong UET tag, a redirect that strips msclkid from the URL, or consent settings that block the tag. It is also not set on visits that did not come from a Microsoft ad.
How do I check if the _uetmsclkid cookie is set?
Open your landing page with ?msclkid=test123 added to the URL, then open DevTools, go to Application, then Cookies. After the tag runs and consent is given, _uetmsclkid should be listed.
Does a missing _uetmsclkid cookie mean Microsoft Ads conversions are lost?
Not always, but it can. Without the click ID, Microsoft may be unable to match some conversions to the ad click, so reports can undercount results.
Do I need to turn on auto-tagging for msclkid?
Yes. Auto-tagging adds the msclkid parameter to your ad URLs. Turn it on in Microsoft Advertising under Settings, then Account level options.
Does my cookie banner affect the _uetmsclkid cookie?
It can. If the UET tag is blocked until the visitor consents, the cookie will not appear before consent. Make sure the tag runs once advertising cookies are allowed.
Can a redirect remove the msclkid?
Yes. Redirects that drop the query string remove msclkid before the UET tag can read it. Change them so the full query string is passed through.