Skip to content
FunnelGuard

Fix guide by FunnelsGuard

_uetmsclkid cookie missing: how to find and fix it

TRK-218Medium impactDetectedBy FunnelGuardPublished Updated
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.

Where the click ID gets lost
  1. Microsoft ad clickURL carries ?msclkid=...
  2. Landing pageRedirect strips the parameter or the UET tag is missing
  3. _uetmsclkid cookieNever written
  4. ConversionCannot be matched to the click

The cookie is only written if the msclkid reaches a page where the UET tag runs.

Conversions Microsoft Ads can attributeExample numbers
Conversions Microsoft Ads can attribute (example)Actual conversions: 40 conversions; Reported, cookie set: 38 conversions; Reported, cookie missing: 12 conversions01531403812Actual conversionsReported, cookie setReported, cookie miss…conversions

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

Check the cookie in your browser
  1. 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.

  2. Open DevTools

    In Chrome press F12, go to Application, then Cookies, and select your domain.

  3. Look for _uetmsclkid

    After the page loads and consent is given, the cookie should be listed. Reload once if needed.

  4. 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.

  5. Test after redirects

    Look at the final address bar. If msclkid vanished, a redirect removed it.

How to fix it

Common causes and fixes
CauseHow to spot itFix
UET tag not installed or wrong IDNo bat.bing.com requestsInstall the tag with the correct tag ID
Redirect strips msclkidParameter missing in final URLPass query strings through redirects
Consent blocks the tagCookie appears only after accepting, or neverFire UET according to your consent setup
Tag loads on some pages onlyCookie missing on landing pagesLoad UET site-wide
Auto-tagging off in Microsoft AdsNo msclkid in ad URLsTurn on auto-tagging
Install or repair the UET tag
  1. Use the Microsoft Advertising UET tag template

    Create a tag of type Microsoft Advertising Universal Event Tracking and enter your UET tag ID.

  2. Trigger on all pages

    Use the All Pages trigger, or your consent-aware trigger if you use consent settings.

  3. Preview and publish

    Test in Preview mode with ?msclkid=test123 on the URL, then publish.

Keep msclkid through redirects and settings
  1. Turn on auto-tagging

    In Microsoft Advertising, open Settings, then Account level options, then Auto-tagging, and turn it on so ads carry msclkid.

  2. Preserve query strings in redirects

    Make sure http to https, www, trailing slash and landing page redirects keep the full query string.

  3. Check consent rules

    Make sure your cookie banner or Consent Mode setup lets the UET tag run once the visitor allows advertising cookies.

Nginx: redirect while keeping the query stringnginx
server {
  listen 80;
  server_name example.com;
  return 301 https://example.com$request_uri;
}
Apache: force https and keep the query stringhtaccess
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
Click ID handling

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

Confirmation checklist
  • 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.

How it usually unfolds
  1. Day 1

    A new redirect or banner setting goes live.

  2. Day 2

    Microsoft ad clicks arrive without the cookie being set.

  3. Week 2

    Reported conversions drop and bidding has less data.

  4. 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.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.