ClickBank is an e-commerce platform and affiliate marketplace that connects product vendors with affiliate marketers. Integrating ClickBank with Aftrad allows you to track clicks through your ClickBank HopLinks or Direct Tracking Links and receive real-time postback notifications in Aftrad when purchases, upsells, or other conversion events occur.
The integration works as follows: Aftrad sends a click to ClickBank with the Aftrad click_id appended to the tracking link. When a user converts on the vendor's order page, ClickBank fires a server-to-server (S2S) postback to Aftrad's event endpoint, passing back the click_id and the relevant event data.
Overview
The setup consists of two parts:
Configure the offer in Aftrad — append the
click_idmacro to the ClickBank tracking link so it is passed through on every clickConfigure the S2S postback in ClickBank — set up Aftrad's event endpoint as the postback destination and select the events to track
Part 1 — Configure the offer in Aftrad
Create or edit the offer in Aftrad and set the ClickBank HopLink or Direct Tracking Link as the Tracking URL.
Append the tid parameter with the Aftrad {click_id} macro to the URL so that ClickBank receives the click ID and can return it in the postback:
https://[vendor].pay.clickbank.net/?cbskin=...&tid={click_id}Or with a Direct Tracking Link:
https://[vendor-page-url]?tid={click_id}tid is ClickBank's primary tracking parameter for affiliates. It is stored by ClickBank at the time of the click and returned in all postback notifications for that transaction. ClickBank strongly recommends using tid for passing unique click identifiers to external tracking systems.
You can also pass additional non-unique tracking data using ClickBank's affiliate tracking parameters, introduced in June 2024:
ClickBank parameter | Aftrad macro | Description |
|
| Unique click ID — used to match postbacks to the original click |
|
| Traffic source name |
| — | Traffic type (e.g. |
| Depends on Affiliate or Traffic Source configuration | Campaign identifier |
| Depends on Affiliate or Traffic Source configuration | Creative identifier |
| Depends on Affiliate or Traffic Source configuration | Additional custom sub-parameter |
Not all parameters are required. Add only the ones relevant to your tracking setup. Full documentation is available in ClickBank's Affiliate Tracking Parameters guide.
Part 2 — Configure the S2S postback in ClickBank
ClickBank's S2S Postback/Pixels feature enables clients to send ClickBank order form impression and conversion events to third-party services through a modern server-to-server integration method.
In your ClickBank account, go to Integrations → Postback/Pixels and click Add Integration. Select Custom Postback/Pixel.
Configure the integration as follows:
Name — a descriptive name, e.g.
Aftrad postbackAccount Nickname — select the ClickBank account nickname to integrate
Role — select Affiliate
Integration Level:
Global — applies to all activity in the selected account
Custom — recommended; allows you to filter by specific tracking parameters (e.g. only fire for clicks containing
traffic_source=aftrad) to avoid over-reporting
Event Types — select the events you want to track (see table below)
Postback URL — Aftrad's event endpoint for this advertiser:
https://[your-event-domain]/api/v1/events?click_id={trackingCodes}&event_parameter=[event_name]&payout={affiliateEarnings}Replace [your-event-domain] with the event domain configured for the advertiser in Aftrad, and [event_name] with the value that matches the payout rule in Aftrad for each event (see mapping table below).
ClickBank supports configuring a different postback URL per event type by enabling the Customize URL per event type toggle. This allows you to set a specific event_parameter value for each event, which is necessary to match distinct payout rules in Aftrad.
Click Save, then Activate the integration.
ClickBank events and Aftrad mapping
ClickBank's S2S Postback/Pixels feature tracks the following events: Initial Order Form Impression, Initial Purchase, and Upsell Purchase.
ClickBank event | What it means | Suggested |
| User viewed the order form |
|
| Initial purchase completed |
|
| Upsell purchase completed |
|
| Recurring subscription charge |
|
| Purchase refunded |
|
ClickBank postback macros
Use these ClickBank macros to build the postback URL:
ClickBank macro | Description |
| The |
| Affiliate commission amount for the transaction |
| Vendor earnings (for sellers only) |
| ClickBank order receipt / transaction ID |
| ClickBank postback parameter (legacy) |
Payout rules in Aftrad
In the offer's Payouts & Events tab, create one payout rule per ClickBank event you want to track. The Parameter value for Event type must match the event_parameter value configured in the ClickBank postback URL for each event.
ClickBank event | Parameter value for Event type |
Initial purchase |
|
Upsell |
|
Rebill |
|
Refund |
|
Order form impression (ORDER_IMPRESSION) is typically tracked for analytics only and does not require a payout rule.
Notes
Postback domain must use HTTPS. ClickBank will only send postbacks to secure (https://) domains. Make sure the event domain configured for the advertiser in Aftrad uses HTTPS.
Custom integration level recommended. When adding event types to the postback URL in ClickBank, ensure they match exactly as entered in your tracking system. Using the Custom integration level with a filter (e.g. traffic_source=aftrad) prevents ClickBank from firing postbacks for traffic that did not originate from Aftrad, avoiding over-reporting.
Activate the integration. After saving, the integration must be explicitly activated in ClickBank via the action menu. Inactive integrations do not fire postbacks.