UTM Parameters Lost After Redirect: How to Keep Them

Why UTM tags disappear between the ad click and the final page, and how to find the hop that drops them. Includes a naming convention and a curl test.

TDS Team Author
Published
9 min Reading time
All posts

UTM parameters get lost after a redirect when something between the ad click and the final page rebuilds the URL without the query string. The usual suspects are a redirect rule that points to a bare URL, a destination site that redirects again, a shortener, or a parameter that was encoded wrongly. The fix is to find which hop drops the data, and the only reliable way to do that is to look at every hop yourself.

This post covers what UTM tags are, how each redirect type treats the query string, the seven most common ways tags disappear, a naming convention you can copy, and a simple way to test a chain before you spend money on it.

Short answer

A 301 or 302 redirect only keeps your parameters if the redirecting system puts them in the new URL. Nothing in the protocol does it for you. After every change to a link or a domain, open the full chain with curl -I or the browser network tab and check that utm_source and the rest are still in the last URL.

UTM basics in one minute

A UTM tag is a plain URL parameter. Analytics tools read it when the page loads and store it as the traffic source of that visit. There are five standard ones:

  • utm_source: where the click came from, for example the network or the site name.
  • utm_medium: the type of traffic, for example cpc, push or email.
  • utm_campaign: the campaign name.
  • utm_content: the creative or the variant of the ad.
  • utm_term: the keyword, or any extra label you need.

Example: https://example.com/offer?utm_source=network1&utm_medium=cpc&utm_campaign=spring_test. The server that hosts the page ignores these parameters. Only a script or a tracker on the page reads them, so if the script runs on a URL that no longer has them, the visit is recorded as direct or as a referral.

How redirects treat the query string

A redirect response tells the browser "go to this URL". The browser goes exactly there. It does not copy the old query string onto the new address. If the new address has the parameters, they arrive. If it doesn't, they are gone.

MethodWhat happens to the query
301 / 302The Location header is the new URL. The query survives only if the system that sends the header appends it.
Meta refreshThe target URL sits in the HTML of an intermediate page. Same rule: whatever the page generator wrote there is what you get.
JavaScript redirectDepends on the code. location.href = url sends whatever is in url. Some scripts read location.search and append it, many don't.
IframeThe address bar stays on the first domain. The destination loads inside the frame with the URL you gave it. The page inside the frame does not see the parameters of the outer page unless you pass them in the frame URL.

Two practical consequences. First, "it worked with a 302 yesterday" says nothing about a meta refresh today, because the redirecting system may treat them differently. Second, when you change the redirect method of a link, test the chain again.

Seven ways UTM tags disappear

1. The redirect rule points to a URL without parameters

The most common one. The ad URL has ?utm_source=..., the redirect target is https://offer.example.com/, and nothing appends the original query. Check how your redirecting system handles incoming parameters before you launch.

2. https to http

Some old setups send the visitor from https to http and back. Each extra hop is another place to lose data, and browsers may also strip referrer information on a downgrade. Keep every hop on https.

3. The destination site redirects again

Typical cases: example.com to www.example.com, an old path to a new one, a language redirect by IP, or adding or removing the final / in the path. Many of these are written in the web server config as a fixed target, and the query string is dropped. You pass the right URL and the site rewrites it before the page loads. Always test the exact final URL of the destination and not only your own link.

4. URL shorteners

A shortener is a redirect with its own rules. If the long URL was saved with parameters, they stay. If you add parameters to the short link afterwards, some shorteners forward them and some do not. Treat a shortener as one more hop that needs testing.

5. A landing page with links that have no parameters

The visitor arrives with the UTM tags, reads your prelander, clicks the button, and the button points to the offer URL without them. The visit is still counted correctly on the prelander, but every later step has lost the source. Pass the parameters on in the button link with a small script, or use a click ID that the tracker stores for you. The post on click ID and subid explains why a stored ID is safer than copying many parameters from page to page.

6. Wrong encoding of & inside a URL parameter

If one URL is passed as the value of another parameter, for example ?url=https://offer.example.com/?a=1&b=2, the first & ends the url parameter and b=2 becomes a parameter of the outer link. The inner URL must be percent-encoded: %26 instead of &, %3F instead of ?, %3D instead of =. In HTML source the plain & is written as &, which is a separate and easy to confuse issue. If you see amp;utm_medium as a parameter name in your reports, that is the sign.

7. Different casing and typos

Not a redirect problem, but it looks like one in the reports. utm_source=FB and utm_source=fb are two rows in most analytics tools. A single missing underscore makes the whole tag invisible. The next section fixes this.

