What Is a UTM Code? How to Build and Read a Campaign URL

If you have ever opened an analytics report and found most of your traffic labelled “direct”, you have already met the problem a UTM code exists to solve. A UTM code is not a tracking technology and it is not a setting inside your website. It is a short set of text labels added to the end of a link, so that when someone clicks it, the reporting tool on the other side can tell where that click came from. The link still opens the same page. The labels only describe the journey.

What is a UTM code worth to a team selling across borders? The same product page goes out to importers in Germany by email, into a LinkedIn message to a procurement manager in the Netherlands, onto a QR code on a stand at a trade fair, and into a Spanish-language newsletter for distributors in Latin America. Without labels those four arrivals look identical in your reports. With them, you can see which of the four produced an enquiry that turned into an order, and which produced four hundred clicks and no replies.

This guide covers what a UTM code actually is, what each of the five parameters does, how to name them so the report is still readable a year later, what silently breaks a tag, and where a UTM code is the wrong tool entirely.

What is a UTM code, in plain terms

A UTM code is a query string appended to a URL. Everything before the question mark is the address that decides which page opens. Everything after it is a set of key and value pairs that the analytics tool reads and stores alongside the visit. Nothing about the page changes; only the description of how the visitor got there changes.

The plainest version looks like this: your product page address, then a question mark, then utm_source=linkedin. That single pair tells the report that this visit arrived from LinkedIn rather than from a search engine or from someone typing the address. Add a second pair and you separate the pairs with an ampersand, not with a second question mark: ?utm_source=linkedin&utm_medium=social&utm_campaign=distributor-recruitment-2026q4.

The name is historical. The parameters were standardised by Urchin Software Corporation, whose product became the basis of a widely used analytics platform, and the three letters survived. What matters is not the origin but the convention: these five parameter names are read by every mainstream analytics tool, and changing them means the tool stops recognising them. utm_source and its four companions are effectively fixed vocabulary.

One consequence is worth stating early, because it explains most disappointing UTM reports. A UTM code is a label written by the person who made the link. It carries no verification. If you tag a link with a source that does not describe reality

Diagram of a tagged link: the address before the question mark decides the page, the parameters after it record where the click came from

, the report will faithfully record your mistake. A UTM code is a filing decision, not a measurement.

The five parameters and what each one is for

Only the first three are required in practice. The last two exist for cases where you need to separate variations inside one campaign, and they are the ones most teams leave empty.

The five UTM parameters and what each one identifies: utm_source, utm_medium, utm_campaign, utm_term and utm_content

Parameter What it identifies Typical values for a trade team The mistake that breaks it
utm_source The specific place the click came from linkedin, newsletter, baidu, alibaba, qrcode Writing the format instead of the place, such as “email” when you mean “our monthly buyer email”
utm_medium The channel type, not the platform email, social, cpc, referral, print Putting a platform name here, so the same value appears in both source and medium
utm_campaign The business initiative the link belongs to distributor-recruitment-2026q4, canton-fair-2026 Reusing one vague value such as “campaign1” across unrelated efforts
utm_term The paid keyword that triggered the click Usually inserted automatically by the ad platform Filling it in by hand on organic links, where it means nothing
utm_content Which variant of the same asset was clicked header-button, textlink, banner-a Using it to describe the audience instead of the creative, which hides A/B test results

The distinction between source and medium causes more confusion than the other four combined. A workable rule: the medium answers “through what kind of channel did this reach the person”, and the source answers “specifically where was it”. A buyer newsletter is email as a medium and newsletter as a source. A LinkedIn post is social as a medium and linkedin as a source. A paid search ad is cpc as a medium and the search engine as the source. When medium is used for platform names, the channel-level report stops being comparable across platforms, and you can no longer answer the simple question of whether email outperformed social.

