Skip to content
Browse documentation

Sub IDs, parameters & traffic-source templates

Every query parameter a tracking link understands — sub1–sub10, source_id, click IDs, ad-platform fields and their aliases — custom parameters, limits, and traffic-source link templates.

Last updated 5 min read

On this page

Partners add parameters to tracking links to report on their own campaigns. TrackCrown maps known parameters onto click columns (report dimensions and macros) and keeps everything else as custom parameters. This applies to /r, /click, /c, /s, /i and /clk.

Rules#

  • Parameter names are case-insensitive (SUB1, CampaignId work).
  • For each column the first alias in the table with a non-empty value wins; other aliases with values are kept as custom parameters.
  • Empty values are ignored. Values are trimmed and cut to 512 bytes (click IDs: 1,024; some fields shorter, see below).
  • url, force_transparent and token are never stored as parameters.

Mapped parameters#

Column (report dimension)Accepted parameters, in order of precedence
sub1sub1, s1, aff_sub, aff_sub1
sub2…sub5subN, sN, aff_subN
sub6…sub10subN, sN, aff_subN, pN
source_idsource_id, source, pubid, site_id
Click IDsgclid, gbraid, wbraid, fbclid, msclkid, ttclid
Ad campaign (ext_campaign_id)campaignid, campaign_id, cid, cmp, utm_campaign
Ad group (ext_adgroup_id)adgroupid, adgroup_id, agid, ag, adset_id
Ad (ext_ad_id)creative, ad_id, adid, crid, cr
Keyword (ext_keyword)keyword, kw, utm_term
Match type (max. 32)matchtype, mt
Network (max. 64)network, net
Ad-platform device (max. 32)device, dev
Placementplacement, pl, site
Physical location (max. 64)loc_physical_ms, loc, loc_physical
Target IDtargetid, tid, tgt
Feed item / extension / asset group (max. 64)feeditemid, feed_item_id / extensionid, extension_id / assetgroupid, asset_group_id
Location of interest (max. 64)loc_interest_ms, loc_interest
Device model (max. 128)devicemodel, device_model
Placement categorytarget
Product / merchant (max. 64) / ad type (max. 64)product_id / merchant_id / adtype, ad_type
Search termquerystring, search_term, search_query (Microsoft {QueryString})
Traffic sourcets; otherwise detected: google (gclid, gbraid or wbraid), meta (fbclid), microsoft (msclkid), tiktok (ttclid)

The Google Target ID is also split on : into keyword ID (kwd-…), audience ID (aud-…), DSA ID (dsa-…) and partition ID (pla-…), each a report dimension. Example: tid=aud-456:kwd-123.

On transparent links, click IDs inside the decoded url= landing page fill empty click-ID columns too.

Where sub IDs are available#

Placesub1–sub5sub6–sub10
Click log✓✓
Report dimensions✓ (clicks, impressions and conversions)✓ clicks and conversions (impressions fall into the empty row)
Destination, fallback and transparent url= macros✓✓
Partner postback macros (taken from the click)✓✓
Stored on the conversion record✓✓ for conversions recorded by the tracking server (copied from the click); manual and CSV conversions leave them empty
Impressions✓—
Link generators (staff, partner portal, traffic-source templates)✓— (add them to the link by hand)
Traffic controls, payout-rule and forwarding conditions✓—
Targeting Parameter filters✓✓ (by the literal parameter name)

Custom parameters#

Any other parameter is stored on the click as a custom parameter: up to 50 per click, names up to 64 characters, values up to 512 bytes.

URL
https://trackcrown.com/r/OFFERCODE/PARTNERCODE?sub1=summer&placement_group=top-feed&ad_format=video
  • Visible on the click's detail page (Reporting → Clicks → open a click).
  • Usable in targeting Parameter filters by name (e.g. ad_format is video).
  • Not available as macros and not report dimensions. Map values you need to report on into sub1–sub10.

Traffic-source templates#

A traffic-source template presets sub1–sub5 and source_id with an ad network's macros, so partners do not have to look them up. Manage them under Partners → Partner program → Traffic sources.

  1. Click to add a source (sheet New traffic source) or start from a preset.
  2. Fill Name, the sub values and Source ID (at least one value).
  3. Choose the visibility:
    • Public — every partner can pick it in their link builder.
    • Private — a staff-only template, or, with Force on partner set, applied to every link that partner generates (portal and API); the partner cannot change those values, and the tracking server enforces them (see below).

Presets:

Presetsub1sub2sub3sub4source_id
Google Ads{campaignid}{adgroupid}{creative}{keyword}google
Meta Ads{{campaign.id}}{{adset.id}}{{ad.id}}{{placement}}meta
TikTok Ads__CAMPAIGN_ID____AID____CID__tiktok
Microsoft Ads{CampaignId}{AdGroupId}{AdId}{keyword:default}microsoft
  1. Values typed by the user.
  2. A chosen template overrides the keys it defines.
  3. A forced source overrides everything for its keys.

Staff choose a Traffic source template on the offer's Tracking tab (private templates are marked "staff only"); partners choose Traffic source in the portal. Deleting a source does not change links already generated.

Forced sources on incoming clicks#

Templates are applied when links are generated. A forced source is also enforced by the tracking server on that partner's affiliate links (/r and /click) without url=: a click whose values contradict it goes to the fallback chain with the reason traffic_source.

For each key of the forced source (sub1–sub5, source_id):

  • Macro placeholders ({campaignid}, {{ad.id}}, __CID__, [clickid], %%SITE%%, ${AUCTION_ID}) accept any value — also an empty or unexpanded one.
  • Every literal part must be present, in order, ignoring case and surrounding spaces: the first part at the start of the value, the last part at the end. source_id = google requires source_id=google; sub1 = fb_{{ad.id}} requires a value starting with fb_.
  • A template made only of macros never refuses a click.

Forced sources are not checked on transparent requests (any link carrying url=), smart links or server-side clicks (/clk). Changes apply to new clicks within seconds.

Something unclear or missing in this article?Tell us