Adset.ProAdset.ProKnowledge base
Home/Training Materials/Connecting a New CPA (Affiliate) from Scratch

Connecting a New CPA (Affiliate) from Scratch

A complete step-by-step guide to connecting a new affiliate network (CPA) to the Adset.Pro tracker — from creating a CPA record to setting up postbacks and pixels.

What is CPA in the context of Adset.Pro

CPA (Cost Per Action) is an affiliate network or advertiser that pays you for user actions (registrations, deposits, repeat deposits).

In Adset.Pro, Affiliate Networks are entities that:

  • Store status mapping — the correspondence between affiliate statuses and internal event types of the tracker

  • Contain postback macros — macro templates that the affiliate uses to send conversions

  • Have a param template — a template of GET parameters added to links to pass subid/click_id

  • Define payout currency and settings for conversion duplicates

Data Flow

┌─────────────┐  POSTBACK  (incoming)   ┌────────────┐  PIXEL (outgoing)  ┌───────────────┐
│  Affiliate   │ ──────────────────────► │  Adset.Pro │ ──────────────────► │ Source       │
│  (CPA Network) │  click_id, status,      │  (Tracker)  │  Facebook CAPI,     │ Traffic Source │
│             │  payout, currency       │            │  TikTok API,        │ (FB, TikTok)  │
│             │                         │            │  HTTP Get           │               │
└─────────────┘                         └────────────┘                     └───────────────┘

It is important to understand the terminology of Adset.Pro:

  • Postback — this is what comes INTO Adset.Pro FROM affiliates (CPA networks). An incoming signal about a conversion.

  • Pixel — this is what is sent FROM Adset.Pro TO traffic sources (Facebook, TikTok, etc.). An outgoing signal.


Preparation

Before connecting a CPA, make sure you have:

  1. An account in the affiliate network — register and gain access to your personal account

  2. Information about macros — clarify with the affiliate manager:

    • What macro is used for Click ID / subid (for example, {click_id}, {sub1}, {external_id})

    • What conversion statuses are used (for example, lead, sale, approved, rejected)

    • What macro for payout amount (for example, {payout}, {revenue}, {payment})

    • What macro for currency (for example, {currency}, or fixed currency usd)

  3. A link to the offer — URL where traffic will be directed, clarify which parameter the clickId from Adset.Pro can be passed to


Step 1: Creating a CPA in the Tracker

  1. Go to the Tracker → Affiliate Networks section

  2. Click the "+ Affiliate Network" button (green button in the upper right corner)

  3. Select a template from the dropdown list:

    • If your affiliate is in the template list — select it, and the fields will be filled automatically

    • If the affiliate is not in the list — see the section below

  4. Fill in the main fields:

Field

Value

Example

Name

Name of the affiliate

MaxBounty

Currency

Default payout currency

USD, EUR, RUB

Status

Is the CPA active

✅


Step 2: Setting Up the Offer URL Template (Param Template)

Offer URL template is a string of GET parameters that is automatically added to the offer URL when creating a Link to Offer. It is needed for the tracker to identify the click when the affiliate sends the postback.

How it Works

  1. You add a Link to Offer (flow)

  2. The tracker takes the paramTemplate from the CPA and adds it to the offer URL

  3. When a user clicks, the parameter (for example, click_id=abc123) is passed to the affiliate

  4. The affiliate uses this parameter as subid and sends it back in the postback to Adset.Pro

Example

For an affiliate with the macro sub1:

?sub1={event.event_click_id}

For an affiliate with the macro click_id and an additional pixel parameter:

?click_id={event.event_click_id}&pixel={event.cmp_pixel}

Tip: If you are using a template from the list — the paramTemplate will be filled automatically. For new affiliates, clarify with the manager which parameter to pass the clickId from the tracker.


Step 2: Setting Up Postback Parameters

The "Postback Status Template" (Statuses Configuration) section defines which string statuses from the affiliate are mapped to internal event types of the tracker.

In Adset.Pro, 5 types of CPA conversion events are used:

Internal Type

Name in UI

Description

When Triggered

CPA_HOLD

Registration (Hold)

Lead registered

User has registered

CPA_ACCEPT

Accepted (Accept / FTD / Deposit)

First deposit accepted

User made the first deposit

CPA_REDEP

Repeat Deposit (Re-Deposit)

Repeat deposit

User already has a deposit and is topping up again

CPA_DECLINE

Declined (Decline)

Conversion declined

The affiliate declined the lead

CPA_TRASH

Trash (Trash)

Trash registration