A frequent shortcut is to tag a link once and then paste that same tagged link everywhere. It feels efficient and it quietly destroys the comparison you were trying to make. Every copy of the link that reaches a different audience needs its own tags, because the point of tagging is to separate those audiences.

Five places the same page is shared, each with its own utm_source and utm_medium values

Consider one product page and five ways it reaches people in a single month. A cold email to a list of importers in Germany. A follow-up message inside a business network to a named procurement contact. A QR code printed on a stand at a trade fair, scanned by someone standing in front of you. A distributor newsletter sent in Spanish to partners in three countries. A catalogue PDF hosted on your own site and linked from a marketplace profile.

Each of those deserves a distinct source. If all five carry the same tag, the report shows one number and you cannot tell whether the trade fair scans were worth the stand fee, or whether the German cold email produced anything at all. If each carries its own, the same page becomes five measurable attempts, and the next month’s budget decisions have evidence behind them.

There is one place where tagging is actively harmful: internal links inside your own website. Tagging a link from your blog to your product page creates a second record of that page view, and it overwrites the original source that brought the visitor in. A visitor who arrived from a search engine, read an article and then clicked through to a product page can end up recorded as arriving from your own article. The common fix is a simple rule inside the team: UTM tags are for links pointing to your site from outside it, never for links between pages of your site.

What inconsistent tagging does to your reporting

Tags are matched as text, so any variation is a new value. This is not a minor cosmetic issue; it changes the size of the numbers you are looking at.

Write the same network three ways – linkedin, LinkedIn and linked-in – across three campaigns, and the channel report lists three sources where there is one. Each source then looks smaller than it is, and a channel that is genuinely performing can appear marginal. The same thing happens when one person writes newsletter and another writes email-newsletter, or when the campaign value includes the month in one case and the quarter in another.

The opposite failure is untagged or badly tagged traffic falling into “direct” or “none”. Links that carry no tags arrive without a story attached, and over time that bucket grows until it is the largest line in the report and tells you nothing. In cross-border work this is common, because links get forwarded internally, copied into chat applications, pasted into documents and re-shared by partners. Each re-share keeps whatever tags the original link had – which is exactly why the original tags should describe the original place, and not be reused across places.

Naming conventions that survive a change of staff

The tagging convention is worth writing down once, in a short document someone can read in three minutes. Five rules cover most of it.

Use lowercase everywhere. It removes the largest single cause of duplicated sources and needs no judgement to apply.

Choose one separator and keep it. Hyphens read slightly better than underscores inside a campaign name, but the specific choice matters far less than using the same one every time. Mixing both inside one value creates two values.

Never put spaces in a value. A space becomes percent-encoded in the URL, so canton fair travels as canton%20fair. Some tools decode it back and some do not, and you end up with two versions of one campaign.

Give source and campaign different jobs. Source names the specific place; campaign names the initiative. If the platform name is already in the source, it does not need to appear again in the campaign value.

Fix the order of details inside a campaign value. A pattern such as initiative, market, period – distributor-recruitment-germany-2026q4 – sorts predictably and can be filtered by market later. Two people inventing their own order will produce a list that cannot be grouped.

Two smaller decisions are worth settling at the same time. Keep one list of approved source and medium values, because the whole value of the report depends on those values being reused. And decide the language of the values up front: values written in English will read consistently in a report even when the campaigns themselves run in five languages, and values written in the local language of each market will fragment the same channel across several spellings.

What silently breaks a tag

UTM codes fail quietly. A broken tag does not produce an error; the link still works, the page still opens, and the visit simply arrives without its label. The failures below account for most of it.

Four ways a UTM tag breaks silently: a tag after the hash mark, a second question mark, mixed case, and a shortener that strips the query string

Tags placed after the hash. Anything after a hash mark is handled by the browser and by page-level scripts, and is not sent to the analytics tool. A tag written after a hash mark is never recorded. Tags belong before it.

