Keitaro is a tracker that you install on your own server. Your ads send visitors to a Keitaro campaign, Keitaro redirects them to your AFF1 flow link, and AFF1 reports every lead status back to Keitaro by postback. This guide is for the current Keitaro version (v11).
Keitaro and AFF1 both use the word “flow”. In Keitaro, flows are traffic rules inside a campaign (older Keitaro versions called them “streams”). In this article, “AFF1 flow” means the flow in your AFF1 account, and “Keitaro flow” means the flow inside a Keitaro campaign.
Before you start
- You have access to an AFF1 offer and a flow for it. See Connect to an offer and get your traffic link.
- Keitaro is installed, and at least one domain is added to it with the OK status. See Domain setup in the Keitaro documentation.
How the data moves:
- Keitaro creates a click ID for every visitor. Its macro is
{subid}. - Keitaro sends the visitor to the AFF1 flow link and adds
clickid={subid}to it. AFF1 saves this value as the external click ID. - When the lead is created, approved or cancelled, AFF1 sends a postback with the
{clickid}token. Keitaro finds the click by this value and records the conversion.
Add AFF1 as an affiliate network
- In Keitaro, open Affiliate Networks and click Create.
- Open the From template list and look for AFF1 (Aff1.com). If it is in the list, select it: the fields are filled in automatically.
- If there is no AFF1 template, enter
AFF1in Name andclickid={subid}in Offer parameters. Leave Postback URL as it is: in Keitaro this field is only a note for you and does not change how the tracker works. - Check Offer parameters in any case. It must be
clickid={subid}: AFF1 accepts the external click ID only in theclickidparameter. - Click Create.
Keitaro adds Offer parameters to the URL of every offer that uses this affiliate network. You do not need to add clickid to the AFF1 link yourself.
Get the AFF1 flow link
- In AFF1, open Tools → Flows. In the row of your flow, open the ••• menu and select Get link.
- In Choose domain for traffic, select a domain.
- Leave Use clickid for external tracker integration off. Keitaro adds
clickid={subid}from the affiliate network settings. - Optional: turn on Use data parameters and enter Keitaro macros, for example
{campaign_id}indata1. You will see these values in AFF1 statistics. - Copy the Traffic link. It looks like
http://<domain>/?flow_hash=<hash>.
If you did not put clickid={subid} into Offer parameters, do it the other way: turn on Use clickid for external tracker integration and enter {subid} in the clickid field. Use only one of the two ways.

Create the offer in Keitaro
- Open Offers and click Create.
- On the Main tab, enter the Offer name (for example, the offer name and GEO) and select AFF1 in Affiliate network.
- Select Redirect and paste the AFF1 traffic link into URL.
- On the Settings tab, select CPA (per action) in Payout type. In Payout, keep From param ‘payout’ turned on: Keitaro takes the amount from the AFF1 postback.
- Click Create.
The Countries field of the offer is only a note in Keitaro. To filter traffic by country, use filters in the Keitaro flow.
Create a campaign and a flow
- Open Campaigns and click Create.
- On the General tab, select your Domain. Keitaro fills in the Alias (you can change it). In Source, select your traffic source template if you use one.
- Click Create Flow. On the Main tab of the Edit Flow window, enter the Flow name.
- On the Schema tab, select Landing pages & offers, click Add offers and select the offer you created.
- Optional: on the Filters tab, add the Country filter with the offer GEO.
- Click Apply.
- Save the campaign with the green button in the top right corner.
- Open the Tracking tab and copy the Campaign URL. This is the link for your traffic source.
Put the Keitaro Campaign URL into your ads, not the AFF1 link. If visitors go to AFF1 directly, Keitaro has no click and no subid, and it cannot record the conversion.
Get the Keitaro postback URL
- In Keitaro, open Settings → Postback URL.
- Copy the URL. It looks like
http://<server-ip>/<postback-key>/postback?subid=REPLACE&status=REPLACE&payout=REPLACE. - Keep the part before
?. You can replace the server IP with any domain added to Keitaro with the OK status, for examplehttps://tracker.example.com/<postback-key>/postback.
Create the postback in AFF1
Keitaro v11 ignores a postback without the status parameter. AFF1 sends the event in the {type} token with the values lead_add, lead_approve and lead_cancel. Keitaro does not know these values, so the URL also contains three “training” parameters: lead_status, sale_status and rejected_status. They tell Keitaro which AFF1 value means which conversion type.
Use this URL with your domain and postback key:
https://tracker.example.com/<postback-key>/postback?subid={clickid}&status={type}&payout={payout}¤cy={currency}&lead_status=lead_add&sale_status=lead_approve&rejected_status=lead_cancel
| AFF1 event | {type} value | Keitaro conversion type |
|---|---|---|
| Creating lead | lead_add | Lead (revenue in hold) |
| Confirming lead | lead_approve | Sale (confirmed revenue) |
| Cancelling lead | lead_cancel | Rejected |
subid={clickid}returns the Keitaro click ID that AFF1 received inclickid.payout={payout}is the amount in the offer currency;currency={currency}isUSDorEUR. Keitaro converts the amount to the tracker currency.
- In AFF1, open Tools → Flows and open your flow.
- In the Postback section, click Create postback.
- Type: s2s.
- Select Creating lead, Confirming lead and Cancelling lead.
- Paste the URL into URL.
- Request method: GET.
- Click Add. The postback is saved at once.

If all your AFF1 flows go through the same Keitaro, you can add this URL once in Account Settings → Global postback. See Postback.
Check that it works
- Open the Keitaro Campaign URL in your browser. The AFF1 landing must open, and the click must appear in the campaign statistics.
- When the first lead comes, open Maintenance → Logs → Postbacks in Keitaro. You must see a
Received postbackline with a realsubidvalue andstatus=lead_add. - Open Reports → Conversions. The conversion has the type Lead, and the Status column shows the original AFF1 value (
lead_add). - In AFF1, open Tools → Postback logs to see which postbacks AFF1 sent and to which URL. If Keitaro was unavailable, use Resend postbacks for the needed dates.
A test postback without a real Keitaro click does not work: Keitaro needs a real subid. If you want to test with a lead before you buy traffic, ask your personal manager how to do it on your offer.
Common problems
Keitaro log shows Postback status is not set. The URL has no status={type}. Add it.
Keitaro log shows Conversion type not found. The training parameters are missing or have a typo. Check that the URL ends with &lead_status=lead_add&sale_status=lead_approve&rejected_status=lead_cancel.
Keitaro log shows Click for subid ... not found. The click ID did not come back. Check:
- The macro in Offer parameters (or in the AFF1 clickid field) is exactly
{subid}: lowercase, in curly braces. With a typo, AFF1 saves the text instead of the click ID. - In the AFF1 postback URL you use the AFF1 token:
subid={clickid}, notsubid={subid}. - Your ads point to the Keitaro Campaign URL, not to the AFF1 link.
clickid appears twice in the offer URL. You added it both in Offer parameters and in the AFF1 link. Keep it in one place only.
Keitaro log shows Incorrect postback code. The postback key in the URL is wrong. Copy it again from Settings → Postback URL.
Nothing in the Keitaro postback log. Open Tools → Postback logs in AFF1 and check that the postback was sent and the URL is correct. AFF1 accepts only URLs that point to a public address.
Trash leads show as Rejected. This is expected. AFF1 sends trash as a cancellation: {type} = lead_cancel and {substatus} = trashed.