Skip to content

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

  1. A visitor clicks an affiliate link — AffRank records the click with a unique sessionId
  2. AffRank appends ?affrank_sid=SESSION_ID to your affiliate URL automatically
  3. The visitor converts on the affiliate network
  4. The network fires your postback URL back to AffRank with the sessionId and commission amount
  5. AffRank matches the postback to the original click
  6. 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:

NetworkLocation
ShareASaleAccount → Merchant Terms → Postback URL
CJ AffiliateAccount → Web Services → Tracking Tag
ImpactSettings → Tracking → Postback URLs
RakutenDashboard → Links → Postback Settings
ClickBankAccount 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:

  1. When AffRank sends the visitor to your affiliate URL, it appends ?affrank_sid=abc123
  2. Your network stores this as a sub-ID or custom parameter
  3. 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

  1. Make a real test conversion if your network allows it, or check the network’s postback delivery logs
  2. In your AffRank dashboard, go to Revenue Mapping
  3. 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 sessionId and amount values — 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_sid parameter 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