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

# Awin and ClickFlare Integration Guide

> Track Awin offers in ClickFlare: pass the click ID in clickref2 and send each transaction back with Awin's Transaction Notifications.

![Awin and ClickFlare Integration](https://mintcdn.com/clickflare/b2lpDlx8sR69TsUK/images/integrations/covers/awin.png?fit=max\&auto=format\&n=b2lpDlx8sR69TsUK\&q=85\&s=da308fe11c52a2b61c67dcc06c26f406)

Awin is a global affiliate network. Advertisers run their own programs on Awin, and as a publisher you apply to each program separately. Once you're approved, you build tracking links for that advertiser in Awin's Link Builder. Awin has also absorbed ShareASale: former ShareASale programs now run on Awin, so this guide covers them too.

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

* **The offer URL** sends the ClickFlare click ID to Awin in `clickref2`.
* **The postback URL** sends it back to ClickFlare with every transaction, together with your commission and Awin's transaction ID. Awin calls this a **Transaction Notification**.

This guide covers the setup, why the click ID goes in `clickref2`, how to handle program currencies, and what happens when an advertiser validates or declines a transaction.

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

***

## At a glance

To set up Awin with ClickFlare:

1. Set the domain and reporting time.
2. Create the Awin affiliate network.
3. Build the tracking link in Awin.
4. Create the offer in ClickFlare.
5. Turn on Transaction Notifications.

Each step is explained in [Setup](#setup).

| | Awin + ClickFlare |
| - | - |
| **How it connects** | S2S postback via Awin Transaction Notifications (GET) |
| **What reaches ClickFlare** | Commission and transaction ID per click |
| **Timing** | Near real time, per recorded transaction |
| **Key parameters** | `clickref2`, `!!!clickRef2!!!`, `!!!commission!!!`, `!!!transactionId!!!` |
| **Works with** | Every Awin program you're approved for, incl. former ShareASale |
| **Good to know** | No Transaction Notifications in Toolbox? Ask Awin support for access. |

***

## 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://www.awin1.com/...&clickref2=CF_CLICK_ID&...
     (Awin stores the ClickFlare click ID as ClickRef2)
  → Visitor buys on the advertiser's site
  → Awin sends your Transaction Notification:
     https://trk.yourdomain.com/cf/cv?click_id=CF_CLICK_ID&payout=4.20&txid=AWIN_TRANSACTION_ID
     (ClickFlare matches the conversion to the original click)
```

The two links mirror each other:

| Link | Built from | Awin side | ClickFlare side |
| - | - | - | - |
| **Offer URL** (in ClickFlare) | Awin's parameter + ClickFlare's token | `clickref2` | `{cf_click_id}` |
| **Postback URL** (in Awin) | ClickFlare's parameter + Awin's macro | `!!!clickRef2!!!`, `!!!commission!!!`, `!!!transactionId!!!` | `click_id`, `payout`, `txid` |

> [!NOTE]
>
> **Offer URL = their parameter + your token. Postback URL = your parameter + their macro.** Awin writes the click ID into ClickRef2 on the way in and reads it back with `!!!clickRef2!!!` on the way out. The link parameter is lowercase (`clickref2`); the macro is camel case (`!!!clickRef2!!!`). Awin macros are wrapped in three exclamation marks.

***

## 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 Awin publisher account, approved in the advertiser programs you want to promote.
* Access to **Transaction Notifications** in Awin. If you don't see it under **Toolbox**, raise a support ticket with Awin to request access.

***

## What the AWIN template contains

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

![The AWIN template in ClickFlare: Click Id is !!!clickRef2!!!, Payout is !!!commission!!! and Transaction ID is !!!transactionId!!!](https://mintcdn.com/clickflare/b2lpDlx8sR69TsUK/images/integrations/awin/clickflare-awin-template-parameters.png?fit=max\&auto=format\&n=b2lpDlx8sR69TsUK\&q=85\&s=7bc5cd1d2f3b8a5d41c806f3d0666315)

| Field | Awin macro | ClickFlare parameter | What it does |
| - | - | - | - |
| **Click Id** | `!!!clickRef2!!!` | `click_id` | Returns the ClickFlare click ID that the offer URL put in `clickref2`. Pre-filled by the template. |
| **Payout** | `!!!commission!!!` | `payout` | The commission Awin awarded you for the transaction. Pre-filled by the template. |
| **Transaction ID** | `!!!transactionId!!!` | `txid` | Awin's unique ID for each transaction. Pre-filled by the template. |
| **Event Type** | leave empty | `ct` | The conversion type. Awin has no event name macro, so leave it empty. |

> [!WARNING]
>
> Don't swap `!!!commission!!!` for `!!!transactionAmount!!!`. `!!!transactionAmount!!!` is the total sale amount the customer paid, not what you earned, so it would inflate revenue and ROI in ClickFlare.

***

## 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 callback in Awin 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**.

Awin reports a transaction on the day it happened. With the default **Visit Timestamp**, ClickFlare reports it on the day of the original click, so a sale that comes in days after the click 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 Awin 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 **AWIN** and pick the **AWIN** template.
2. Name it, for example "Awin". Transaction Notifications are set once for your Awin account, so one affiliate network covers every Awin program.
3. Check that **Click Id** is `!!!clickRef2!!!`, **Payout** is `!!!commission!!!` and **Transaction ID** is `!!!transactionId!!!`.
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 your Awin programs pay in. If they pay in several currencies, see [Programs in other currencies](#programs-in-other-currencies).

ClickFlare builds the postback URL from these fields:

```text theme={null}
https://trk.yourdomain.com/cf/cv?click_id=!!!clickRef2!!!&payout=!!!commission!!!&txid=!!!transactionId!!!
```

![The Conversion tracking section of the AWIN network in ClickFlare, with the generated postback URL: click\_id=!!!clickRef2!!!\&payout=!!!commission!!!\&txid=!!!transactionId!!!](https://mintcdn.com/clickflare/b2lpDlx8sR69TsUK/images/integrations/awin/clickflare-awin-postback-url.png?fit=max\&auto=format\&n=b2lpDlx8sR69TsUK\&q=85\&s=cae39d933b4d1bc0b828a2cdeb842bac)

Copy the postback URL and save the network.

**5. Build the tracking link in Awin**

In Awin, open the **Link Builder**, pick the advertiser and enter the page you want to send visitors to. If the Link Builder shows ClickRef fields, type `{cf_click_id}` in **ClickRef2**. Braces are on Awin's list of approved ClickRef characters. Check the generated link: it must contain `{cf_click_id}` with the braces as typed. If the braces were encoded as `%7B` and `%7D`, fix them by hand in the offer URL.

If you build the link yourself, put the ClickRefs **before** the destination URL, as Awin asks. The destination is the part that holds the advertiser's page.

> [!NOTE]
>
> Use `clickref2`, not `clickref`. Only the first ClickRef (ClickRef1) is visible to advertisers. ClickRef2 keeps the ClickFlare click ID in your own reports only, and leaves ClickRef1 free for a label you don't mind advertisers seeing.

**6. Create the offer in ClickFlare**

In the offer form:

1. Name the offer, for example after the advertiser.
2. Select the Awin affiliate network you just created.
3. Paste the Awin link into **Offer URL**. It must contain `clickref2={cf_click_id}`, either from the Link Builder or added by hand before the destination URL.

   ![The Offer URL field of the ClickFlare New Offer form with a Awin link ending in clickref2=\{cf\_click\_id}](https://mintcdn.com/clickflare/b2lpDlx8sR69TsUK/images/integrations/awin/clickflare-awin-offer-url.png?fit=max\&auto=format\&n=b2lpDlx8sR69TsUK\&q=85\&s=7b55187236df1ff894f5d57184667e5a)

**Append Click ID to Offer Url** adds `clickref2={cf_click_id}` to the **end** of the link. That puts it after the destination URL, not before it as Awin recommends, so prefer the Link Builder or adding it by hand, and leave the toggle off. Use one or the other, not both.

> [!WARNING]
>
> Write `{cf_click_id}` with braces. Without them Awin stores the literal text `cf_click_id`, the notification 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 notification.

**7. Turn on Transaction Notifications in Awin**

Log in to Awin and go to **Toolbox → Transaction Notifications**. Fill in the settings:

| Setting | What to do |
| - | - |
| **Call-back URL** | Paste the ClickFlare postback URL you copied |
| **Call-back method** | Choose **GET**. With GET, Awin replaces the macros in your URL. With POST, it sends a JSON payload instead, which doesn't fill in ClickFlare's parameters. |
| **Product Data** | Leave unticked. ClickFlare doesn't use it. |
| **Click Source Data** | Leave unticked. ClickFlare already has the click. |

Click **Submit**. Awin confirms that your changes are saved.

If **Transaction Notifications** isn't in your **Toolbox** menu, raise a support ticket with Awin to request access.

**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 Awin link. ClickFlare then fills in 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).

***

## ClickRef rules

Awin applies a few rules to ClickRef values. The ClickFlare click ID meets them, but keep them in mind if you add your own labels in the other ClickRefs:

* Awin links take up to six ClickRefs: `clickref` and `clickref2` to `clickref6`. Keep the click ID in `clickref2` and use the others for labels such as a placement or creative.
* Keep each value under 50 characters, or the Click Reference report won't show it in full.
* Don't use `#`, `+`, `"`, `;`, `&`, `|` or `'` in a ClickRef value.
* Awin's Click Reference report shows ClickRef1 only. Data from the other ClickRefs is available in exports and through Awin's Publisher API.

***

## Programs in other currencies

`!!!commission!!!` is a plain number in the **advertiser program's currency**. Awin programs run in many currencies, so a single **Payout currency** on the affiliate network can be wrong for some of them.

Awin's `!!!transactionCurrency!!!` macro returns the program currency as a three-letter code, such as `GBP` or `EUR`. Add it to the postback with ClickFlare's `payout_currency` parameter, which overrides the network's currency per conversion:

```text theme={null}
https://trk.yourdomain.com/cf/cv?click_id=!!!clickRef2!!!&payout=!!!commission!!!&txid=!!!transactionId!!!&payout_currency=!!!transactionCurrency!!!
```

Turn on **Include additional parameters in the postback URL** if you want to add more Awin values. For example, `param1=!!!merchantId!!!` records the advertiser program ID with each conversion. ClickFlare accepts `param1` to `param20`.

***

## Pending, approved and declined transactions

Awin sends a Transaction Notification when it **records** a transaction. At that point the commission is **pending**. The advertiser then validates it during the program's validation period:

* **Approve:** the commission becomes payable.
* **Amend:** the advertiser corrects the order value or commission group, which changes the commission.
* **Decline:** the commission is cancelled, for example because the order was returned or broke the program terms.

Commissions the advertiser doesn't review in time are approved automatically. Awin's documentation doesn't say whether a second notification is sent when a transaction is approved, amended or declined. ClickFlare doesn't read a status macro either, so it records the commission Awin reported when the sale was tracked.

Compare ClickFlare against Awin's transaction report before you judge a program, especially for advertisers with many returns. If Awin does resend a transaction, it carries the same `!!!transactionId!!!`, and ClickFlare replaces the earlier conversion with the one received last instead of counting it twice.

***

## 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 Awin. In the address bar or your browser's network tab, check that it has `clickref2=` followed by a real ClickFlare click ID, not the literal text `{cf_click_id}`.

**2. Test the postback by hand**

Copy a real click ID from ClickFlare. Open the postback URL in your browser with that click ID and a test payout in place of the macros, for example `https://trk.yourdomain.com/cf/cv?click_id=REAL_CLICK_ID&payout=1&txid=test1`. The conversion should show on the campaign. This tests ClickFlare's side only.

**3. Wait for a real transaction**

Awin has no test button for Transaction Notifications. When the first real transaction is tracked, check **Logs → Event Logs** in ClickFlare: it should arrive with the payout from Awin and a `txid`. Check the transaction in Awin's reports too, with ClickRef2 holding the same click ID.

***

## Troubleshooting

> [accordion] Transactions show in Awin but not in ClickFlare
>
> Work through these in order:
>
> * **Notifications are off.** Check **Toolbox → Transaction Notifications**. The ClickFlare URL must be saved there.
> * **The call-back method is POST.** Switch it to **GET**. With POST, the macros in the URL aren't replaced.
> * **ClickRef2 is empty in Awin.** The offer URL is missing `clickref2={cf_click_id}`, or the lander CTA links straight to Awin instead of using the ClickFlare click URL.
> * **The click ID went into another ClickRef.** If the link uses `clickref` but the postback reads `!!!clickRef2!!!`, ClickFlare gets an empty value. Both sides must use the same ClickRef.
> * **The postback uses an unusual port.** Awin sends notifications on ports 80 and 443 only. Use a normal `https://` tracking domain.
>
> See [Troubleshooting S2S postbacks](/docs/en/tracking/troubleshooting-s2s-postback-url-in-clickflare.md) for the general checks.

> [accordion] ClickFlare receives a literal macro or cf\_click\_id
>
> * A literal `!!!clickRef2!!!` means Awin didn't replace the macro. Check the spelling, and copy macros exactly as Awin writes them, including the capital R in `clickRef2`.
> * A literal `cf_click_id` means the offer URL in ClickFlare has the token without braces. It must be `{cf_click_id}`.

> [accordion] The payout is too high
>
> The postback uses `!!!transactionAmount!!!` (the sale amount) instead of `!!!commission!!!`. Change **Payout** in the affiliate network, then update the Call-back URL in Awin.

> [accordion] The payout is in the wrong currency
>
> `!!!commission!!!` is in the program's currency. Add `payout_currency=!!!transactionCurrency!!!` to the postback, as shown in [Programs in other currencies](#programs-in-other-currencies).

***

## FAQ

> [accordion] Does ClickFlare integrate with Awin?
>
> Yes. ClickFlare has an AWIN affiliate network template. Awin's Transaction Notifications call ClickFlare's S2S postback with the click ID, commission and transaction ID for each transaction.

> [accordion] Do I need a separate postback for each Awin advertiser?
>
> No. Transaction Notifications are set once for your Awin account and fire for every program you promote. Create one Awin affiliate network in ClickFlare and use it for all your Awin offers.

> [accordion] Can I use clickref instead of clickref2?
>
> Yes, any of `clickref` to `clickref6` works if the offer URL and the postback use the same one. `clickref2` is the better choice because advertisers can see ClickRef1 but not the others. If you change it, change **Click Id** in the affiliate network to the matching macro, for example `!!!clickRef3!!!`.

> [accordion] How fast do Awin transactions reach ClickFlare?
>
> Awin describes Transaction Notifications as near real time: a notification goes out each time a transaction is recorded.

> [accordion] I used to run ShareASale. What changes?
>
> ShareASale programs now run on Awin, so you track them exactly as described here. See [ShareASale](/docs/en/integrations/shareasale-click-flare-integration-guide.md) for what moved.

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

***

## Related

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

> [card] [Postback parameters](/docs/en/tracking/click-flare-parameters-in-postback-urls.md)
>
> click\_id, txid, payout\_currency

> [card] [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.