Sub topic 4
Tagging Campaign Links with UTM Parameters
Prerequisites
Assume you know the basic GA4 interface and have access to a property that already collects data. You should also know what a website visit and a marketing campaign are.
UTM parameters are labels added to a URL. GA4 reads these labels when someone arrives through the link. The labels describe where the visit came from and which campaign produced it.
A campaign URL might look like this:
https://www.example.com/pricing?utm_source=newsletter&utm_medium=email&utm_campaign=spring_saleThe part after ? contains the UTM parameters. Each parameter has a name and a value.
| Parameter | What it identifies | Example |
|---|---|---|
| `utm_source` | The specific source that sent the visit | `newsletter` |
| `utm_medium` | The type of traffic or marketing channel | `email` |
| `utm_campaign` | The campaign name | `spring_sale` |
| `utm_content` | A variation within the campaign | `pricing_button` |
| `utm_term` | A paid search keyword | `analytics_course` |
For example, newsletter is the source, email is the medium, and spring_sale is the campaign. GA4 uses these values in dimensions such as session source, session medium, and session campaign.
Use a naming convention
GA4 treats parameter values as data. It does not automatically know that Email, email, and e-mail mean the same thing. Inconsistent values split your results into separate rows.
Choose rules before creating links:
- Use lowercase values.
- Use underscores or hyphens instead of spaces.
- Use one spelling for each source and medium.
- Use a stable campaign name across every link in the campaign.
- Do not put personal information in a URL.
For example, use linkedin consistently instead of alternating between LinkedIn, linkedin.com, and linked-in.
How GA4 uses the labels
When a visitor clicks a tagged link, the browser sends the URL information to your website. Your GA4 tag reads the campaign parameters and associates them with the visit.
GA4 can use the same values at different scopes. Session-scoped dimensions describe the campaign that brought a particular session. User-scoped dimensions describe the campaign that first acquired the user. A returning user may therefore have a different first-user source from the source of the current session.
The default channel group is derived from traffic information such as source and medium. A link using utm_medium=email will generally be classified as Email, provided the value matches GA4’s channel rules. Custom or unusual values may appear as Unassigned.
Check your links before publishing
Verify that:
- The destination page works after the parameters are added.
- The parameter names use the exact
utm_spelling. - The values follow your naming convention.
- Redirects preserve the full query string.
- The campaign URL does not expose confidential information.
Exercise
You are promoting a pricing page in a spring email newsletter. Which values should you use for source, medium, and campaign?
Show answer
Use utm_source=newsletter, utm_medium=email, and utm_campaign=spring_sale, producing a URL such as https://www.example.com/pricing?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale.