Sub topic 10
Setting up tracking and a UTM convention
This chapter covers how to agree on tracking before a supplier starts work, and how to write a UTM naming convention that keeps your reports consistent. It assumes you know the basic metrics (impressions, clicks, conversions, cost per acquisition) and have used a web analytics tool such as Google Analytics 4 (GA4).
Why tracking belongs in the brief
An objective such as "increase qualified demo requests from 120 to 180 per month" can only be judged if the numbers are recorded the same way before, during and after the work. Tracking is the system that records them. If it is not set up before launch, you lose data you cannot recreate, and the supplier and the client end up arguing about whose figures are right.
Tracking also links two parts of the brief. The objectives and KPIs section says what to measure. The channels and budget section says where traffic will come from. The tracking section connects them: every channel needs a way to show which visits and conversions it produced.
What to settle before work begins
Settle these points in writing, ideally in the brief itself.
- The conversion event. Name the action that counts, for example a submitted demo form that reaches the thank-you page. Say who defines "qualified" and where that status is recorded (usually the CRM, the system sales uses to track leads).
- The source of truth. Pick one system whose numbers settle disputes. Ad platforms report their own conversions, often counting differently from analytics. Decide which figure the KPI uses.
- Access. State who sets up and owns the analytics property, tag manager container and ad accounts. The supplier needs at least the access level required to do the work.
- Implementation. Say who adds tags to the site: your developers, the supplier, or both. Name who tests them.
- Consent and privacy. If you operate where cookie consent is required, state how the consent banner affects tracking. Expect some conversions to go unrecorded when users decline. Ask the supplier to explain how they will account for this.
- Attribution rules. Say which attribution model and which lookback window (how far back a click can be credited) your reports use. Different settings give different numbers for the same campaign.
The diagram shows why the UTM tags matter. The tag on the first link is what lets the report at the end say which campaign produced the qualified lead.
What UTM parameters are
A UTM parameter is a short label added to the end of a URL. Analytics tools read the labels and file the visit under the campaign they describe. There are five standard parameters.
| Parameter | Purpose | Example value |
|---|---|---|
| `utm_source` | Where the traffic comes from | `google`, `newsletter`, `linkedin` |
| `utm_medium` | The type of channel | `cpc`, `email`, `social` |
| `utm_campaign` | The campaign name | `autumn_leadgen_2026` |
| `utm_content` | Which ad or link variant | `variant_a` |
| `utm_term` | The paid search keyword | `accounting_software` |
The first three are the ones to require. The last two are optional and useful for comparing variants and keywords.
Here is the example URL from the brief template:
https://example.com/demo?utm_source=google&utm_medium=cpc&utm_campaign=autumn_leadgen_2026&utm_content=variant_a&utm_term=accounting_softwareThe ? starts the parameters. Each name=value pair is separated by &. In GA4, this visit appears with source google, medium cpc and campaign autumn_leadgen_2026.
Writing the naming convention
The convention is the real deliverable. The five parameter names are fixed by the tools, but the values are free text, and free text drifts. Within a few weeks of work by two people you will see Google, google, google-ads and adwords as four separate sources in your reports.
Put these rules in the brief:
- Lowercase only. Analytics tools treat
Emailandemailas different values. - Underscores between words. Avoid spaces, which become
%20in the URL and look messy in reports. - A fixed list of allowed sources and mediums. Write the list out. Anything else needs approval.
- A campaign pattern. For example
[theme]_[goal]_[year], which givesautumn_leadgen_2026. - A content pattern. For example
variant_a,variant_b, or a short creative name. - No personal data. Never put email addresses or names in UTM values. URLs are stored in logs and shared with third parties.
- No UTMs on internal links. Tagging links between pages of your own site overwrites the original source of the visit and corrupts attribution.
A sample allowed-values table for the brief:
| Channel | `utm_source` | `utm_medium` |
|---|---|---|
| Google search ads | `google` | `cpc` |
| LinkedIn paid | `linkedin` | `paid_social` |
| Email newsletter | `newsletter` | `email` |
| Organic social post | `linkedin` | `social` |
Aligning utm_medium with your analytics tool's default channel groupings matters. GA4 sorts traffic into channels such as Paid Search and Email using rules based on source and medium. A medium that does not match those rules, such as paid-search, may land in "Unassigned".
Generating links without typos
Hand-typed URLs produce errors. Agree on one method:
- A shared spreadsheet with a column for each parameter and a formula that builds the full URL.
- A UTM builder tool the whole team uses.
- A script, if the supplier produces many links.
The following Python example builds a tagged URL and rejects values that break the convention. It uses only the standard library and runs as shown.
from urllib.parse import urlencode, urlsplit, urlunsplit
import re
ALLOWED_MEDIUMS = {"cpc", "paid_social", "email", "social"}
VALUE_PATTERN = re.compile(r"^[a-z0-9_]+$")
def build_url(base, source, medium, campaign, content=None, term=None):
params = {
"utm_source": source,
"utm_medium": medium,
"utm_campaign": campaign,
"utm_content": content,
"utm_term": term,
}
params = {k: v for k, v in params.items() if v is not None}
for name, value in params.items():
if not VALUE_PATTERN.match(value):
raise ValueError(f"{name}={value!r} must be lowercase letters, digits or underscores")
if medium not in ALLOWED_MEDIUMS:
raise ValueError(f"medium {medium!r} is not in the allowed list")
parts = urlsplit(base)
return urlunsplit((parts.scheme, parts.netloc, parts.path, urlencode(params), ""))
print(build_url(
"https://example.com/demo",
source="google",
medium="cpc",
campaign="autumn_leadgen_2026",
content="variant_a",
term="accounting_software",
))The script prints the same URL shown earlier. A call with medium="Paid Search" raises an error instead of producing a link that would be misfiled.
Note that this script replaces any existing query string on the base URL. If your landing pages already use parameters, merge them first.
Testing before launch
Do not wait for live traffic to find mistakes. Before launch, run this check.
- Click each tagged link in a private browser window.
- Open the real-time report in your analytics tool and confirm the source, medium and campaign appear as written.
- Submit the form and confirm the conversion event fires once, not twice.
- Confirm the lead reaches the CRM with the source details attached. Many teams store the UTM values in hidden form fields so the CRM keeps them.
- Check that the redirect chain, if any, keeps the parameters. Some redirects drop everything after the
?.
Record the result and who signed it off. This becomes a milestone in the timeline: tracking verified before launch.
Common errors
| Error | Result | Fix |
|---|---|---|
| Mixed capitalization | Duplicate rows for one source | Lowercase rule and a validated builder |
| Tagging internal links | Original source lost mid-session | Tag only external links |
| Different campaign names per channel | Cannot total a campaign across channels | One campaign name, with source and medium separating channels |
| Conversion fires on page load of the form, not on submission | Inflated counts | Test the event with a real submission |
| Supplier owns the analytics account | Data lost when the contract ends | Client owns the property; supplier gets access |
| No agreed source of truth | Disputes over results | Name one system in the brief |
Putting it in the brief
Add a tracking section to the brief template with these lines:
tracking:
conversion_event: demo_form_submit (thank-you page reached)
qualification: Sales marks lead as qualified in the CRM within 5 working days
source_of_truth: GA4 for traffic, CRM for qualified requests
utm_convention: lowercase, underscores, campaign pattern theme_goal_year
allowed_mediums: [cpc, paid_social, email, social]
link_builder: Shared spreadsheet, owned by the client
access: Client owns GA4 and tag manager; supplier has editor access
verification: Supplier tests all links and events before launch, client signs offThis keeps the tracking requirements in the same document as the objectives, so a reader can check that the KPI named above can actually be measured by what is set up here.
Exercise
A supplier sends you a report showing "LinkedIn", "linkedin" and "LinkedIn_Ads" as three separate sources, and the sum of the three is the number you expected. Name two rules from the convention that would have prevented this, and say what you would add to the brief to stop it recurring.
Show answer
The lowercase-only rule would have merged "LinkedIn" and "linkedin", and a fixed list of allowed sources would have rejected "LinkedIn_Ads". To prevent recurrence, add the allowed source and medium table to the brief, require links to be produced with the agreed builder or validated script, and make a pre-launch link test a milestone that the client signs off.
Exercise
Why should you decide on a single source of truth for conversions before launch, and which system would you pick for "qualified demo requests"?
Show answer
Ad platforms and analytics tools count conversions differently because of attribution settings, lookback windows and consent loss, so without one agreed system the two sides will report different numbers. "Qualified" is decided by sales, so the CRM is the right source for that KPI, with analytics used for traffic and landing page conversion.