Cherry Seed

How do I protect UTM parameters from being stripped?

protect utm parameters preserve utm tracking utm redirect best practices server-side utm tracking utm parameter protection

Quick Answer

Standard UTM parameters (utm_source, utm_medium, utm_campaign) are safe from iOS/Safari stripping -- Apple only removes platform-specific click IDs like gclid and fbclid. To protect UTMs from other threats: (1) Configure server redirects to preserve query strings (Apache QSA flag, Nginx $args passthrough). (2) Use link shorteners that explicitly preserve query parameters. (3) Store UTMs in first-party localStorage/sessionStorage on landing page load for persistence across navigation. (4) Implement server-side tracking to capture UTMs at the server level before any client-side stripping. (5) Reduce reliance on platform click IDs -- shift attribution strategy toward standard UTMs which browsers don't strip.

Full Answer

Protecting UTM parameters requires both technical configuration and architectural decisions. The most reliable approach: capture attribution data server-side on first page load, before any redirects can strip parameters. Server Configuration: Fix Your Redirects Preserve Query Strings in .htaccess The QSA (Query String Append) flag preserves UTM parameters through HTTPS redirects. Nginx Configuration Nginx preserves query strings by default when using $request_uri, but custom rewrites can accidentally drop them. Minimize Redirect Chains According to Admetrics, "Minimizing redirects protects against UTM loss." Each redirect is an opportunity for parameters to vanish. Audit your funnel:

  • Landing page loads → Mobile redirect → Regional redirect → Final destination = 3 opportunities for UTM loss
  • Eliminate unnecessary redirects by using responsive design instead of separate mobile sites URL Shortener Configuration Most URL shorteners offer parameter preservation settings:
  • Bit.ly: Premium plans preserve query parameters
  • Custom shorteners: Configure to append original query strings...

Sources

Programmatic Access

GET https://seresa.io/wp-json/cherry-tree-by-seresa/v1/seeds/234

Cite This Answer

Cherry Tree by Seresa - https://seresa.io/seed/utm-attribution/protect-utm-parameters