How is it calculated?
The tags are plain query parameters. The analytics script reads them from the landing URL on the first pageview of a visit and stores them with the session.
utm_source names who sent the click (newsletter, google), utm_medium names the kind of traffic (email, cpc), utm_campaign names the effort (spring-sale). utm_term and utm_content are optional detail, such as the keyword or which button was clicked.
Example
You link to your pricing page from the March newsletter with utm_source=newsletter&utm_medium=email&utm_campaign=march-update. Every click is filed under Email, source newsletter, campaign march-update, even when the mail app sends no referrer.
Common mistakes
- Inconsistent spelling.
Newsletter,newsletterandnews-letterbecome three sources. Pick lowercase with hyphens and keep a list. - Tagging internal links. A UTM on a link between your own pages starts a new session and overwrites the real source.
- Swapping source and medium. Source is who, medium is how.