On this page
What this issue is
Why it costs you leads or sales
- Ad clickURL carries ?msclkid=abc123
- RedirectQuery string dropped
- Landing pageURL has no msclkid
- UET tagNothing to store
- ConversionNot matched to the click
The redirect removes the click ID before the UET tag can read it.
The visitor arrives with msclkid and leaves the redirect without it.
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
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.
Open it in a private window
Paste the URL and press Enter. Look at the address bar once the page has loaded.
Compare the final URL
If msclkid=test123 is still there, the redirect keeps it. If the address is clean, something stripped it.
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.
Test the variants
Repeat for http, https, www and non-www versions, trailing slash and no slash, and any language or country version.
curl -sIL "http://example.com/offer?msclkid=test123" | grep -i -E '^(HTTP|location)'How to fix it
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.
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.
Check server or CDN rules
Look at .htaccess and any host or CDN redirect rules (see Custom code).
Open URL redirects
Go to Online Store > Navigation > View URL Redirects. Shopify redirects normally keep the query string, but check any rule whose target already contains a ? as it can behave differently.
Point ads at the final URL
Set your Microsoft Ads final URL to the live page so no redirect is needed.
Check apps
Disable geo, language or redirect apps one at a time and retest with the fake msclkid.
Capture the ID before redirects (if you control the first page)
If the first page loads GTM before any redirect, add a Custom HTML tag on All Pages that saves the msclkid to a first-party cookie. Use this only as a backup; fixing the redirect is better.
Fire UET on the first page view
Make sure the UET tag trigger is not delayed behind consent or a slow trigger that lets the redirect happen first.
Review 301 redirects
Go to Site settings > Hosting > 301 redirects. Webflow redirects pass the query string in most cases, but test each old-path rule with a fake msclkid.
Fix the default domain
Under Hosting > Publishing, choose one default domain (www or non-www) so only one canonical redirect exists.
Check custom code
Search Site settings > Custom code and page settings for scripts that set window.location.
Check funnel and website redirects
In Sites > Funnels or Websites, review any step-level redirect or path redirect settings and test them with a fake msclkid.
Point ads at the final page
Use the exact live funnel step URL as the Microsoft Ads final URL so no redirect runs.
Review domain settings
Check that the custom domain does not redirect between www and non-www in a way that drops parameters.
Open the redirect manager
Go to Marketing & SEO > SEO Tools > URL Redirect Manager and review rules for your landing pages.
Avoid redirecting landing pages
Set the Microsoft Ads final URL to the live page. Wix redirect rules match paths and may not carry query strings, so test each one.
Check primary domain
Make sure your primary domain is set so ads do not land on a secondary domain that redirects.
Review URL mappings
Go to Settings > Developer Tools > URL Mappings. Mappings like /old -> /new 301 can drop parameters, so test each one with a fake msclkid.
Update ad final URLs
Point ads at the new URL directly so no mapping is hit.
Check the primary domain
Under Settings > Domains, confirm the primary domain so the www redirect is the only one in play.
Apache: keep the query string
In .htaccess, RewriteRule keeps the query string by default. It is lost when the target ends with a ? or when you use Redirect with a full URL in some setups. Use the rule shown below, and add QSD only if you really want to drop it.
Nginx: use $is_args$args
In a return 301 line, append $request_uri or $is_args$args to the target so the query string is carried.
JavaScript redirects
Append window.location.search to the target URL (example below).
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]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;
}window.location.replace('/offer' + window.location.search + window.location.hash);How to confirm it's fixed
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
- 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
- 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
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.