SubID tracking
Use dynamic SubIDs to track affiliate clicks by post, product, and placement
A SubID (also called subid, sub, sid, aff_sub, sub1–sub5, etc.) is a custom value you append to an affiliate link so your network reports which click converted.
In Content Egg, anywhere you set a Deeplink, you can insert dynamic placeholders (post, product, site data) to auto-build SubIDs—great for slicing performance by post, author, product, placement, and more.
Common SubID parameters by network
Network
SubID parameter(s)
Impact
subId1 … subId5
Rakuten Advertising (LinkShare)
u1
Awin
clickref, clickref2
CJ (Commission Junction)
sid
eBay Partner Network
customid
Tradedoubler
epi, epi2
TUNE / HasOffers (many CPA networks)
aff_sub … aff_sub5
ShareASale
afftrack
You can find the complete list of Sub ID parameters for popular affiliate networks and programs here.
Some programs support multiple SubID slots. Check your network docs for exact limits and allowed characters.
Example (Awin)
Deeplink with SubID using post ID + product ID, and ued pointing to the destination URL:
https://www.awin1.com/cread.php?awinmid=MERCHANT_ID&awinaffid=AFFILIATE_ID&clickref={{post_id}}-{{item_unique_id}}&ued={{url_encoded}}Safe SubID variants (recommended)
Most text placeholders also support safe variants:
{{..._encoded}} – URL-encoded
{{..._base64}} – Base64
{{..._slug}} – slugified
{{..._subid}} / {{..._subid32}} – compact, safe SubID encoding (length-capped; alphanumeric + _-.)
Use these to avoid characters your network rejects.
Testing & validation
Always test clicks in your affiliate network to confirm SubIDs are recorded.
Some networks trim or reject certain characters; use the safe variants above.
Watch parameter length limits (many networks accept ~100 chars; some less).
Override per-block with shortcode
You can inject/override query params via add_query_arg:
[content-egg module=Bolcom template=grid add_query_arg="subid={{post_url_relative_subid32}}.top_block.{{item_ean}}"]This passes: page path (safe), a placement label top_block, and the product EAN—perfect for granular reporting.
Amazon note
Amazon does not support SubIDs. Use Tracking IDs instead (limit ~100 per account). Example:
[content-egg module=Amazon add_query_arg="tag=CUSTOM_TAG"]Create and assign distinct Tracking IDs per site/section/campaign as needed.
URL Dynamic Placeholders
Use placeholders to inject dynamic values (product, page, site) into your affiliate SubIDs and deeplink parameters. Templates accept placeholders wrapped in {{...}}. At render time, each placeholder is replaced with the actual value from the product and the current page.
You can use these anywhere Content Egg asks for a SubID/Deeplink template.
Example template:
subid={{post_id}}-{{item_unique_id}}&name={{item_title_slug}}&page={{post_url_encoded}}&ref={{site_domain}}&mod={{item_module_id}}Might resolve to:
subid=6231-9300000069648999&name=polymaker-polyterra-pla-1-75mm-1kg-matte-black&page=https%3A%2F%2Fexample.com%2Fbest-pla-filaments%2F&ref=example.com&mod=BolcomWhat’s supported
1) Basic
{{url}} — original URL
{{url_encoded}} — url via urlencode
{{url_base64}} — base64 of url
{{post_id}}
{{item_unique_id}}
{{author_id}}, {{author_login}}
2) Product placeholders
{{item_title}}
{{item_brand}} (from manufacturer if present)
{{item_sku}}, {{item_ean}}, {{item_upc}}, {{item_isbn}}
{{item_price}}, {{item_currency}} (ISO code, e.g., EUR)
{{item_domain}} (e.g., bol.com)
{{item_module_id}} (module ID like Bolcom)
{{item_group}}
3) Page / Post placeholders (from current post)
{{post_title}}, {{post_slug}}, {{post_type}}
{{post_url}} (absolute permalink)
{{post_url_relative}} (relative path of the post)
{{post_author}} (author display name)
{{post_date}} (YYYY-MM-DD)
4) Site / Global
{{site_name}}
{{site_domain}} (host part of home_url)
{{site_locale}} (e.g., en_US)
5) Time / Utility
{{date}} (today in site’s local time, YYYY-MM-DD)
{{timestamp}} (current Unix timestamp)
{{uuid}} (random UUID v4 if available in WP)
{{post_hash}} (short stable hash of post_id:item_unique_id → 8 chars)
Automatic variants
For most text placeholders, we also provide:
{{..._encoded}} — URL-encoded value
{{..._base64}} — Base64-encoded value
{{..._slug}} — slugified value (only for non-URL strings)
Examples
{{item_title}} → {{item_title_encoded}}, {{item_title_base64}}, {{item_title_slug}}
{{post_title}} → {{post_title_encoded}}, {{post_title_base64}}, {{post_title_slug}}
{{post_url}} → {{post_url_encoded}}, {{post_url_base64}} (no slug for URLs)
SubID-safe variants (recommended for network limits)
Many affiliate networks restrict SubID character sets and length. Use these safe variants where you pass SubIDs:
{{..._subid}} — ASCII-safe, common-denominator encoding, up to 100 chars
{{..._subid64}} — same, capped at 64 chars
{{..._subid32}} — same, capped at 32 chars
If a value must be truncated, a short hash is appended to keep it stable.
Examples
Awin
https://www.awin1.com/cread.php?awinmid=MERCHANT_ID&awinaffid=AFFILIATE_ID&clickref={{post_id}}-{{item_unique_id}}&ued={{url_encoded}}CJ (Commission Junction)
https://www.anrdoezrs.net/click-AFFID-MERCHANTID?sid={{post_id}}-{{item_unique_id}}&url={{url_encoded}}Impact
https://tracking.impact.com/aff_c?offer_id=OFFER_ID&aff_id=PARTNER_ID&subId={{post_id}}-{{item_unique_id}}&redirect={{url_encoded}}ShareASale
https://shareasale.com/r.cfm?b=BANNER_ID&u=AFFILIATE_ID&m=MERCHANT_ID&urllink={{url_encoded}}&afftrack={{post_id}}-{{item_unique_id}}Rakuten Advertising
https://click.linksynergy.com/deeplink?id=AFFILIATE_ID&mid=MERCHANT_ID&murl={{url_encoded}}&u1={{post_id}}-{{item_unique_id}}TradeDoubler
https://clk.tradedoubler.com/click?p=PROGRAM_ID&a=AFFILIATE_ID&epi={{post_id}}-{{item_unique_id}}&url={{url_encoded}}Partnerize (Performance Horizon)
https://prf.hn/click/camref:CAMREF/destination:{{post_url_encoded}}?clickref={{post_id}}-{{item_unique_id}}FlexOffers
https://track.flexlinks.com/a.ashx?foid=FOID&foc=FOC&fos=FOS&subId={{post_id}}-{{item_unique_id}}&url={{url_encoded}}Admitad
https://ad.admitad.com/g/PROGRAM_ID/AFFILIATE_ID/?subid={{post_id}}-{{item_unique_id}}&ulp={{url_encoded}}Last updated