Why this matters
As a Marketing Analyst, you rely on UTM parameters (utm_source, utm_medium, utm_campaign, utm_content, utm_term) to attribute traffic and conversions. Missing or broken UTMs lead to misattribution (e.g., lumped into Direct) and bad decisions on budget allocation. Fixing UTMs improves channel accuracy, ROAS calculations, and reporting trust.
- Real task: Audit landing URLs and flag visits missing utm_medium.
- Real task: Identify redirects that strip query strings and get engineering to preserve UTMs.
- Real task: Standardize values (e.g., cpc vs paid_search) so your taxonomy is consistent across platforms.
Concept explained simply
UTMs are tags in a URL's query string. Analytics tools read them to understand where a visitor came from. If a tag is missing, malformed, or dropped during redirects, attribution breaks.
Mental model: The postal label
Think of UTMs like a shipping label on a package. Each field (source, medium, campaign) must be present and legible. If any field is missing, smudged, or torn off during transit (redirects), the package gets misrouted to the generic bin (Direct/Unassigned). Your job: ensure the label is applied, readable, and survives transit.
Common ways UTMs break
- Missing parameters: campaign links lack utm_medium or utm_source.
- Typos or casing: Utm_Source=Facebook vs utm_source=facebook (case-sensitive in many tools).
- Bad separators: using &&, ?, or # incorrectly (e.g., two ? in a URL).
- Redirect stripping: intermediate pages drop the query string (e.g., non-preserving 301/302, meta refresh).
- Encoding issues: spaces or special characters not URL-encoded.
- Platform auto-tags: gclid/fbclid present but missing UTM alignment with your taxonomy.
How to diagnose issues
- Collect sample URLs from ads, emails, and social posts.
- Open each in a fresh browser window; confirm the final URL keeps the UTMs after all redirects.
- Paste suspect URLs into a parameter parser (or read them by eye): look for source, medium, campaign, content, term.
- Check analytics reports: which landing page sessions show (not set)/Unassigned or Direct abnormally high?
- Compare ad platform clicks to sessions by campaign. Large gaps often indicate dropped UTMs.
Quick checklist
- utm_source present and lowercase
- utm_medium present and matches taxonomy (e.g., paid_search, paid_social, email)
- utm_campaign present; no spaces or encoded properly
- Only one '?' and subsequent parameters joined by '&'
- Redirects preserve the full query string
- No trailing fragments (#) before UTMs
Fix patterns and prevention
Standardize values
- Use lowercase for all UTM values: facebook, paid_social, spring_sale_2025.
- Define a controlled vocabulary for utm_medium: paid_search, paid_social, email, referral, affiliate, display.
- Use underscores or hyphens; avoid spaces. Encode special characters.
Validate URLs before launch
- Ensure exactly one '?' in the URL; all subsequent parameters use '&'.
- Put UTMs before any fragment (#...). Anything after '#' is not sent to the server.
- Test the live final URL, not just the destination pasted into an ad platform.
Handle redirects safely
- Ensure server or link shortener preserves query strings in all redirects.
- Avoid interstitial pages that remove parameters; if required, append parameters forward.
- If using multiple hops (short link → geo router → final), test that UTMs survive every hop.
Recovery rules for missing data
- If utm_source present but utm_medium missing, infer medium from known mapping (e.g., facebook → paid_social if from ads; varies by setup).
- If only auto-tags exist (gclid or fbclid), classify using platform and placement data from the ad platform export.
- If nothing is known, set medium=unknown and exclude from ROAS decisions; do not force to Direct.
Worked examples
Example 1: Double question mark
URL: https://site.com/landing??utm_source=facebook&utm_medium=paid_social
Issue: Double '?' causes some servers to ignore parameters after the first malformed one.
Fix: Use a single '?'.
Correct: https://site.com/landing?utm_source=facebook&utm_medium=paid_social
Example 2: Fragment before UTMs
URL: https://site.com/offer#video?utm_source=newsletter&utm_medium=email
Issue: Everything after '#' is not sent to server; UTMs never reach analytics.
Fix: Move UTMs before any fragment.
Correct: https://site.com/offer?utm_source=newsletter&utm_medium=email#video
Example 3: Redirect dropping query strings
Short link: https://short.ly/sale → redirects to https://site.com/sale (query not preserved)
Click URL used in ads: https://short.ly/sale?utm_source=google&utm_medium=paid_search&utm_campaign=spring
Issue: Redirect target ignores the query; UTMs are lost.
Fix: Configure redirect to preserve the full query string or append it explicitly to the destination.
Correct flow: https://short.ly/sale?utm_source=... → https://site.com/sale?utm_source=...
Example 4: Casing and spaces
URL: https://site.com/?utm_Source=Facebook&utm_medium=Paid Social
Issues: Wrong case for utm_source key; space in utm_medium value.
Fix: Lowercase keys/values and encode spaces or replace with underscores.
Correct: https://site.com/?utm_source=facebook&utm_medium=paid_social
Who this is for
- Marketing Analysts who own attribution and reporting.
- Performance marketers launching campaigns across ads, email, and social.
- Growth and data teams standardizing taxonomy across tools.
Prerequisites
- Basic understanding of URLs and query parameters.
- Familiarity with your team’s UTM taxonomy for source/medium/campaign.
- Access to sample campaign URLs and analytics reports.
Learning path
- Review your team’s UTM naming standards.
- Practice diagnosing missing/broken UTMs using sample links.
- Set up pre-flight validation and redirect preservation checks.
- Implement recovery rules for historical data where safe.
- Create lightweight monitoring to prevent regressions.
Exercises
Practice what you learned. Then check your answers below.
Exercise 1: Spot and fix the UTMs
Below are 5 URLs. Identify the issue and provide the corrected URL following good taxonomy (lowercase, proper separators, preserved query string).
- https://example.com/page??utm_source=Twitter&utm_medium=social
- https://example.com/deal#top?utm_source=newsletter&utm_medium=email
- https://shop.com/?utm_source=google&utm_medium=cpc spring&utm_campaign=brand
- https://short.ly/x1?utm_source=facebook&utm_medium=paid_social → redirects to https://shop.com/landing (no query preserved)
- https://app.com?utm_Source=LinkedIn&utm_medium=Paid_Social&utm_campaign=Q2-LeadGen
Show solution
- Issue: double '?', casing. Correct: https://example.com/page?utm_source=twitter&utm_medium=social
- Issue: fragment before UTMs. Correct: https://example.com/deal?utm_source=newsletter&utm_medium=email#top
- Issue: space in utm_medium. Correct: https://shop.com/?utm_source=google&utm_medium=cpc&utm_campaign=brand
- Issue: redirect drops query. Fix: preserve query in redirect. Final should be: https://shop.com/landing?utm_source=facebook&utm_medium=paid_social
- Issue: key casing and value casing. Correct: https://app.com?utm_source=linkedin&utm_medium=paid_social&utm_campaign=q2-leadgen
Self-check checklist
- All UTM keys lowercase and correctly spelled.
- No spaces in values; use underscores or hyphens.
- Single '?' and '&' between parameters.
- UTMs appear before '#'.
- Redirects preserve the full query string.
Common mistakes and how to self-check
- Mistake: Forcing missing UTMs into Direct. Better: mark as unknown and exclude from optimization decisions.
- Mistake: Mixing mediums (cpc, ppc, paid_search). Better: consolidate to one agreed value and map legacy data.
- Mistake: Trusting ad platform destination field only. Better: test the live click-through and final URL.
- Mistake: Ignoring auto-tags. Better: use gclid/fbclid as hints to classify when UTMs are absent.
- Mistake: Not encoding special characters. Better: encode or replace spaces with underscores.
Quick self-audit steps
- Pull last 7 days landing page sessions by default channel grouping; sort by Direct. Investigate spikes.
- Sample 20 URLs from campaigns with low session-to-click ratio; test redirects.
- Run a case check: any value with uppercase? Normalize.
Practical projects
- Build a UTM validator sheet
- Inputs: base URL, source, medium, campaign, content, term.
- Outputs: constructed URL, flags for empty/malformed, lowercase enforcement.
- Redirect preservation audit
- List all shorteners and routers used.
- Test with a parameter-rich URL; document which hops drop UTMs.
- File fixes with clear expected behavior: append and preserve full query string.
- Recovery rules playbook
- Define mappings: source → default medium; auto-tags → inferred medium.
- Document when to mark unknown vs infer.
- Create a weekly report of corrected vs uncorrectable sessions.
Next steps
- Share your validator and playbook with campaign managers.
- Add UTM checks to your campaign QA checklist.
- Set up a weekly alert for sudden Direct spikes on key landing pages.
Mini challenge
You see a 25% week-over-week increase in Direct sessions to /promo. Email launched a big campaign at the same time. In 10 minutes, outline the top three checks you would run and one likely fix if UTMs are at fault.
Quick Test
This test is available to everyone. Only logged-in users will have their progress saved.
When you finish, review explanations to reinforce learning.