A second question mark instead of an ampersand. The first key-value pair is introduced by a question mark; every pair after it needs an ampersand. A second question mark makes the later pairs part of the first value, and the tags are unreadable.

Case and characters. Upper and lower case are different values, and characters that are not letters, digits or hyphens can be re-encoded somewhere along the path. Both are avoided by the lowercase rule above.

Redirects and shorteners that strip the query string. A link shortener, a redirect on your own server, or a tracking service in between can drop everything after the question mark. It is worth checking a tagged link once, end to end, by clicking it yourself and confirming the values appear in the report before the campaign goes out.

Tagging an address that already has a query string. If the destination already contains a question mark, the tags must be joined with an ampersand rather than a new question mark. This is the same rule as above, applied to the destination rather than to the tags.

None of these are visible in a preview. A tagged link looks correct in a draft email whether or not the tags will be recorded, so a single end-to-end click is worth more than any amount of checking by eye.

How to read the numbers once they arrive

Once the tags are consistent, the source and medium columns answer a set of practical questions that no other report answers as directly. Which market’s buyers respond to outreach, and which ignore it. Whether a trade fair stand produced enquiries that converted or only scans. Whether a distributor newsletter earns its place next quarter. Whether the same page performs differently when it is sent by email rather than posted on a network.

What the report does not tell you is why. A high click count from one source and a low one from another can reflect the audience, the message, the timing or the platform’s own behaviour, and the tags cannot separate those. Treat the source and medium report as the place to notice a difference, and the campaign content as the place to explain it.

Two limits are worth building into how you read it. The first is that a tag records the last tagged click before a visit, so a buyer who first saw you at a trade fair, then received an email, then searched your name and finally clicked a tagged newsletter link will be credited to the newsletter. Attribution across a long business-to-business decision is imperfect in every tool; the tags make the sequence visible but do not resolve it. The second is that restrictions on cross-site tracking and the choices visitors make about consent mean some clicks will never be attributed to their source at all. A tagging convention reduces noise in the report. It does not make the report complete.

Where a UTM code is the wrong tool

A UTM code only works where a clickable link on a web page is the actual path to your site. Several common routes in cross-border selling are not that, and tagging them produces misleading data rather than missing data.

Links shared inside messaging applications often open in an in-app browser that obscures the referring context; some strip the query string altogether. A verbal recommendation, a printed catalogue handled at a meeting, a business card, a WhatsApp message passed between two colleagues of a buyer – none of these are clicks, and if you tag a link hoping to measure them you will only measure the copy of the link that happened to be clicked on a computer.

Where the path is genuinely offline, the honest measurement is a different one: a dedicated landing page per channel, a distinct address per campaign, or simply asking. A tagged link attached to an offline route records the click, and the click is not the event you were trying to count.

There is also a volume threshold. On a campaign sending to a few dozen named accounts, reading the source column tells you almost nothing you did not already know, because you know who you wrote to. UTM codes earn their overhead when campaigns repeat, when several people send them, or when you are comparing channels against each other – which is the normal situation for an export team running outreach into several markets at once.

What to do next

The work is small and mostly one-off: write down a source list and a medium list, agree one campaign pattern, fill in the tags before the link is sent rather than afterwards, and click every tagged link once before a campaign goes out. After that the report stays readable, and the comparison between markets becomes something you can act on rather than something you have to interpret.

If you would rather not assemble the tagged links by hand, the UTM campaign builder builds a correctly formatted link from your source, medium, campaign and content values and returns a URL you can copy straight into an email or a post. It is free and needs no account. If the links you are tagging are part of an outreach programme, the email marketing workspace keeps the lists, campaigns and follow-up in one place, and the guide to B2B email marketing covers the message side of the same problem. Teams that are tagging links to buyer groups they have not yet qualified will find the note on lead enrichment a useful companion, and the full tool list shows what else is available at no cost.

The platform that keeps the information behind it connected to the deal is described on the services page.

Scroll to Top