Low-quality lead / fraud

Mapping Examples for Different Affiliates

Keitaro:

Field

Value

Registration

reg,hold

Deposit

approved

Redep

(empty — Keitaro does not send redeposits)

Decline

declined

Trash

trash

Typical gambling affiliate:

Field

Value

Registration

lead,registration,reg

Deposit

sale,approved,confirmed,ftd

Redep

rebill,redeposit,redep

Decline

declined,rejected,cancelled

Trash

trash,fraud,duplicate

Important: In one field, you can specify multiple statuses separated by commas. The affiliate may use different statuses for the same action — the tracker will find a match.


Step 3: Forming the Postback URL

The "Forming Postback URL" (Postback Macros) section defines which macros the affiliate substitutes in the postback URL. This is the correspondence between the affiliate's macros and the internal fields of the tracker. Based on this data, a ready postback URL will be formed.

Field in Tracker

Description

Examples of Affiliate Macros

Click ID

Identifier of the click (subid)

{click_id}, {sub1}, {external_id}, {aff_sub}, ##CLICK_ID##

Status

Conversion status

{status}, {goal}, {conv_status}, {status_name}, {status: lead=reg sale=dep} or an empty string (then you will be issued multiple links for each status)

Revenue

Payout amount

{payout}, {revenue}, {payment}, {sum}, ##CPA_AMOUNT##

Currency

Payout currency

{currency}, ##CURRENCY##, or a fixed string usd

External ID

External transaction ID, used for deduplication

{tid}, {transaction_id}, {id}, {offer_id}

Where to find: From the affiliate manager or in the postback documentation (usually in the "Postback URL" or "S2S Postback", "Global Postback" section).


Step 4: Copying the Postback URL

After saving the CPA:

  1. Open the created CPA in the list (Tracker → CPA)

  2. Find and copy the Postback URL — it will be generated automatically

The postback URL has the format:

https://adset.pro/postback?clickid={click_id}&status={status}&payout={payout}&currency={currency}

Where:

  • {click_id} — the ClickID macro you specified in the settings, responsible for returning the click_id back to the tracker

  • {status} — status macro

  • {payout} — revenue macro

  • {currency} — currency macro

This URL needs to be provided to the affiliate network manager for setting up the global postback on their side.


Step 5: Setting Up the Postback on the Affiliate Side

In the affiliate network's personal account:

  1. Find the section "Postback", "Global Postback", "S2S Postback", or "Tracking"

  2. Paste the copied postback URL from Adset.Pro

  3. Ensure that:

    • The affiliate's macros correspond to those specified in the CPA settings

    • The necessary events are selected (Registration, FTD, Re-Deposit, etc.)

  4. Save

Example for Keitaro: In the "Postback" section of Keitaro, specify the URL:

https://adset.pro/postback?clickid={external_id}&status={status: lead=reg sale=dep}&payout={revenue}&currency={currency}

Step 6: Creating an Offer and Link to Offer

Creating an Offer

  1. Go to the Tracker → Offers

  2. Click "+ Offer"

  3. Fill in:

    • Name — name of the offer

    • Default Revenue — default payout made by the affiliate program

    • Affiliate Network — select the created Affiliate Network (CPA)

Creating a Link to Offer

  1. Go to the Tracker → Links to Offer

  2. Click "+ Link to Offer"

  3. Fill in:

    • Name — name of the flow

    • Affiliate Network — select the Affiliate Network (URL Template will be automatically added to the URL)

    • Offer — select Offer

    • Type — type of offer

      • External Link - the user will be redirected to an external URL (to the landing of the Affiliate Program or your advertiser)

      • Local Landing - the user will land on the landing page you uploaded

    • URL - the link to which the user will be redirected at the end of the funnel (for External Link type)

    • Landing — select the previously uploaded landing (for Local Landing type)

How paramTemplate works in Link to Offer: When creating a Link to Offer, the tracker takes the paramTemplate from the CPA and adds it to the offer URL. For example:

  • Offer URL: https://partner.com/offer/123

  • ParamTemplate CPA: ?sub1={event.event_click_id}

  • Final URL: https://partner.com/offer/123?sub1={event.event_click_id}

The tracker will automatically substitute the actual click_id instead of {event.event_click_id} with each click.


Step 7: Setting Up Pixels (Outgoing Postbacks)

Pixels are outgoing events from Adset.Pro that are sent to traffic sources (Facebook, TikTok, etc.) for optimizing advertising algorithms or to a Telegram chat for notifications.

Types of Pixels

Type

Purpose

When to Use

