Skip to content

Postbacks & conversions

A postback is how your affiliate network tells Roitrack that a click converted. Your network calls a URL you give it; Roitrack matches the click and records the conversion.

Your postback URL

Find it on the Postback settings screen. It looks like:

https://your-tracking-domain.com/api/conversions/postback/<code>?click_id={clickid}

Paste it into the postback field in your network’s dashboard, replacing {clickid} with whatever macro that network uses for the click ID you passed them.

The security code

The <code> segment is a shared secret. Requests without the current code are rejected with 403, which stops anyone who guesses your domain from injecting fake conversions.

Regenerating the code in the dashboard immediately invalidates every URL you’ve handed out. Only regenerate when you have time to update each network afterwards — otherwise conversions silently stop.

Parameters

click_id is required. Everything else is optional.

ParameterEffect
click_idThe click to attribute this conversion to. Required.
payoutRevenue for this conversion
statusFree-text status from the network
event1event10Set the event counter to this value
add_event1add_event10Add to the counter. A negative value subtracts.

Both GET and POST are accepted, so whichever your network sends is fine.

Set versus add

event3=25.5 overwrites event 3 with 25.5. add_event3=10 adds 10 to whatever is already there, and add_event3=-10 takes 10 away.

Use set when the network reports a running total, and add when it reports each occurrence separately. Mixing them on the same event across different postbacks produces numbers nobody can reconcile later — pick one convention per event and write it down.

Reversals and chargebacks are the natural use for a negative add_.

Network macro examples

Every network names its click-ID macro differently. Substitute yours:

Network stylePostback URL
{clickid}…/postback/<code>?click_id={clickid}&payout={payout}
{subid}…/postback/<code>?click_id={subid}&payout={amount}
#s2s#…/postback/<code>?click_id=#s2s#&payout=#payout#
[click_id]…/postback/<code>?click_id=[click_id]&payout=[payout]

The rule is the same everywhere: whatever you sent the network as your click ID must come back in click_id. See Traffic sources & macros for passing it out in the first place.

Testing

Most networks have a “test postback” or “send test conversion” button. Use it, then check your click log — the conversion should appear against the click within a few seconds.

No test button? Send a click through your own tracking link, take the click ID from your click log, and ask your affiliate manager to fire a test conversion against it.

If the network shows you the response it got back:

ResponseMeaning
200Accepted
403Wrong security code — usually because it was regenerated and this network wasn’t updated
404The URL points at a domain that doesn’t serve tracking
422The click ID never arrived — the network’s macro isn’t being substituted

A 200 means accepted, not instantly visible. Conversions go through a queue and appear a moment later.

How attribution works

Roitrack looks up the original click and copies its attribution — campaign, flow, offer, lander, country, device, browser, OS — onto the conversion. That’s what lets you break conversions down by any dimension, even though the network sent you nothing but a click ID and a payout.

Two consequences worth knowing:

  • The click must exist. A postback for an unknown click_id has nothing to attribute to.
  • Later postbacks win. Send payout twice for the same click and the most recent value is used, which is what makes payout corrections work.

When conversions don’t show up

  1. Check the click log for the click ID the network sent. No click, no attribution.
  2. Check the response code the network received — most dashboards log it. 403 means the security code is stale, typically because it was regenerated.
  3. Confirm you gave them a tracking domain, not the admin one.
  4. Check the mode. In click mode a conversion appears on its click’s date, not today’s. A conversion for last week’s click is filed last week. See Metrics & counting rules.
  5. Confirm the click ID macro is right. If the network substitutes an empty string, you’ll see requests arriving with no click_id at all.