UTM Naming Convention for Affiliate Subid: A Template

A fixed job for every UTM field and sub1 to sub5, with a template table, naming rules and a dictionary, so reports group cleanly across clients and offers.

TDS Team Author
Published
7 min Reading time
All posts

Three months into running several offers, you open a report and find FB_Test, fb-test, facebook test 2 and Fb_test_NEW as four separate lines. They are the same campaign. Nobody remembers which one the winning creative lives in, and your sub fields hold whatever each person typed that day.

A naming scheme fixes this before it happens. You decide once which slot carries which fact, how values are spelled and where the dictionary of allowed values lives. Then every link and every report reads the same way, whether it covers one offer or ten clients.

Short answer

Give each of the UTM fields and sub1 to sub5 one fixed job: source, campaign, creative, placement, client. Write values in lowercase, with no spaces, joined by one separator, and keep a dictionary file of allowed short codes. Build links from the dictionary instead of typing them by hand. Reports then group cleanly, and each client's data stays in its own rows.

Why messy names cost real money

A report groups by exact text. Facebook and facebook are two groups. A trailing space makes a third. When you export to a spreadsheet and build a pivot table, every variant needs a manual merge, and you will skip a few.

The second cost is memory. A campaign called test3_final_v2 means nothing in six weeks. A name like us-ios-lp2 tells you the geo, the platform and the landing without opening anything.

The third cost shows up when you work for more than one person. If client names, offers and traffic sources share the same free-text field, you end up unable to answer a simple question: how much did client A spend on creative 7?

Decide what each slot carries

UTM gives you five standard fields: source, medium, campaign, content and term. Affiliate links usually add sub1 to sub5, which are free parameters your tracker stores with each click. Names and macros differ between networks and trackers, so check your own docs for the exact parameter names. The scheme below does not depend on them.

The trick is to stop treating the fields as free text. Each slot gets one job.

SlotCarriesExample value
utm_sourceTraffic sourcepush, native, social
utm_mediumBuying typecpc, cpm, cpa
utm_campaignOffer, geo and anglevpnapp-us-angle2
utm_contentCreativec014
utm_termPlacement or audiencep-feed, aud-lal1
sub1Clientcl-acme
sub2Campaign ID from the source8841230
sub3Creative ID from the sourcec014
sub4Placement or site IDpl-77310
sub5Spare, for a test or a versionv2

You do not have to copy this table. What matters is that sub1 always means the same thing on every link you build. If you change the layout later, write down the date and treat old data as a separate era.

Why the client goes in a fixed slot

Put the client in the same slot every time, the first sub field in this example. Then grouping the report by that field splits the data per client in one step. If the client name hides inside the campaign text, you have to search and filter by substring, which breaks the first time someone misspells it.

Keep the source's own IDs

Names you invent are for you. Numeric IDs from the traffic source are for reconciling with the source's own dashboard, so keep them in a separate slot. When your numbers and the source's numbers disagree, matching on IDs is far easier than matching on names (see why tracker and network stats differ).

Rules that keep it clean

A scheme works only if it is boring and strict. These rules cover almost every case.

  • Lowercase only. Capital letters create duplicate groups. Decide once and never use them.
  • No spaces. A space turns into %20 or + in a URL, and different tools decode it differently. Use a separator instead.
  • One separator. Pick a hyphen for words inside a value and a different character, such as an underscore, to join slots if you ever combine them. Never mix the two roles.
  • Latin letters and digits. Skip accents, non-Latin letters and symbols such as &, # and ?, which have special meaning in a URL.
  • Short codes, not sentences. us instead of united-states-of-america. The dictionary explains what a code means.
  • Fixed order inside a value. If a campaign is offer-geo-angle, it is always in that order. People then read it without effort.
  • Never reuse a code. If c014 was a green banner, it stays a green banner. Retire codes, do not recycle them.

The dictionary file

A dictionary is a plain file, a spreadsheet or a text file in a shared folder, that lists every allowed value for every slot and what it means. It is the part that makes the scheme survive a new team member.

