Clarvivo

Clarvivo blog

UTM parameters lost after a redirect: why it happens and how to fix it

UTM parameters disappear on redirects, page changes, consent reloads and payment handoffs. Why each one happens, how to find where yours are lost, and how to fix it.

The Clarvivo team4 min read
  • utm
  • attribution
  • redirects
  • ga4

You tag a campaign link with utm_source, utm_medium and utm_campaign, the click happens, and in GA4 the visit shows up as direct. The parameters were there when the visitor clicked. Somewhere between the click and the analytics tag, they vanished.

UTM parameters are just part of the URL's query string. They survive exactly as long as the query string does, and there are a lot of ways to lose a query string without anyone noticing. Here's where it happens, how to find which one is hitting you, and how to fix it.

Why redirects drop UTM parameters

A redirect tells the browser to go to a new URL. If the server or the redirect rule builds that new URL without copying the original query string, the parameters are gone. The browser does exactly what it was told.

Common culprits:

  • HTTP to HTTPS and www to non-www rules written to redirect to a fixed URL.
  • Trailing-slash normalisation (/pricing to /pricing/) implemented without preserving the query.
  • Link shorteners and click trackers in email and social platforms that wrap your link.
  • Geo or language redirects that send visitors to a localised page.
  • Old campaign URLs redirected to new pages during a site migration.
  • CMS or platform redirects for renamed products, collections or posts.

In most server and CDN configurations, preserving the query string is a single setting or a one-character change in the rule. The hard part is finding which redirect is responsible.

Losses that aren't redirects

Even when every redirect is clean, UTMs can disappear after the landing page loads:

The second page view

UTMs are only on the first URL. If GA4 starts a new session later (for example after consent changes, or across midnight), that session has no campaign. And if your CRM form is on a second page, its hidden fields can't read parameters that are no longer in the URL.

Single-page apps that rewrite the URL

Some front-end routers replace the URL on load, removing the query string before tags read it.

Consent banners that reload the page

A banner that reloads the page after the visitor accepts can lose parameters if the reload goes to a clean URL.

Payment and booking handoffs

When visitors leave to pay or book on another domain and return, the return can start a new session with no campaign. See the Payment Referral Leak Checker.

Crossing to another domain you own

Going from your marketing site to your app or store on a different domain drops campaign context unless cross-domain measurement is set up. The Cross-Domain Attribution Checker shows where identifiers reset.

How to find where your UTMs are lost

You could open developer tools, enable "preserve log", click through the journey and read every request. Or paste a real campaign URL into the UTM Loss Detector, which does exactly that in a real browser: it follows every HTTP redirect, meta refresh, JavaScript redirect and route change, clicks one internal link, and shows the exact step where utm_source, utm_medium and utm_campaign stop surviving.

To check a whole set of campaign links at once (for example before a launch), the Bulk UTM Validator checks a list of URLs for missing, empty or inconsistent parameters.

How to fix it

Preserve the query string on every redirect

Whatever generates your redirects (your web server, CDN, hosting platform, CMS or framework), make sure the rule forwards the original query string. Then point campaign links at the final URL so there's no redirect at all.

Store campaign parameters on first touch

On the landing page, read the UTM parameters and click IDs and store them in a first-party cookie or local storage. Your forms, your checkout and your analytics can then use them on later pages, even after the URL is clean. Keep first-touch and last-touch values separately if you can.

Pass campaign data into forms and the CRM

Add hidden fields for UTMs and click IDs to your forms, populated from storage. The UTM to CRM Capture Checker shows whether your form has those fields and whether the campaign context reaches it.

Configure GA4 for the journeys you have

Add payment and booking domains to unwanted referrals, set up cross-domain measurement for your own domains, and make sure consent changes don't start new sessions without a source.

Keep naming consistent

Lost UTMs aren't the only reason campaigns go missing. Facebook, facebook and fb become three sources in GA4. Agree a naming convention and validate links before they go out.

FAQ

Do redirects always remove UTM parameters? No. A redirect that copies the query string to the new URL keeps them. Only redirects that build a fixed destination URL drop them.

Do 301 redirects pass UTM parameters? The status code doesn't matter. What matters is whether the redirect's target URL includes the original query string.

Why does Google Ads attribution survive when my UTMs don't? Google's tags store the gclid in a first-party cookie early in the visit, so it survives later page views. UTMs have no such fallback unless you store them yourself.

How do I check if my UTMs survive? Paste a tagged campaign URL into the UTM Loss Detector. It shows every hop and the step where the parameters disappear.