UTM
UTM (Urchin Tracking Module) is a tagging system added to URLs to track traffic sources and measure the effectiveness of marketing campaigns.
The analytics script collects unique values of UTM query parameters from the URL. It does not support multiple values for the same parameter (arrays). If a parameter appears more than once in the URL, only the first occurrence of the first parameter is taken.
Tracking Behavior
A session takes its UTM parameters from the page the visitor lands on. Every pageview and event in that session is tagged with them.
New UTM parameters start a new session. If the visitor comes back through a link with different UTM parameters, the current session ends and a new one starts with the new values. Everything after that, like a signup or a purchase, is credited to the new campaign.
Pages without UTM parameters never end a session. They are tagged with the session’s UTM parameters.
| Session started with | Visitor opens | Result |
|---|---|---|
utm_source=google | /pricing | Same session, tagged google |
utm_source=google | ?utm_source=google | Same session |
utm_source=google | ?utm_source=twitter | New session, tagged twitter |
utm_source=google | ?utm_source=google&utm_medium=cpc | New session: a parameter was added |
| no UTM parameters | ?utm_source=google | New session, tagged google |
All five parameters are compared. Adding, removing or changing any one of them starts a new session.
Supported Parameters
utm_campaign- Campaign nameutm_source- Traffic source (google, facebook, etc.)utm_medium- Marketing medium (cpc, email, social)utm_content- Ad content for A/B testingutm_term- Search keywords