Sub ID tracking means adding your own labels to an affiliate tracking link, in parameters such as sub1 to sub5, so the network records them with each click and returns them with each conversion. You choose the values: traffic source, campaign, ad, placement or your tracker's click ID. Reports and postbacks then show which segment of your traffic actually earns.
This guide covers how to plan sub ID slots, a naming scheme you can copy, reporting, passing click IDs to trackers and ad platforms, and the privacy rules that apply to anything you put in a URL. If you promote programs through MassPartner, see how tracking works for affiliates.
What a sub ID is, and what it isn't
A sub ID is a free-form value you append to your tracking link. The network stores it with the click, copies it to any conversion that click produces, and shows it in reports, exports and postbacks.
Three identifiers are easy to confuse:
| Identifier | Set by | Unique per | Purpose |
|---|---|---|---|
| Affiliate ID | The network | Affiliate | Who gets paid |
| Click ID | The network or tracker, automatically | Click | Matching one conversion to one click |
| Sub ID | You | Whatever segment you choose | Your own reporting and optimization |
Parameter names differ by network: you will see sub1 to sub5, aff_sub, s2 or subid, so check each program's link builder for the exact names and length limits.
Designing a sub ID naming scheme
A sub ID scheme only pays off if it stays consistent. The rules that keep reports readable:
- One dimension per slot, fixed everywhere. If
sub2means campaign on one offer, it means campaign on every offer. - Reserve one slot for click IDs. A tracker click ID or an ad click ID is unique per click, so it makes per-value reports useless if it shares a slot with segment labels.
- Use short, URL-safe values. Lowercase letters, digits, hyphens and underscores. No spaces, no special characters, no personal data.
- Let the traffic source fill dynamic values. Ad platforms replace placeholders at click time; Google Ads, for example, supports ValueTrack parameters such as
{campaignid},{adgroupid},{creative},{keyword},{device}and{gclid}in final URLs and tracking templates (Google Ads Help). Those placeholders are a kind of tracking macro. - Keep a dictionary. A shared sheet that maps short codes (
nl,rv,gads) to their meaning saves guesswork six months later.
Here is a scheme for an affiliate who runs both a content site and paid search. The links use example domains:
Slot map
sub1 click ID (tracker or ad platform) unique per click
sub2 source_campaign gads_<campaign id> | nl_2026w41 | rv_site
sub3 ad group / page section <ad group id> | hero | sidebar
sub4 creative or link variant <ad id> | btn_green | text_link
sub5 device m | t | c
Content site, review page, top button (static values):
https://track.example-network.com/click?offer=42&aff=1001&sub2=rv_site&sub3=hero&sub4=btn_green
Paid search, Google Ads final URL suffix on your own landing page:
cmp={campaignid}&adg={adgroupid}&ad={creative}&dev={device}
Outbound affiliate link after your page copies those values and the gclid (example values):
https://track.example-network.com/click?offer=42&aff=1001&sub1=EXAMPLE-GCLID&sub2=gads_1234567890&sub3=9876543210&sub4=55501234&sub5=m
With auto-tagging on, Google adds the gclid to your landing page URL by itself, so the suffix only needs the values you want for segmentation. A short script on your page copies them into the outbound link.
Reporting by sub ID
Once values are flowing, group results by one slot at a time and compare clicks, conversions, conversion rate and commission. Dividing commission by clicks gives EPC per segment, the quickest way to see where the next dollar of budget should go. Our guide to EPC in affiliate marketing shows the calculation.
A few habits keep the analysis honest:
- Wait for volume. A sub ID with 40 clicks and one conversion tells you little. Set a minimum click count before you cut or scale a segment.
- Compare approved commissions, not only pending ones. Segments with many rejected conversions look better than they are until approvals catch up.
- Watch the empty bucket. Clicks with no value usually mean a link was copied without its sub IDs, or a macro wasn't replaced. If you see
{campaignid}as a literal value, the placeholder wasn't filled.
The MassPartner affiliate dashboard includes a Sub-ID Analysis report that breaks down clicks, conversions and commissions by any of sub1 to sub5. For brands, the same data is a quality-control tool: if suspicious leads cluster on one sub ID, you can ask the partner to cut that source instead of pausing the whole account.
Passing tracker and ad click IDs through sub IDs
Media buyers who run a tracker need the network to send conversions back with the tracker's own click ID. The pattern is the same everywhere:
- Put the tracker's click ID token in your reserved slot, for example
sub1={clickid}in the offer URL saved in your tracker. - Register your tracker's postback URL in the network dashboard, using the network's macro that returns
sub1. - Click your campaign link once and confirm the tracker's ID appears in the network's click report.
In the MassPartner affiliate dashboard, callbacks to your own tracker support placeholders such as {$sub1} to {$sub5}, {$commission}, {$status} and {$clickid} for MassPartner's own click ID:
https://your-tracker.example.com/postback?cid={$sub1}&payout={$commission}&status={$status}
Exact tokens and URL formats for Voluum, RedTrack, Keitaro and Binom are in our guide to sending affiliate postbacks to your tracker. If you buy Google or Microsoft search traffic, the same slot can carry the gclid or msclkid so you can upload conversions back to the ad platform; see Google Ads offline conversions for affiliates.
Common sub ID mistakes
Most broken sub ID reports trace back to a handful of setup errors:
- Changing a slot's meaning midway. Moving campaign names from
sub2tosub3splits your history in two. Add a new dimension to an unused slot instead. - Ignoring length limits. Networks truncate long values, and a truncated click ID never matches a conversion. Check the limit on every network you use.
- Unencoded characters. A value containing
&,#or a space breaks the URL or splits into a new parameter. Stick to URL-safe characters or encode the value. - Free-text values.
Newsletter-Oct,newsletter_octandnl octbecome three rows. Pick a convention and generate values from your dictionary, not by hand. - Unreplaced macros. If a traffic source doesn't support a placeholder, the literal text is sent and every click lands in one meaningless bucket.
Privacy: keep personal data out of sub IDs
Sub IDs travel in URLs, and URLs end up in many places. OWASP notes that query strings are captured in server logs even over HTTPS, and also leak through browser history, the Referer header and third-party monitoring tools (OWASP). Assume the network, the brand and any tool in between can see every value you send.
That rules out email addresses, names, phone numbers and customer account numbers. Hashing doesn't solve it: the European Commission says data that has been pseudonymised but can still be used to re-identify a person remains personal data under the GDPR, and it lists cookie IDs and IP addresses as examples of personal data (European Commission). Ad tools apply the same rule. Google Analytics, for example, requires that both the URL path and its parameters be free of personally identifiable information (Google Analytics Help).
Safe practice:
- Use segment codes and random click IDs, never identifiers tied to a person.
- For email campaigns, tag the send or the segment (
nl_2026w41), not the subscriber. - If you need to join network data to your own CRM, keep the mapping table on your side, keyed by a random ID.
- Check your approach with whoever handles privacy compliance for your business.
Track every segment of your traffic
MassPartner affiliates get personal tracking links with five sub ID slots, real-time stats and a Sub-ID Analysis report, and joining is free. See how it works for affiliates.
FAQ
What is a sub ID in affiliate marketing?
It is a custom value you add to your tracking link, such as a traffic source or campaign name. The network stores it with the click and returns it with any resulting conversion, so you can see which segments convert.
How many sub IDs can I use?
It depends on the network, so check its link builder. MassPartner tracking links accept five (sub1 to sub5), with values up to 255 characters.
What is the difference between a sub ID and a click ID?
A click ID is generated automatically and is unique to one click. A sub ID is a value you choose, usually shared by every click in the same segment.
Can I pass a GCLID in a sub ID?
Yes. With auto-tagging on, Google appends it to your landing page URL; copy it into a dedicated slot on your outbound links and use the returned value to upload offline conversions.
Can I put customer emails in a sub ID?
No. URLs are logged and shared across systems, and an email address, or a hash that can be matched back to it, is personal data. Use random IDs and keep any mapping on your own systems.