Facebook (CAPI)

Server-side sending of events to Facebook Conversions API

Driving traffic from Facebook Ads

TikTok (Events API)

Server-side sending of events to TikTok

Driving traffic from TikTok Ads

HTTP Get

Universal GET request to any system

Need a postback to a non-standard system

Telegram Bot

Notifications about conversions in Telegram

Want to receive real-time notifications

Creating a Pixel

  1. Go to the Tracker → Pixels (or Pixels and Postbacks)

  2. Click "+ Pixel"

  3. Select the type of pixel

  4. Fill in:

    • Name — a clear name (for example, "FB CAPI Main Account")

    • Type - type of pixel

    • Pixel ID — pixel ID from the advertising account (for FB/TikTok)

    • Access Token — access token for the API (for FB/TikTok)

    • Event Mapping — correspondence of internal tracker events to source events:

Tracker Event

Facebook CAPI

TikTok

Description

PWA Install

Lead

Subscribe

PWA installation

Registration

CompleteRegistration

CompleteRegistration

Registration

Deposit

Purchase

CompletePayment

First deposit

Re-Deposit

Purchase

CompletePayment

Repeat deposit

tg_join

—

—

Subscription to Telegram

  1. Link the pixel to the campaign in the campaign's stream set settings

For HTTP Get Pixel

Specify the URL with macros:

https://partner.network/postback?click_id={event.ext_click_id}&status={postback.event}&payout={event.event_revenue}

Available macros for URL:

Macro

Description

Example

{event.ext_click_id}

Click ID from the traffic source

fb.1.123.AbCdEfGh

{event.event_click_id}

Internal Click ID of the tracker

35d542f6-56ec-4858-8031-38bbb820c075

{event.event_type}

Internal event type

cpa_accept

{postback.event}

Status of the event mapping

Lead

{event.event_revenue}

Amount of revenue

150

{postback.event}

Event code from mapping

approved


Step 8: Testing

Checking Postback (Affiliate Network → Adset.Pro)

  1. Remove all filters in the campaign settings

  2. Go to the tracking link of the campaign

  3. Make a test registration on the affiliate's offer

  4. Check the Logs → Conversion Logs — the conversion should appear with the type Registration

  5. If there is no conversion after 1-2 minutes:

    • Check that the postback URL is correctly set up in the affiliate

    • Check that the registration appeared in the affiliate's statistics.

    • Check conversion logs in Adset.Pro

    • Check postback logs in Affiliate Network

    • Ensure that the Click ID macro matches

Checking Pixel (Adset.Pro → Traffic Source)

  1. Upon incoming conversion, check the Logs → Pixel Log

  2. The status should be SUCCESS (green)

  3. If the status is ERROR:

    • Check Access Token and Pixel ID

    • For Facebook: ensure that Conversions API is enabled

    • For TikTok: check Events API token

    • Check request data

    • Check response data


What to Do If the Affiliate is Not in the Templates

If the required Affiliate Network is not in the list of pre-installed templates:

  1. Create the Affiliate Network (CPA) manually — select "No template" or an empty template

  2. Fill in all fields manually based on information from the affiliate manager:

    • Statuses (status mapping)

    • Postback Macros (macros)

    • Param Template (parameter template)

  3. Save as (if you want to reuse) — contact the administrator to add to the CPA template system

Where to Find Information About Macros

  • Affiliate Documentation — section "API", "Postback", "Tracking", "Integration"

  • Affiliate Manager — ask for "postback URL format" and "available macros"

  • Personal Account — the postback settings section usually shows available macros


Troubleshooting

Postback Not Coming

Problem

Solution

Postback URL is incorrect

Copy the URL from the CPA settings in the tracker again

Click ID macro does not match

Check postbackMacros.clickId in the CPA — it should match the parameter in the URL

Status is not recognized

Add all status variants separated by commas in the mapping field

The affiliate does not send postbacks

Check that the global postback is activated in the affiliate's account

Conversion Comes, but Status is Incorrect

  • Check status mapping: open CPA → Statuses

  • Add the problematic status to the appropriate field (for example, if approved comes as accept, add approved to the Accept field)

Duplicate Conversions

  • Enable "Accept Duplicate Conversions" in the settings of the Affiliate Network (CPA) if the affiliate can send repeated postbacks

  • Select the types of events for which duplicates are allowed: Registration (CPA_HOLD), Deposit (CPA_ACCEPT), Re-deposit (CPA_REDEP)

Pixel Not

[!] Перевод выполнен с усечением исходника — проверьте оригинал.