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

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:

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:

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:

Might resolve to:

What’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)

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

CJ (Commission Junction)

Impact

ShareASale

Rakuten Advertising

TradeDoubler

Partnerize (Performance Horizon)

FlexOffers

Admitad

Last updated