Cherry Seed

How does UTM encoding work?

utm encoding coded-urls server-side decoding campaign-tracking

Quick Answer

UTM encoding replaces verbose, easily recognised utm_* parameters with a short coded token that your server decodes back into the real campaign values. A link like ?ref=fb_c_sum26 travels cleanly, and on the first request your server expands it to utm_source=facebook, utm_medium=cpc, utm_campaign=summer-2026 and stores it. Analytics then receives standard UTM values, so reports look identical, while the public URL avoids the obvious tracking pattern that privacy tools and blockers target. The encoding is invisible to your analytics, it only changes how the data survives the trip.

Full Answer

The mechanism is a lookup, run server-side. You define a mapping where each short token corresponds to a full set of campaign values: fb_c_sum26 might mean source facebook, medium cpc, campaign summer-2026. Your ad links carry only the compact token as a first-party parameter on your own domain. When a visitor lands, an early server hook reads the token, looks up the expansion, and writes the real source, medium, and campaign into the session and into the events you forward.

Two things make this worthwhile. First, the public URL no longer contains the literal utm_source string that privacy tools and ad blockers pattern-match, so the link is less likely to be stripped or flagged in transit. Second, and importantly, none of this changes what your analytics sees, GA4 and your ad platforms receive standard UTM values, so dashboards, filters, historical comparisons, and attribution models all keep working unchanged. There's no migration tax on your reporting.

The practical requirement is that decoding must happen server-side and early, before redirects or browser stripping can interfere, and the token-to-campaign map needs to be maintained as campaigns change. Done that way, encoding gives you cleaner, shorter, more resilient campaign links without sacrificing readability for the systems that actually consume the data. It's a transport optimisation, not a reporting change.

Sources

Programmatic Access

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

Cite This Answer

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