Skip to content
FunnelGuard

Fix guide by FunnelsGuard

msclkid stripped by redirect: how to find and fix it

TRK-217High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

Why it costs you leads or sales

Where the msclkid is lost
  1. Ad clickURL carries ?msclkid=abc123
  2. RedirectQuery string dropped
  3. Landing pageURL has no msclkid
  4. UET tagNothing to store
  5. ConversionNot matched to the click

The redirect removes the click ID before the UET tag can read it.

The redirect strips the click ID

The visitor arrives with msclkid and leaves the redirect without it.

Microsoft Ads conversions: reported vs realExample numbers
Microsoft Ads conversions: reported vs real (example)Real leads: 100 conversions; Reported (redirect strips msclkid): 55 conversions; Reported (fixed): 92 conversions038771005592Real leadsReported (redirect st…Reported (fixed)conversions

Example: 100 real leads from Microsoft Ads in a month. With the redirect stripping the msclkid, only some are matched; after the fix, most are.

How to check if your site has it

Test your landing page by hand
  1. Build a test URL

    Take your landing page URL and add a fake click ID, for example https://example.com/offer?msclkid=test123&utm_source=test. Use the exact URL your ads point to.

  2. Open it in a private window

    Paste the URL and press Enter. Look at the address bar once the page has loaded.

  3. Compare the final URL

    If msclkid=test123 is still there, the redirect keeps it. If the address is clean, something stripped it.

  4. Find which hop removes it

    Open browser developer tools, go to the Network tab, tick Preserve log, and reload. Click each 301 or 302 response and check the Location header for the query string.

  5. Test the variants

    Repeat for http, https, www and non-www versions, trailing slash and no slash, and any language or country version.

Follow redirects and print each Location headerbash
curl -sIL "http://example.com/offer?msclkid=test123" | grep -i -E '^(HTTP|location)'

How to fix it

Keep the query string by platform
  1. Check your redirect plugin

    In plugins such as Redirection, edit the rule and set Query Parameters to Pass-through (or Exact match and pass). In other plugins, look for a setting like Pass query string or Ignore parameters.

  2. Check the site URL settings

    Under Settings > General, make sure WordPress Address and Site Address use the final https and www form, so the canonical redirect does not run at all.

  3. Check server or CDN rules

    Look at .htaccess and any host or CDN redirect rules (see Custom code).

Apache: force https and keep the query stringhtaccess
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
Nginx: redirect old path and keep the query stringnginx
location = /old-offer {
  return 301 /offer$is_args$args;
}

server {
  listen 80;
  server_name example.com www.example.com;
  return 301 https://example.com$request_uri;
}
JavaScript redirect that keeps the query string and hashjavascript
window.location.replace('/offer' + window.location.search + window.location.hash);

How to confirm it's fixed

Redirect behaviour

Before

  • /offer?msclkid=test123 redirects to /offer
  • UET finds no click ID on the page
  • Conversions show as unattributed

After

  • /offer?msclkid=test123 stays /offer?msclkid=test123
  • UET stores the click ID in its cookie
  • Conversions can be matched to the click
Confirmation checklist
  • The final URL in the address bar still contains msclkid=test123 for http, https, www and non-www
  • Every Location header in the curl output keeps the query string
  • The _uetmsclkid cookie is set after loading the test URL (check DevTools > Application > Cookies)
  • A UET request to bat.bing.com appears in the Network tab
  • Auto-tagging is on in Microsoft Advertising
  • After a few days, Microsoft Ads conversions look closer to your CRM lead count

How to prevent it happening again

Prevention habits
  • Add a fake msclkid and UTMs to your launch checklist for every new landing page and redirect rule
  • Send ads to final URLs, not to URLs that redirect
  • Keep a list of all redirect sources: server, CDN, CMS, plugins, apps, shorteners
  • Retest after domain changes, migrations, SSL changes and plugin updates
  • Choose one canonical domain version and use it everywhere
  • Run an automated check of your landing page journey on a schedule

How FunnelGuard handles this

Does the redirect keep the msclkid?Interactive
Redirect strips the query string

Ad click → yoursite.com/offer?gclid=Cj0KCQ…&utm_source=google&utm_campaign=spring

301 redirect

Lands on → yoursite.com/offer/

  • gclid
  • utm_source
  • utm_campaign

The landing page URL has no msclkid, the UET tag stores nothing, and the conversion is not matched to the Microsoft Ads click.

Toggle the redirect behaviour to see what reaches the UET tag.

Questions people ask

Why is my msclkid missing from the landing page URL?

Most often a redirect between the ad click and the page drops the query string. Check http to https, www to non-www, old-path redirects, plugins and link shorteners. Also confirm auto-tagging is on in Microsoft Advertising, or no msclkid is added at all.

How do I test if a redirect removes the msclkid?

Add a fake parameter to your landing page URL, such as ?msclkid=test123, and open it in a private browser window. If the address bar no longer shows it after the page loads, a redirect removed it. In DevTools Network tab, check each redirect's Location header to find the hop.

Does a stripped msclkid stop Microsoft Ads conversions from tracking?

It can stop conversions from being matched to the click. The visitor still converts, but the UET tag has no click ID to store, so Microsoft Advertising may report fewer conversions than you actually got.

How do I keep query parameters when redirecting?

Pass the query string in the redirect target. In Nginx append $is_args$args or use $request_uri, in JavaScript append window.location.search, and in CMS plugins choose a pass-through or keep query parameters option.

Where is the msclkid stored after the visitor lands?

The UET tag reads the msclkid from the landing page URL and stores it in a first-party cookie called _uetmsclkid. If the redirect removed it before the tag ran, the cookie is not set.

Can Google Tag Manager fix a stripped msclkid?

Only partly. If GTM loads on the first page before the redirect, a tag can save the click ID to a cookie as a backup. The reliable fix is still to make the redirect keep the query string or to send ads to the final URL.

Is this the same problem as gclid or UTMs being stripped?

The cause is the same: a redirect that drops the query string. It removes gclid, UTMs and msclkid together, so fixing the redirect usually repairs all of them.

How does FunnelGuard detect a stripped msclkid?

FunnelGuard runs a robot visitor through your landing page with a test click ID and checks whether it survives the redirects. A failure is re-checked from a second region before one alert is sent with a screenshot and a likely cause.

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.