> ## Documentation Index
> Fetch the complete documentation index at: https://clickflare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# RichAds as a Traffic Source

> Track RichAds push and popunder campaigns in ClickFlare: pick the right template, capture the click ID, and post conversions with payout back.

![RichAds traffic source template](https://mintcdn.com/clickflare/oNlhH4HxR5JFsOiP/images/integrations/covers/templates/richads.png?fit=max\&auto=format\&n=oNlhH4HxR5JFsOiP\&q=85\&s=87ed516de3d7d8033ece4bd4e7078016)

RichAds is a self-serve ad network selling push, in-page push, popunder, direct click, native and Telegram traffic, mostly to affiliates. This guide sets up RichAds as a traffic source in ClickFlare. It covers picking the right RichAds template, passing RichAds' click data into your reports, and sending conversions, with payout, back to RichAds so its optimization and your stats agree.

You do everything from the **campaign editor**. The RichAds traffic source is created inline, without leaving the campaign.

## At a glance

| | |
| - | - |
| **Templates** | **RichAds push** for push traffic, **RichAds pops** for popunder traffic |
| **Click ID macro** | `[CLICK_ID]`, mandatory for conversion tracking |
| **Conversion tracking** | S2S postback to `xml.auxml.com` |
| **Payout passed back** | Yes, in the `price` parameter |
| **Multiple events** | Two: Main (`action=conversion`) and Approved (`action=conversion1`) |
| **Cost** | Passed per visit by both templates: `[BID_PRICE]` (push) or `[CPV_PRICE]` (pops) |
| **Conversion API** | No |

## How it works

**1. RichAds sends the click**

A visitor clicks your push ad or opens your popunder. RichAds opens your ClickFlare campaign URL and fills in its macros: the click ID in `click_id`, the winning price, plus the campaign, creative, publisher, site and other details. RichAds macros are uppercase in square brackets, for example `[SITE_ID]`.

**2. ClickFlare stores the RichAds click ID**

ClickFlare saves the value of `click_id` as the visit's **External ID**, records the cost, and redirects the visitor to your lander or offer.

**3. The conversion reaches ClickFlare**

Your affiliate network or store posts the conversion back to ClickFlare, matched on the ClickFlare click ID.

**4. ClickFlare posts it back to RichAds**

ClickFlare fires the RichAds postback, replacing `{external_id}` with the stored RichAds click ID and `{payout}` with the revenue. RichAds matches it to the original click.

> [!NOTE]
>
> The mirror to keep straight: in the **campaign URL** you write *ClickFlare's* parameter (`click_id`) and *RichAds'* macro (`[CLICK_ID]`). The template does this for you. In the **postback URL** you write *RichAds'* parameter (`key`) and *ClickFlare's* token (`{external_id}`).

## Before you start

* **Set up your own tracking domain.** Run the campaign and the postback on your own custom domain. Shared domains get flagged by networks and blocked by browsers. See [Custom Domains](/docs/en/settings/custom-domains.md).
* **Have an offer ready in ClickFlare**, and its affiliate network set up to post conversions back to ClickFlare. See [Creating an Offer](/docs/en/tracking/creating-an-offer-1.md) and [Adding an Affiliate Network](/docs/en/tracking/adding-an-affiliate-network.md).
* **Know which format you will run.** Push and popunder pass different macros, so ClickFlare has one template for each. If you run both, create two traffic sources.
* **Decide which conversions RichAds should receive.** RichAds tracks a Main conversion (lead, order, email submit, install) and an Approved conversion (approved lead, purchase, sale, deposit). Decide now whether to send one or both. See [Tracking several events](#tracking-several-events).

***

## Step 1 – Create the campaign and the RichAds traffic source

1. Go to **Campaigns** and click **New**.
2. In **Traffic Source**, open the dropdown and click **+ New Traffic Source**.
3. Type `richads` in the search box and select the template for your format. See the table below.
4. Enter a **Name** that says which format it is, for example `RichAds Push` or `RichAds Pops`.
5. Leave **Cost currency** on **USD** unless your RichAds account is billed in another currency.

| Template | Use it for | Cost macro |
| - | - | - |
| **RichAds push** | Push campaigns | `[BID_PRICE]`, the winning price of the click |
| **RichAds pops** | Popunder campaigns | `[CPV_PRICE]`, the winning price. Check the unit, see [Cost](#cost). |

For in-page push, start from **RichAds push**. For other RichAds formats, start from the template closest to how you buy (per click or per view) and check the macros in RichAds' **Tracking** tab, which lists the tokens available for each format.

The two templates share the click ID, campaign, creative, publisher, site, user and OS rows. They differ in the cost macro and a few extra rows.

### RichAds push parameters

| Name | TS Parameter | TS Token (RichAds macro) | ClickFlare Token | What it carries |
| - | - | - | - | - |
| cost | `bid_price` | `[BID_PRICE]` | `{cost}` | The winning price of the click. See [Cost](#cost). |
| externalId | `click_id` | `[CLICK_ID]` | `{external_id}` | RichAds' click ID. Required for the postback. |
| Campaign ID | `campaign_id` | `[CAMPAIGN_ID]` | `{trackingField1}` | The RichAds campaign |
| Campaign name | `campaign_name` | `[CAMPAIGN_NAME]` | `{trackingField2}` | The RichAds campaign's name |
| Creative ID | `creative_id` | `[CREATIVE_ID]` | `{trackingField3}` | The creative |
| Publisher ID | `publisher_id` | `[PUBLISHER_ID]` | `{trackingField4}` | The publisher. One publisher can own several sites. |
| Site ID | `site_id` | `[SITE_ID]` | `{trackingField5}` | The website that sent the click |
| Country | `country` | `[COUNTRY]` | `{trackingField6}` | The visitor's country, as a name |
| OS | `os` | `[OS]` | `{trackingField7}` | The OS name and version |
| IP | `ip` | `[IP]` | `{trackingField8}` | The visitor's IP address |
| User ID | `user_id` | `[USER_ID]` | `{trackingField9}` | RichAds' unique ID for the visitor |
| Subscriber list ID | `sub_list_id` | `[SUB_LIST_ID]` | `{trackingField10}` | The subscriber list the push went to. Included but disabled in the template. |

![The RichAds push template's Parameters table in ClickFlare, with RichAds' macros pre-filled](https://mintcdn.com/clickflare/nZP6EuFBEVoKPMxM/images/integrations/templates/richads/parameters.png?fit=max\&auto=format\&n=nZP6EuFBEVoKPMxM\&q=85\&s=eb32bd63af79b98e22b3badbe92fbf29)

### RichAds pops parameters

| Name | TS Parameter | TS Token (RichAds macro) | ClickFlare Token | What it carries |
| - | - | - | - | - |
| cost | `cpv_price` | `[CPV_PRICE]` | `{cost}` | The winning price. Check the unit, see [Cost](#cost). |
| externalId | `click_id` | `[CLICK_ID]` | `{external_id}` | RichAds' click ID. Required for the postback. |
| Campaign ID | `campaign_id` | `[CAMPAIGN_ID]` | `{trackingField1}` | The RichAds campaign |
| Creative ID | `creative_id` | `[CREATIVE_ID]` | `{trackingField2}` | The creative |
| Publisher ID | `publisher_id` | `[PUBLISHER_ID]` | `{trackingField3}` | The publisher. One publisher can own several sites. |
| Site ID | `site_id` | `[SITE_ID]` | `{trackingField4}` | The website that opened the popunder |
| User ID | `user_id` | `[USER_ID]` | `{trackingField5}` | RichAds' unique ID for the visitor |
| Zone ID | `zone_id` | `[ZONE_ID]` | `{trackingField6}` | The zone where the ad was displayed |
| OS | `os` | `[OS]` | `{trackingField7}` | The OS name and version |

Each tracking field becomes a column you can group reports by. For push, `sub_list_id`, `publisher_id` and `site_id` are the ones you will use most. For pops, `zone_id` and `site_id`. They tell you which sources convert, so you can block them or raise bids on them in RichAds.

The push template ships with the **Subscriber list ID** row disabled. Turn it on if you want to see and optimize by subscriber list.

> [!WARNING]
>
> Don't change or remove the `externalId` row. Without `[CLICK_ID]` in the campaign URL, RichAds cannot match conversions, and its conversion-based features stay unavailable.

To pass more RichAds data, click **Add Parameter**, give it a name and parameter, and enter the RichAds macro as the **TS Token**. ClickFlare assigns the next free tracking field. Useful extras from RichAds' macro list: `[COUNTRY_CODE]`, `[REGION]`, `[CITY]`, `[OS_ONLY]`, `[OS_VER]` and `[USERAGENT]`. For pops, `[CAMPAIGN_NAME]` and `[COUNTRY]` are available too.

## Step 2 – Set up the postback

The postback is what sends conversions to RichAds. It lives on the traffic source, so every campaign that uses this RichAds traffic source sends conversions the same way.

RichAds has one postback endpoint for every advertiser. It identifies the conversion by the click ID alone, so there is no account key to copy. Both templates come with it already filled in.

1. In the **New Traffic Source** form, scroll to **Passing conversion info to traffic source**.
2. Turn on **Traffic source postback URL**. The template's postback appears:

```text theme={null}
http://xml.auxml.com/log?action=conversion&key={external_id}&price={payout}
```

![The Traffic source postback URL switched on, showing the RichAds template's postback](https://mintcdn.com/clickflare/nZP6EuFBEVoKPMxM/images/integrations/templates/richads/postback.png?fit=max\&auto=format\&n=nZP6EuFBEVoKPMxM\&q=85\&s=d6cb4ceecd15d91ca3e841bd88e7a73b)

3. Keep it as it is. `key={external_id}` sends RichAds' click ID back, and `price={payout}` sends your revenue. `action=conversion` reports a Main conversion.
4. In the dropdown on the left, choose the ClickFlare event that should fire the postback. Keep **Conversions** to send every conversion. If your final action is a custom conversion (for example `purchase`), choose that instead.
5. Click **Save**. You are back in the campaign editor with the RichAds traffic source selected.

The template uses `http`. The same endpoint answers on `https`, which other trackers use, so you can change the scheme if your setup requires it.

You don't paste this URL anywhere in RichAds. RichAds' **Tracking** tab is where you pick the conversion type and read RichAds' setup guide. ClickFlare is not in its list of integrated trackers, so the template is your setup.

> [!WARNING]
>
> The parameter names are fixed. `key` must carry `{external_id}` and `price` must carry `{payout}`. If `price` is empty or missing, RichAds records the conversion with no revenue, and Target CPA and its ROI-based rules work on wrong numbers.

To learn what each postback token does, see [How to Configure a Traffic Source S2S Postback URL](/docs/en/tracking/how-to-configure-a-traffic-source-s2s-postback-url.md).

## Step 3 – Finish the campaign and copy its URL

1. Name the campaign.
2. Set the **Cost Model**. See [Cost](#cost).
3. Choose **Redirect** or **Direct** tracking. Redirect is the usual choice for push and popunder traffic.
4. Click **Next** and, on **Destination**, add your lander (optional) and your offer.
5. Save, open **Tracking**, select your own tracking domain and copy the **campaign URL**.

The campaign URL already contains every RichAds macro from the template, for example `click_id=[CLICK_ID]` and `site_id=[SITE_ID]`.

If you use a lander, its call-to-action must link to the ClickFlare **click URL**, not to the offer directly. Otherwise the visit reaches the offer without a ClickFlare click ID, and the conversion cannot be traced back to RichAds.

See [Creating a Campaign in ClickFlare](/docs/en/campaigns/creating-a-campaign-in-click-flare.md).

## Step 4 – Create the campaign in RichAds

1. In RichAds, create a campaign in the format that matches your template: push for **RichAds push**, popunder for **RichAds pops**.
2. Choose the targeting, bid and creatives as usual.
3. Paste the ClickFlare campaign URL into the campaign's URL field. One URL works for every creative: the creative ID is passed dynamically.
4. Submit the campaign for moderation.

Paste the URL exactly as ClickFlare gives it. RichAds replaces each `[...]` macro when the ad is clicked. Some browser ad blockers interfere with the RichAds dashboard. If a page misbehaves, whitelist RichAds' domains.

## Step 5 – Test the integration

1. Open your ClickFlare campaign URL through a live RichAds ad, or use the test option in RichAds' **Tracking** tab if your account shows one.
2. Complete the offer the way a real visitor would.
3. In ClickFlare, go to **Logs → Postback Status** and filter by the campaign. A successful request to `xml.auxml.com` confirms ClickFlare sent it, with the RichAds click ID in `key`.
4. In RichAds, check the campaign's statistics for the conversion.

If the request in **Postback Status** shows `key=` empty or `key={external_id}` as text, the visit had no RichAds click ID. Check that the campaign URL in RichAds contains `click_id=[CLICK_ID]`.

***

## Tracking several events

RichAds tracks two conversion types per click. They differ only in the `action` value:

```text theme={null}
http://xml.auxml.com/log?action=conversion&key={external_id}&price={payout}
http://xml.auxml.com/log?action=conversion1&key={external_id}&price={payout}
```

| RichAds type | `action` value | Typical events |
| - | - | - |
| Main | `conversion` | Lead, order, email submit, install |
| Approved | `conversion1` | Approved lead, purchase, sale, deposit |

1. In ClickFlare, create a [custom conversion](/docs/en/settings/custom-conversions.md) for each step, for example `lead` and `sale`.
2. On the RichAds traffic source, click **+ Another postback URL**.
3. Map the first postback (`action=conversion`) to `lead` and the second (`action=conversion1`) to `sale`.
4. Test both. Each type only shows in RichAds once that action has happened.

> **What the postback unlocks in RichAds**
>
> RichAds gates several optimization features behind working conversion tracking:
>
> * **Target CPA**: RichAds buys traffic automatically, with blacklisting and micro bidding, to get as many conversions as possible within your budget and target CPA.
> * **Automated Rules**: white- and blacklists built automatically from your conditions. RichAds checks results every 2 hours.
> * **Micro Bidding**: different bids for different sources or parameters in one campaign.
>
> These features read the conversions and the `price` you send. Map the postback to the event you actually want RichAds to optimize for.

> **Sending only one event**
>
> If RichAds should only learn from your final sale, keep a single postback and map it to that event. Earlier steps (leads, add to carts) still show in ClickFlare. They just don't reach RichAds.
>
> To send a postback only for some conversions, for example only those above a certain payout, use **Event filter** under the postback to add conditions.

## Cost

Both templates pass cost per visit in the `cost` row, so ClickFlare can record spend without a fixed value. On the campaign, set the **Cost Model** to **Not Tracked** so ClickFlare uses the cost passed in the URL. See [Cost Models](/docs/en/core-platform-concepts/cost-models.md).

* **RichAds push** sends `[BID_PRICE]`, the winning price of the click. Push is bought per click, so this is the cost of the visit.
* **RichAds pops** sends `[CPV_PRICE]`. RichAds describes it in one place as the winning price of the click and in another as the winning price per 1,000 impressions.

> [!WARNING]
>
> Check pops costs after the first visits. If `[CPV_PRICE]` arrives as a price per 1,000 impressions, ClickFlare records 1,000 times your real cost per visit. In that case remove the macro from the cost row and use a fixed cost model with your per-visit price, or correct spend with a [manual cost upload](/docs/en/settings/manual-cost-upload.md).

ClickFlare has no cost API integration with RichAds. When the recorded spend differs from your RichAds statistics, correct it with a [manual cost upload](/docs/en/settings/manual-cost-upload.md).

## Delayed revenue

If you run search arbitrage (RSOC or AFD) behind RichAds, the feed reports revenue hours or days after the click. To pass that revenue to RichAds once it arrives, see [Sending Delayed Revenue to Traffic Sources](/docs/en/advanced-tracking-configuration/how-to-send-delayed-revenue-to-traffic-sources.md).

***

## Troubleshooting

> **RichAds doesn't show the conversion**
>
> * The campaign URL in RichAds is missing `click_id=[CLICK_ID]`, or the macro was edited. Copy the URL from ClickFlare again.
> * The postback was edited and `key` no longer carries `{external_id}`.
> * The `externalId` row was removed from the traffic source.
> * A push campaign is running on the pops traffic source, or the other way round. The click ID still passes, but costs and columns are wrong. Use the template that matches the format.

> **Conversions show in ClickFlare but not in RichAds**
>
> * **Traffic source postback URL** is off on the RichAds traffic source.
> * **Disable sending postbacks to traffic source** is on in the campaign.
> * The postback is mapped to a different event than the one the conversion logged. Check **Logs → Event Logs** to see which event was recorded.
> * Check **Logs → Postback Status**: a failed request shows the status code RichAds returned.

> **RichAds shows conversions with no revenue**
>
> The postback has no `price={payout}`, or the offer in ClickFlare has no payout and the affiliate network doesn't send one. Check the payout on a conversion in **Logs → Event Logs**.

> **Pops cost looks 1,000 times too high**
>
> `[CPV_PRICE]` arrived as a price per 1,000 impressions. See [Cost](#cost).

> **Site, zone or subscriber list columns are empty**
>
> The macros were not replaced, usually because the URL was edited, or the template doesn't match the format. `[ZONE_ID]` is a pops macro and `[SUB_LIST_ID]` a push macro. Also check that the Subscriber list ID row is enabled. See [Traffic Source Tokens Arriving Empty](/docs/en/troubleshooting/tokens-arriving-empty.md).

For the general checklist, see [Conversions not showing](/docs/en/troubleshooting/conversions-not-showing.md).

***

**FREQUENTLY ASKED QUESTIONS**

> **Q1:** I run both push and pops on RichAds. Do I need two traffic sources?

**A1:** Yes. Create one from **RichAds push** and one from **RichAds pops**. They share the same postback, but they pass different cost macros and source columns. Mixing them gives you wrong costs and empty columns.

> **Q2:** RichAds lists Voluum, Binom, RedTrack and other trackers, but not ClickFlare. Is that a problem?

**A2:** No. RichAds' postback is the same for every tracker: the click ID in `key` and the payout in `price`. ClickFlare's templates already carry it with ClickFlare's tokens.

> **Q3:** Why is it `click_id` in the campaign URL and `key` in the postback?

**A3:** They are two halves of the same value. ClickFlare reads RichAds' click ID from its own `click_id` parameter. RichAds expects it back in its own `key` parameter. Change neither name.

> **Q4:** Should I use Redirect or Direct tracking with RichAds?

**A4:** Redirect is the usual choice and works with push and popunder. Use Direct only if RichAds must see your lander's domain as the destination. See [Direct Campaign Tracking](/docs/en/campaigns/direct-campaign-tracking.md).

> **Q5:** Do I need the postback to run Target CPA campaigns?

**A5:** Yes. Target CPA, Automated Rules and Micro Bidding all depend on the conversions RichAds receives. Set up and test the postback before you launch.

## Related

> **[Traffic source postbacks](/docs/en/tracking/how-to-configure-a-traffic-source-s2s-postback-url.md)**
>
> Every token you can use in a postback.

> **[Custom conversions](/docs/en/settings/custom-conversions.md)**
>
> Split Main and Approved conversions into separate events.

> **[Cost models](/docs/en/core-platform-concepts/cost-models.md)**
>
> How URL-passed and fixed costs are calculated.

> **[Conversions not showing](/docs/en/troubleshooting/conversions-not-showing.md)**
>
> The general checklist when postbacks don't arrive.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.