UTM tracking in PostHog
PostHog's web SDK automatically captures the five standard UTM parameters and stores them on events, and records initial UTM values as person properties so you can attribute later events to the acquisition channel. This supports channel breakdowns in PostHog insights without custom tagging beyond the link.
Event and initial person properties
PostHog's web SDK captures UTM parameters from the page URL and attaches them to events. It also records initial values (such as initial_utm_source and initial_utm_campaign) on the person, set on the first event and preserved, so a later conversion can be attributed to the original acquisition channel.
The capture is client-side at page load. A redirect or privacy tool that strips the query string before the SDK runs leaves UTM empty for that load.
- Standard UTMs captured on events
- initial_utm_* person properties set on first event
- Read client-side from the page URL at capture time
Analysing channels
Filter or break down PostHog insights, funnels, and cohorts by the UTM event or person properties to compare channels. Use the initial UTM person properties for acquisition attribution rather than per-event UTM, which reflects the page the event fired on.
Keep values lowercase and consistent so a single channel does not split across casing variants in a breakdown.
How it appears in analytics and logs
A PostHog event with populated utm_source means the SDK read the parameter from the landing URL. The initial_utm_source person property reflects the first tagged arrival; empty values indicate an untagged landing or a query string removed before capture.
Diagnostic use case
Break down PostHog insights, funnels, and cohorts by acquisition channel using captured UTM properties, and attribute conversions to the first campaign that brought the person.
What WebmasterID can help detect
WebmasterID records the campaign arrival server-side, so you can reconcile PostHog's initial UTM person properties against the tagged hits reaching your origin and catch links that lost their UTM client-side.
Common mistakes
- Mixing initial UTM person properties with per-event UTM in the same breakdown.
- Expecting capture after a redirect stripped the query string.
- Casing drift fragmenting a channel across property values.
- Storing personal data in UTM values that reach PostHog exports.
Privacy and accuracy notes
PostHog stores UTM values as campaign metadata on events and persons. Keep personal data out of UTM parameters, since the values appear in event properties and exports. Honour your PostHog consent and autocapture configuration.
Related pages
- UTM tracking in Amplitude
Amplitude's browser SDK can automatically capture the five standard UTM parameters and store them as event properties and as initial and latest user properties. This supports acquisition-channel breakdowns and first-touch attribution in Amplitude charts without custom tagging beyond the link itself.
- UTM tracking in Plausible Analytics
Plausible is a privacy-first, cookieless analytics tool that reads the standard utm_ parameters and exposes them as Source, UTM Medium, UTM Campaign, UTM Content, and UTM Term properties. Because Plausible avoids cookies and cross-site identifiers, UTMs are the primary way to attribute campaigns. This page covers how Plausible consumes the parameters and groups acquisition sources.
- UTM tracking in single-page apps
Single-page apps (React, Vue, and similar) load once and then route in the browser, which can drop UTM parameters before analytics reads them. This page explains capturing UTMs on the first request, persisting them across in-app navigation, and the SPA pitfalls that silently lose campaign attribution.
- Privacy-first analytics
Channel breakdowns without attaching UTM to personal data.
Sources and verification notes
- PostHog Docs — UTM segmentation and propertiesWeb SDK captures UTM as event properties and initial person properties.
Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.