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

# Affise and ClickFlare Integration Guide

> Track Affise offers in ClickFlare: pass the click ID in sub1, add the postback with the right status filter, and keep goals apart with a unique txid.

![Affise and ClickFlare Integration](https://mintcdn.com/clickflare/zLfe2OONp5IP-L89/images/integrations/covers/affise.png?fit=max\&auto=format\&n=zLfe2OONp5IP-L89\&q=85\&s=401caa38908a578f4da5cd76a0c52e5c)

Affise is the platform behind many CPA networks, especially in iGaming, nutra and mobile. As an affiliate, you log in to the network's own Affise panel, often on `yournetwork.affise.com` or the network's domain, pick offers, get tracking links and add postbacks. Affise tracking links usually run on a `g2afse.com` domain or the network's own.

To track Affise offers in ClickFlare, two links have to carry the ClickFlare click ID in both directions:

* **The offer URL** sends the ClickFlare click ID to Affise in `sub1`.
* **The postback URL** sends it back to ClickFlare with every conversion, together with the payout and a transaction ID.

This guide covers the full setup, which **Status** to pick so a conversion isn't sent several times, how to keep goals apart, and how to test the postback.

> [!TIP]
>
> Only need the two values? The [Click ID & postback macros](/docs/en/integrations/click-id-and-postback-macros.md?q=affise) page has them ready to copy with your tracking domain.

***

## How the data flows

```text theme={null}
Ad click
  → https://trk.yourdomain.com/cf/r/CAMPAIGN?...
     (ClickFlare records the click and generates the click ID)
  → [optional lander → CTA uses the ClickFlare click URL]
  → https://network.g2afse.com/click?pid=123&offer_id=456&sub1=CF_CLICK_ID
     (Affise stores the ClickFlare click ID in sub1)
  → Visitor converts on the advertiser's page
  → Affise fires your postback:
     https://trk.yourdomain.com/cf/cv?click_id=CF_CLICK_ID&payout=40.00&txid=ORDER-ftd
     (ClickFlare matches the conversion to the original click)
```

The two links mirror each other:

| Link | Built from | Affise side | ClickFlare side |
| - | - | - | - |
| **Offer URL** (in ClickFlare) | Affise's parameter + ClickFlare's token | `sub1` | `{cf_click_id}` |
| **Postback URL** (in Affise) | ClickFlare's parameter + Affise's macro | `{sub1}`, `{sum}`, `{transactionid}-{goal}` | `click_id`, `payout`, `txid` |

> [!NOTE]
>
> **Offer URL = their parameter + your token. Postback URL = your parameter + their macro.** Affise writes the click ID into `sub1` on the way in and reads it back with the `{sub1}` macro on the way out. Affise has **no `{clickid}` macro** for affiliate postbacks: the click ID always comes back through the sub you put it in.

***

## What you'll need

* An active ClickFlare account with your **own tracking domain** set up. Shared domains get flagged by networks and blocked by browsers. See [Tracking domains](/docs/en/settings/tracking-domains.md).
* An affiliate account on the network's Affise panel, approved for the offer you want to run.

***

## What the Affise template contains

ClickFlare has an **Affise** affiliate network template. It fills in the Affise macros ClickFlare needs.

![The Affise template in ClickFlare: Click Id is \{sub1}, Payout is \{sum} and Transaction ID is \{transactionid}-\{goal}](https://mintcdn.com/clickflare/zLfe2OONp5IP-L89/images/integrations/affise/clickflare-affise-template-parameters.png?fit=max\&auto=format\&n=zLfe2OONp5IP-L89\&q=85\&s=91cf00035b160ad177d6b633faa554a0)

| Field | Affise macro (AN Token) | ClickFlare parameter | What it does |
| - | - | - | - |
| **Click Id** | `{sub1}` | `click_id` | Returns the ClickFlare click ID that the offer URL put in `sub1`. Pre-filled by the template. |
| **Payout** | `{sum}` | `payout` | Your payout for the conversion, not the advertiser's revenue. Pre-filled by the template. |
| **Transaction ID** | `{transactionid}-{goal}` (change it) | `txid` | Unique per conversion and goal. The template fills in `{transactionid}`: add `-{goal}`. See [why](#keep-conversions-apart-with-txid). |
| **Event Type** | leave empty, or set per goal | `ct` | The conversion type. See [Offers with several goals](#offers-with-several-goals). |

***

## Setup

Everything in ClickFlare is done from inside the campaign editor. Create the offer and the affiliate network inline as you go.

**1. Set up your own tracking domain**

Add a custom tracking domain before anything else, for example `trk.yourdomain.com`. The postback URL is built on this domain, so changing it later means updating the postback in Affise too. See [Tracking domains](/docs/en/settings/tracking-domains.md).

**2. Report conversions by postback time**

Go to **Settings → General Settings** and set **Conversion registration time reporting** to **Postback Timestamp**.

Affise reports a conversion on the day it happened. With the default **Visit Timestamp**, ClickFlare reports it on the day of the original click, so a conversion that comes in days later lands on a different date in each platform. See [Conversion registration time](/docs/en/settings/conversion-registration-time-reporting.md).

> [!NOTE]
>
> This is an account-wide setting. It changes the date conversions are reported on for every campaign.

**3. Create the campaign**

Go to **Campaigns → New Campaign**, choose **Redirect tracking**, pick your traffic source and select your tracking domain. See [Creating a campaign](/docs/en/campaigns/creating-a-campaign-in-click-flare.md).

**4. Create the Affise affiliate network**

While creating the offer for the campaign, create a new affiliate network in its **Affiliate Network** field. You can also create it first under **Affiliate Networks → + New**. Either way:

1. Search for **Affise** and pick the template.
2. Name it after the network, for example "Affise - NetworkName". Each Affise network has its own panel and its own postbacks, so create one affiliate network per Affise network.
3. Change **Transaction ID** from `{transactionid}` to `{transactionid}-{goal}`.
4. Leave **Event Type** empty.
5. Under **Conversion tracking**, select your own **Tracking Domain** and keep **S2S Postback URL** as the tracking method.
6. Set **Payout currency** to the currency the network pays you in.

ClickFlare builds the postback URL from these fields:

```text theme={null}
https://trk.yourdomain.com/cf/cv?click_id={sub1}&payout={sum}&txid={transactionid}-{goal}
```

![The Conversion tracking section of the Affise network in ClickFlare, with the generated postback URL: click\_id=\{sub1}, payout=\{sum} and txid=\{transactionid}-\{goal}](https://mintcdn.com/clickflare/zLfe2OONp5IP-L89/images/integrations/affise/clickflare-affise-postback-url.png?fit=max\&auto=format\&n=zLfe2OONp5IP-L89\&q=85\&s=0d28ccbe95c3d9ede0afb27be6c0fb57)

Copy the postback URL and save the network.

**5. Get the offer's tracking link from Affise**

In the Affise panel, go to **Offers**, open the offer and find **Tracking link**. Below it are fields for Affise's link parameters. Type `{cf_click_id}` in **sub1**: the link updates as you type. Then copy it:

```text theme={null}
https://network.g2afse.com/click?pid=123&offer_id=456&sub1={cf_click_id}
```

`pid` is your affiliate ID and `offer_id` is the offer. You can also copy the link without `sub1` and add it in ClickFlare in the next step.

> [!NOTE]
>
> Use `sub1` to `sub8` for the click ID. Values in `ext1` to `ext3`, `ref_id` and `os_id` don't show in Affise's statistics, and Affise has no `clickid` link parameter for affiliates.

**6. Create the offer in ClickFlare**

In the offer form:

1. Name the offer.
2. Select the Affise affiliate network you just created.
3. Paste the Affise link into **Offer URL**, with `&sub1={cf_click_id}` at the end if it isn't there yet:

```text theme={null}
https://network.g2afse.com/click?pid=123&offer_id=456&sub1={cf_click_id}
```

![The ClickFlare New Offer form with the Affise affiliate network selected and sub1=\{cf\_click\_id} at the end of the Offer URL](https://mintcdn.com/clickflare/zLfe2OONp5IP-L89/images/integrations/affise/clickflare-affise-offer-url.png?fit=max\&auto=format\&n=zLfe2OONp5IP-L89\&q=85\&s=dfe23e5f26397fa928a9fb030a153c74)

If you pasted the link without `sub1`, you can turn on **Append Click ID to Offer Url** instead. ClickFlare then adds `sub1={cf_click_id}` from the template. Use one or the other, not both.

> [!WARNING]
>
> Write `{cf_click_id}` with braces. Without them Affise stores the literal text `cf_click_id`, the postback returns that text, and the conversion cannot be matched to a click.

Set the payout to **Auto** so ClickFlare uses the `payout` value from the postback.

**7. Add the postback in Affise**

Back in the Affise panel, open the same offer, find **Your Postbacks** and click **Add postback**. Then set:

| Field | Value |
| - | - |
| **URL** | The ClickFlare postback URL you copied |
| **Status** | **Approved**, or **By creating**. Not **Any**. See [Which status to pick](#which-status-to-pick). |
| **Goal** | **Any**, or one goal if you add one postback per goal |
| **Integration method** | **Default** |

Save it.

> [!TIP]
>
> To cover every offer on the network at once, add the same URL as a **global postback** under **Profile → Settings → Postback information → Global postbacks** (some panels: **Settings → Global Postbacks**). A global postback has no goal filter. Don't add the same URL both globally and on the offer, or a conversion can be sent twice.

**8. Add a lander (optional)**

If you send traffic through a lander before the offer, the lander's CTA must use the **ClickFlare click URL**, not the Affise link. ClickFlare then adds the click ID when it redirects to the offer. See [Paths with landers and offers](/docs/en/campaigns/campaign-s-path-destination-to-landers-offers.md).

**9. Save the campaign and launch**

Save the campaign, copy the campaign URL from the **Tracking** tab and use it in your ads. Before you spend money on traffic, run the checks in [Verify the setup](#verify-the-setup).

***

## Which status to pick

Affise conversions have a status: **Approved**, **Pending**, **Declined** or **Hold**. Each postback has a **Status** setting that decides when it fires:

| Status | When the postback fires | Use it? |
| - | - | - |
| **Approved** | When a conversion is approved | **Yes**, if you want ClickFlare to count only what the network pays |
| **By creating** | Once, when the conversion is created, whatever its first status | **Yes**, if you want conversions fast and accept that some are later declined |
| **Any** | When the conversion is created, and again on **every status change** | No |
| **Pending**, **Declined**, **Hold** | Only conversions with that status | Only for a dedicated postback with its own `ct` |

With **Any**, one conversion can reach ClickFlare as pending, then approved, then declined, each time with the same click ID and transaction ID. ClickFlare doesn't read Affise's status, so it treats them as one conversion and keeps the last one received: a conversion the network declined can stay in your numbers.

> [!NOTE]
>
> The network decides which statuses affiliates can see. A status the network hides never fires a postback, whatever you select. If nothing arrives on **Approved**, ask your affiliate manager whether approved conversions are visible to affiliates.

***

## Keep conversions apart with txid

By default ClickFlare keeps **one conversion per click ID**. If several postbacks arrive with the same click ID and no transaction ID, ClickFlare treats them as the same conversion, and you only see one of them (the last one received). The `txid` parameter tells ClickFlare that each postback is a separate conversion, so its value has to be **different on every conversion**.

| Affise macro | Value | Use it as txid? |
| - | - | - |
| `{transactionid}-{goal}` | The advertiser's conversion ID plus the goal | **Yes** |
| `{transactionid}` | The advertiser's conversion ID. Empty if the advertiser doesn't send one. | Only on single-goal offers |
| `{goal}` | The goal, for example `1` or `ftd` | Only if each goal can happen once per click |
| `{rand}` | A random ID, new on every send | No: a resent postback counts twice |

`{transactionid}` is the ID the **advertiser** sends Affise for the conversion, such as an order or deposit ID. Many advertisers send one, but not all, and Affise has no macro for its own conversion ID. Adding `-{goal}` covers both cases: with an advertiser ID, each conversion is unique; without one, each goal still is. Affise replaces each macro wherever it appears in the URL, so it arrives as, for example, `A1B2C3-ftd`, or `-ftd` when the advertiser sends no ID.

***

## Offers with several goals

An Affise offer can pay on several **goals**, for example a registration and a first deposit.

* **One postback with Goal = Any** counts every goal: with `txid={transactionid}-{goal}`, each goal arrives as its own conversion, and the payout differs per goal.
* **One postback per goal** lets you report each goal as its own column in ClickFlare. Add a postback per goal with **Goal** set to that goal, each with `&ct=` and a [custom conversion](/docs/en/settings/custom-conversions.md) parameter at the end:

```text theme={null}
https://trk.yourdomain.com/cf/cv?click_id={sub1}&payout={sum}&txid={transactionid}-{goal}&ct=deposit
```

> [!WARNING]
>
> The `ct` value must **exactly match** a parameter of a custom conversion in ClickFlare. If it doesn't, ClickFlare records a regular conversion instead.

***

## Verify the setup

**1. Click through the campaign**

Open the ClickFlare campaign URL (with a lander, also click the CTA). When the offer loads, the first request goes to the Affise click link. Check that it has `sub1=` followed by a real ClickFlare click ID, not the literal text `{cf_click_id}`.

**2. Ask for a test conversion**

Affise has no test button for affiliates. Click your campaign once, then send your affiliate manager the postback URL and ask them to fire a test conversion on your click. The network's postback log shows whether ClickFlare answered with HTTP 200.

**3. Check the conversion in ClickFlare**

The conversion should appear on the campaign with the payout from Affise. In **Logs → Event Logs**, check that its `txid` has the goal at the end, for example `A1B2C3-1`. If you see `{goal}` literally, the panel didn't replace the macro: check the spelling.

***

## Troubleshooting

> **Conversions show in Affise but not in ClickFlare**
>
> Work through these in order:
>
> * **The status filter doesn't match.** A postback on **Approved** doesn't fire for pending conversions. Check the postback's **Status**, and whether the network shows that status to affiliates.
> * **The goal filter doesn't match.** A postback on one goal doesn't fire for the others. Use **Any**, or add a postback per goal.
> * **sub1 is empty in Affise.** The offer URL is missing `sub1={cf_click_id}`, or the lander CTA links straight to Affise instead of using the ClickFlare click URL.
> * **The sub numbers don't match.** The offer URL uses `sub2` but the postback reads `{sub1}`, or the other way around.
> * **The postback uses `{clickid}`.** Affise has no such macro for affiliates. Use the sub that holds the click ID.
> * **HTTP 0 in the network's postback log.** The request never reached ClickFlare: check the tracking domain and its SSL certificate.
>
> See [Troubleshooting S2S postbacks](/docs/en/tracking/troubleshooting-s2s-postback-url-in-clickflare.md) for the general checks.

> **Only one of several conversions shows in ClickFlare**
>
> The postback uses `txid={transactionid}` and the advertiser doesn't send a conversion ID, so every goal arrived with the same empty `txid`. Change the transaction ID to `{transactionid}-{goal}` in the ClickFlare affiliate network and in the Affise postback. Conversions that were already merged are not restored.

> **Declined conversions still count in ClickFlare**
>
> The postback's status is **Any** or **By creating**, so the conversion reached ClickFlare before the network declined it. Switch to **Approved** if you only want paid conversions, and adjust the ones already recorded.

> **The payout is 0 or in the wrong currency**
>
> * Check that the postback has `payout={sum}` and the offer's payout is set to **Auto** in ClickFlare.
> * `{sum}` is your payout in the offer's payout currency. Set the affiliate network's **Payout currency** in ClickFlare to the same currency. `{order_sum}` is the order value, not your payout.

***

## FAQ

> **Why sub1?**
>
> `sub1` is the ClickFlare template's default and what Affise's own tracker guides use. Any of `sub1` to `sub8` works as long as the offer URL and the postback use the same one.

> **Is the macro \{offer\_id} or \{offerid}?**
>
> `{offerid}`, without the underscore. `offer_id` is only the name of the link parameter.

> **Can I pass more data to Affise?**
>
> Yes. Use the other subs in the offer URL, for example `sub2={campaign_id}&sub3={trackingField1}`. Affise shows them in its statistics. Keep `sub1` for the click ID.

> **Can I send the conversion back to my traffic source?**
>
> Yes. Once ClickFlare records the Affise conversion, it can send it to the traffic source through the traffic source's postback or conversion API integration. Nothing changes on the Affise side.

***

## Related

> **[Macro reference](/docs/en/integrations/click-id-and-postback-macros.md)**
>
> Every network's values

> **[Custom conversions](/docs/en/settings/custom-conversions.md)**
>
> Report each goal

> **[Postback issues](/docs/en/tracking/troubleshooting-s2s-postback-url-in-clickflare.md)**
>
> Troubleshoot S2S


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