Setting Up Postback Tracking
Postback tracking closes the loop between a sale in your affiliate network and the specific keyword, page, and click that drove it. Once set up, your Revenue Mapping Dashboard shows EPC and revenue broken down by keyword.
How it works
- A visitor clicks an affiliate link — AffRank records the click with a unique
sessionId - AffRank appends
?affrank_sid=SESSION_IDto your affiliate URL automatically - The visitor converts on the affiliate network
- The network fires your postback URL back to AffRank with the
sessionIdand commission amount - AffRank matches the postback to the original click
- Revenue appears in your dashboard against that keyword and page
Step 1 — Get your postback URL
In your dashboard, go to Revenue Mapping. Your postback URL is displayed there:
https://api.affrank.ai/api/v1/postbacks/YOUR_USER_ID?sessionId={SESSION_ID}&amount={COMMISSION}The {SESSION_ID} and {COMMISSION} placeholders are filled in by your affiliate network automatically — do not change them.
Step 2 — Enter it in your affiliate network
Paste your postback URL into your network’s server-to-server (S2S) postback setting. Every major network has this — it may be called “postback URL”, “callback URL”, “conversion pixel (server-side)”, or “S2S tracking URL”.
Where to find it by network:
| Network | Location |
|---|---|
| ShareASale | Account → Merchant Terms → Postback URL |
| CJ Affiliate | Account → Web Services → Tracking Tag |
| Impact | Settings → Tracking → Postback URLs |
| Rakuten | Dashboard → Links → Postback Settings |
| ClickBank | Account Settings → My Site → Advanced Tools |
Step 3 — Map the session ID
Your network needs to return the affrank_sid value that AffRank appended to the click URL. The exact steps vary by network, but the pattern is:
- When AffRank sends the visitor to your affiliate URL, it appends
?affrank_sid=abc123 - Your network stores this as a sub-ID or custom parameter
- When the visitor converts, the network includes that value in
{SESSION_ID}of your postback URL
Check your network’s documentation for “sub ID”, “tracking parameter”, or “custom parameter passthrough” — that’s the field where affrank_sid gets stored.
Verifying postbacks are arriving
- Make a real test conversion if your network allows it, or check the network’s postback delivery logs
- In your AffRank dashboard, go to Revenue Mapping
- You should see the conversion appear with the commission amount and matching keyword
If postbacks aren’t arriving:
- Paste the postback URL directly into a browser with real
sessionIdandamountvalues — if it returns 200, the URL is correct - Check your network’s postback logs for delivery errors or “failed” status
- Verify you used your actual User ID in the postback URL (not the placeholder
YOUR_USER_ID)
If postbacks arrive but don’t match clicks:
- Confirm the
affrank_sidparameter is being passed through your affiliate link to the network - Check that the network is returning the same value in
{SESSION_ID}— some networks truncate custom parameters
What you’ll see in the dashboard
Once postbacks flow, Revenue Mapping shows:
- Total revenue from postbacks
- EPC (earnings per click) per keyword
- Revenue by page
- Conversion rate per keyword
- Top earning keywords by total revenue