SlotCodeMeaningAdded
sourcepushPush network buying2026-01-12
clientcl-acmeAcme, offer team A2026-01-12
geousUnited States2026-01-12
angleangle2Price comparison hook2026-02-03

Two rules go with it. A new value gets added to the dictionary before it appears in a link. And links are built from the dictionary, ideally with a small sheet formula or script that joins the pieces, so nobody types a campaign name from memory.

Messy against clean

Here are the same three campaigns written by hand over a few weeks, and then written from the scheme.

MessyClean
utm_campaign=Test 1 FB USutm_campaign=vpnapp-us-angle1
utm_source=Facebook&utm_medium=Paidutm_source=social&utm_medium=cpc
sub1=ivan (this week), sub1=acme (last week)sub1=cl-acme
utm_content=new banner final2utm_content=c014

A full link in the clean version looks like this, with everything in lowercase and nothing to decode:

Code
?utm_source=social&utm_medium=cpc&utm_campaign=vpnapp-us-angle2&utm_content=c014&sub1=cl-acme&sub2=8841230

Whether parameters on your link reach your destination depends on how the redirect is set up. If you need to check that, see UTM through redirects.

Keeping several clients apart in reports

If you run traffic for more than one client, the scheme does the separation, and it does it through the data. There is no special account structure in this approach. You keep clients apart with the client code and with how you build reports.

  1. Always set the client slot. A link without it is a link you cannot attribute. Make the link builder refuse to output one.
  2. Group by the client slot first. In a report, the first grouping level is the client, then campaign, then creative.
  3. Filter before you export. When you send numbers to a client, filter to their code and export only those rows. Check the export before sending it, because one wrong code shows another client's data.
  4. Use separate links per client. Even with one domain, create separate links for each client's campaigns so their rules and their logs do not mix.

Treat it as a convention you enforce yourself. Nothing in a naming scheme prevents a mistake, so build the checks into your process: one person reviews the dictionary, one place builds the links.

Where this shows up in TDS.SO

In TDS.SO you keep one link per client campaign, with the rules behind it, and the click log shows each click with time, country and city, IP, device and browser, referrer and status. Separate links make it easy to see one client's traffic on its own. For conversions, tie clicks to postbacks with a click ID, as described in click ID and subid explained. The tracker with postbacks, conversions, revenue and ROI is in beta; there revenue is approved conversions and cost is all clicks, which is a good reason to keep the traffic you buy tagged and tidy from the start.

FAQ

How many sub fields should I actually use?

Use the ones you will read in a report. Five slots are plenty. Leave the last one spare for versions or tests, and fill the others with stable, repeatable facts.

Should I put names or IDs in the sub fields?

Both have a place. Your own short codes are for readable grouping, and the source's numeric IDs are for reconciling with the source. Keep them in different slots.

Can I change the scheme later?

Yes, but treat it as a new version. Write down the date, update the dictionary and do not compare the two eras row by row without mapping old codes to new ones.

Is lowercase really necessary?

It is the cheapest rule to follow and it removes a whole class of duplicate groups. Most tools treat capitals as different values, so a single capital letter splits a report.

What about spaces and non-Latin characters?

Avoid both in values. They get encoded in URLs, and different tools show them differently, which brings back the duplicates you were trying to remove.

When your links are clean, the data behind them is easy to read. The analytics page shows the overview and click log where those names appear.

Was this article useful?
TDS Team Author

Guides and write-ups on routing, bot filtering and tracking from the TDS.SO team.

All articles by the author
Keep reading

Related

All posts
Analytics 9 min

Conversion attribution in affiliate marketing: a practical guide

11 Nov 2026 · TDS Team
Analytics 7 min

Postback vs Pixel Tracking: Which One to Use

11 Nov 2026 · TDS Team
Analytics 10 min

Click ID and SubID: Pass Them Through Redirects

10 Nov 2026 · TDS Team

Try it on
your own traffic

Link the Telegram bot and get 3 days free, once per account.

Create account