A naming convention that keeps reports clean

Agree on it once, write it down, and give the same table to everyone who builds links. The values below are examples.

ParameterRuleExample
utm_sourceLowercase, one name per traffic source, no spacesnetwork1
utm_mediumShort list of allowed valuescpc, push, native
utm_campaignOffer, geo, month, separated by underscoresofferx_de_nov
utm_contentCreative ID and versioncr12_v2
utm_termPlacement, keyword or audiencelookalike_1

Use only lowercase letters, digits, underscores and hyphens. Spaces, non-Latin letters and symbols such as + and % create encoding problems that you will find only in reports a week later.

How to test a chain

Do it with a real ad URL, including every parameter, and do it again after each change to a link, a domain or a redirect method.

With curl

curl -I sends a HEAD request and prints the response headers. Add -L to follow redirects and show each hop. Some servers answer a HEAD request differently from a GET, so if the output looks odd, repeat with curl -s -o /dev/null -D - -L, which makes a real GET request and prints only the headers.

Code
curl -sIL "https://track.example.com/abc?utm_source=network1&utm_medium=cpc&utm_campaign=spring_test"

HTTP/2 302
location: https://offer.example.com/?utm_source=network1&utm_medium=cpc&utm_campaign=spring_test

HTTP/2 301
location: https://www.offer.example.com/

HTTP/2 200

In this made-up output the first hop keeps the parameters and the second one drops them. The problem is on the destination site, not in the link. Without reading each location line you would blame the wrong system.

In the browser

Open developer tools, switch to the Network tab, tick "Preserve log", then load the link. Every redirect shows as a separate row with a 301, 302 or 200 status. Click a row and read the Location header. Meta refresh and JavaScript redirects show up as a 200 followed by a new navigation, so look at the next row's URL. For frames, check the frame's own request in the same list.

Also test on a phone, once. In-app browsers of some social apps open links differently from desktop browsers, and a chain that is clean on a laptop can behave differently there.

How a TDS handles parameters

A traffic distribution system sits between the ad and the destination, so it is one more hop in the chain, and the one you control. A few facts about TDS.SO that matter for UTM work:

  • You put one link in the ad and keep the rules behind it. Rules and destination URLs change in the dashboard, and the ad link stays the same, so you don't touch the ad or the tags in it.
  • URL parameters are one of the 20+ conditions a rule can use. For example, you can route clicks with a given utm_campaign to a particular URL.
  • Redirect methods include 301, 302, meta refresh, double meta refresh, JavaScript and iframe. Because they behave differently with parameters, test the chain again if you switch the method of a link.
  • The click log shows time, country and city, device, browser and referrer for each click, so you can compare what the ad sent with what your analytics received.

Whatever tool you use, the test is the same: send a click with known values and read the last URL. If you also want conversions tied to the source, read when you need a tracker, because UTM tags alone cannot carry a conversion back to the click.

FAQ

Do 301 and 302 redirects pass UTM parameters?

The redirect itself does not. It sends the browser to the URL in the Location header, and the parameters are there only if whoever built the header included them. That is why you need to test the actual chain.

Why do my UTM tags show up in the ad URL but not in analytics?

Something after the ad dropped them, or the analytics script ran on a different URL. Follow the chain with curl -sIL, then check that the analytics code loads on the final page and not only on an intermediate one.

Can I use a short link in the ad?

Yes, as long as you tested it with your real parameters. Treat it as one more hop and check what it does with a query string.

Should I use UTM tags or a click ID?

Both have a job. UTM tags describe where the visit came from, in words you read in reports. A click ID identifies one click so an affiliate network can send a conversion back. The click ID and subid post covers the second part.

Does the order of parameters matter?

Not for UTM reading. Analytics tools look up each parameter by name. It can matter for a destination that signs or hashes the URL, so keep the order stable if the offer owner says so.

If you want to see how a click moves through redirect methods and rules, the redirects page lists the options, and the pricing page shows the plans.

Was this article useful?
TDS Team Author

Guides and write-ups on routing, bot filtering and tracking from the TDS.SO team.

All articles by the author
Keep reading

Related

All posts
Basics 6 min

When you need a tracker, and when UTM is enough

22 Mar 2021 · TDS Team
Basics 8 min

Tracker vs TDS: What's the Difference and Which Do You Need

10 Nov 2026 · TDS Team
Redirects 8 min

Geo Redirect Rules Examples: Country, Device, Language

11 Nov 2026 · TDS Team

Try it on
your own traffic

Link the Telegram bot and get 3 days free, once per account.

Create account