Sub topic 12
Set up tracking before launch
A campaign you cannot measure is a campaign you cannot adjust. Later chapters depend on data: monitoring and moving money by rule, and the post-campaign review. That data only exists if you set up tracking before the first ad runs. This chapter covers how to build a simple measurement plan, tag your links consistently, and check that everything works before launch.
Prerequisites
This chapter assumes you have:
- Basic marketing vocabulary: audience, channel, conversion.
- Comfort with percentages and simple arithmetic.
- Familiarity with at least one channel, such as email, social media, or search ads.
- A campaign goal with one success metric, a fixed budget, and a short list of selected channels, as covered in earlier chapters.
Why tracking comes before launch
Tracking cannot be added retroactively. If a visitor clicks an untagged link on day one, that visit is recorded as "direct" or "unknown" traffic, and you cannot recover its source later. With a small budget, every early click matters, because the early data is what you use to decide whether to move money.
Tracking also ties back to earlier decisions. The goal defines what you count. The channel selection defines which sources you must tell apart. The test reserve and reallocation rules need numbers to work with.
Build a simple measurement plan
A measurement plan is a short document that answers five questions. Write it down before launch, even if it is one page.
- What is the success metric? This is the single metric from your campaign goal, for example "200 trial sign-ups".
- What counts as a conversion? Define the exact event, for example "a visitor submits the sign-up form and reaches the confirmation page". Vague definitions produce numbers nobody trusts.
- Where is each conversion recorded? Name the tool: your analytics platform, the ad platform's own conversion tracking, or your CRM.
- Which supporting metrics will you watch? Pick a few. Examples are spend, clicks, cost per click (CPC), conversion rate, and cost per acquisition (CPA).
- Who looks at the numbers, and when? Name a person and a schedule, for example "every Monday and Thursday morning".
Primary and supporting metrics
Keep one primary metric and a few supporting ones. The primary metric decides whether the campaign succeeded. Supporting metrics explain why.
| Metric | Role | Question it answers |
|---|---|---|
| Conversions | Primary | Are we reaching the goal? |
| CPA | Primary or supporting | Are we paying a sustainable price per conversion? |
| Click-through traffic | Supporting | Is the message getting people to act? |
| Conversion rate | Supporting | Does the landing page convert the traffic it gets? |
| Spend vs. plan | Supporting | Are we staying under the ceiling? |
If you track too many metrics, you will find a reason to call any result a success. A short list protects you from that.
Tag every link with UTM parameters
UTM parameters are labels added to the end of a URL. Analytics tools read them and attribute each visit and conversion to a source, medium, and campaign. A tagged link looks like this:
https://example.com/spring-offer?utm_source=newsletter&utm_medium=email&utm_campaign=spring_launchThe three core parameters are:
| Parameter | Meaning | Example |
|---|---|---|
| `utm_source` | Where the link was placed | `newsletter`, `google`, `instagram` |
| `utm_medium` | The type of channel | `email`, `cpc`, `social` |
| `utm_campaign` | The campaign name | `spring_launch` |
Two optional parameters are useful when you run more than one ad or message in a channel. utm_content distinguishes variants, such as headline_a and headline_b. utm_term records the keyword on paid search.
Naming rules that prevent messy data
Analytics tools treat Email, email, and e-mail as three different values. Inconsistent tags split one channel's results across several rows and make the totals hard to read. Agree on rules and keep them in one shared sheet:
- Use lowercase only.
- Use underscores instead of spaces, for example
spring_launch. - Pick one fixed value per channel for
utm_mediumand reuse it. Do not invent a new one for each link. - Keep the campaign name identical on every channel.
- Record every tagged link in the sheet, with its destination and the place it will be used.
Generate tagged links in code
For a small campaign, a spreadsheet works. If you prefer a script, this one builds links from a table of channels and rejects values that break the naming rules.
from urllib.parse import urlencode
import re
BASE_URL = "https://example.com/spring-offer"
CAMPAIGN = "spring_launch"
# One fixed (source, medium) pair per placement
placements = [
("newsletter", "email"),
("google", "cpc"),
("instagram", "social"),
("blog", "content"),
]
VALID = re.compile(r"^[a-z0-9_]+$")
def tagged_link(source, medium, campaign=CAMPAIGN, content=None):
values = [source, medium, campaign] + ([content] if content else [])
for value in values:
if not VALID.match(value):
raise ValueError(f"Bad tag value: {value!r} (use lowercase and underscores)")
params = {
"utm_source": source,
"utm_medium": medium,
"utm_campaign": campaign,
}
if content:
params["utm_content"] = content
return f"{BASE_URL}?{urlencode(params)}"
for source, medium in placements:
print(tagged_link(source, medium))Running it prints one link per placement. Passing a value such as "Email" or "spring launch" raises an error instead of producing a bad tag.
Where UTM tags do not work
UTM tags are simple, but they have limits. Know them before you rely on the numbers.
- Internal links. Do not tag links between pages on your own site. A new tag can overwrite the original source and credit the wrong channel.
- Paid search platforms with auto-tagging. Some ad platforms add their own click identifier. Check how it interacts with your manual tags, and turn on the platform's setting to import or preserve them as your analytics tool documents.
- Channels that strip parameters. Some apps and messaging tools remove or shorten URLs. Test a real click to confirm the tags survive.
- Offline or untrackable actions. A phone call or a store visit has no UTM tag. Use a separate method, such as a dedicated phone number, a unique coupon code, or a "How did you hear about us?" field.
- Privacy settings. Browser privacy features and consent choices mean some visits will not be recorded. Treat your numbers as a consistent sample, not an exact count.
Set up conversion tracking
Tagged links tell you where a visitor came from. Conversion tracking tells you what they did. Set up both.
- Choose the conversion event. Use the definition from your measurement plan.
- Mark it as a conversion in your analytics tool. Many tools only count an event as a conversion after you configure it.
- Set up the ad platform's tracking if you run paid ads, so the platform can report conversions and, if you choose, optimize toward them.
- Connect the destination. The confirmation page, thank-you message, or form submission event must fire the same way every time.
- Respect consent rules. If your audience is in a region with consent requirements, configure your consent banner so tracking behaves as the rules require.
Test before you spend
Run a pre-launch test. This costs almost nothing and prevents the most common failure, which is paying for traffic that is not recorded correctly.
- Click each tagged link from a clean browser session.
- Confirm the visit appears in your analytics tool's real-time view with the right source, medium, and campaign.
- Complete the conversion yourself, such as submitting the form.
- Confirm the conversion is recorded and credited to the same source.
- Repeat on a phone, since mobile browsers and in-app browsers behave differently.
- Check that your own test traffic can be filtered out later, for example by noting the test time or using an internal filter.
If a step fails, fix it before launch. A broken tag on a placement you have already paid for cannot be corrected for the clicks that already happened.
Common errors
- Tagging after launch. Early clicks are lost or filed as direct traffic.
- Inconsistent naming. One channel appears as several rows, so you underestimate it.
- No agreed conversion definition. Two people read the same dashboard and reach different conclusions.
- Tagging internal links. Sources get overwritten and the wrong channel gets credit.
- Skipping the test conversion. The tracking looks fine until you notice, a week in, that no conversions are recorded.
- Too many metrics. The important signal is lost.
- Reading small numbers too confidently. With a small budget, a handful of conversions can swing CPA widely. Wait for enough data before acting, a point the monitoring chapter returns to.
What to hand to the next stage
Before launch, you should have these items ready:
- A one-page measurement plan with the success metric, conversion definition, tools, supporting metrics, and review schedule.
- A tracking sheet with every tagged link.
- A confirmed test conversion for each channel that drives to your site.
- A named owner for checking the numbers.
The monitoring chapter uses exactly these items to decide when to move money between channels.
Exercise
Your campaign runs on email, paid search, and social media. A teammate tags the email link with utmmedium=Email, and another teammate tags a second email link with utmmedium=e-mail. What problem will this cause in your reports, and how do you prevent it?
Show answer
The analytics tool treats Email, e-mail, and email as separate values, so email results are split across several rows and the channel looks smaller than it is. Prevent it with naming rules: lowercase only, underscores instead of spaces, one fixed utm_medium value per channel (for example email), and a shared tracking sheet where every tagged link is recorded. A script that rejects values not matching those rules can also enforce this.
Exercise
Name two situations where UTM tags will not give you reliable attribution, and give one way to handle each.
Show answer
Examples: (1) Internal links on your own site, where a new tag can overwrite the original source. Handle this by never tagging internal links. (2) Offline actions such as phone calls or store visits. Handle this with a dedicated phone number, a unique coupon code, or a "How did you hear about us?" field. Other valid answers include channels that strip URL parameters (test a real click) and privacy or consent settings (treat the numbers as a consistent sample).
Exercise
Why should you complete a test conversion on every channel before launch, instead of only checking that clicks appear in analytics?
Show answer
Seeing a visit with the correct tags confirms only that the source is recorded. It does not confirm that the conversion event fires and is credited to that source. A broken conversion event would leave you paying for traffic with no recorded results, and clicks that already happened cannot be corrected afterwards.