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

# A4G DSP Conversion Tracking & Postback Setup

> Set up A4G DSP conversion tracking in ClickFlare: the {clickid} macro, {cost} per click, and the conversion.bidpro.io S2S postback.

![A4G DSP traffic source template](https://mintcdn.com/clickflare/vJtghtd_XfrC_OXQ/images/integrations/covers/templates/a4g-dsp.png?fit=max\&auto=format\&n=vJtghtd_XfrC_OXQ\&q=85\&s=55564169c195008040547226a921f939)

A4G DSP is the self-serve demand-side platform of A4G (Ad4Game). It buys programmatic traffic from ad exchanges, much of it in mobile apps, and passes the exchange, app, placement and device behind every click. This guide sets up A4G DSP as a traffic source in ClickFlare. It covers passing A4G's click data into your reports and sending conversions back to A4G, so its optimization and your stats agree.

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

ClickFlare has two A4G templates. This page covers **A4G DSP**, for display and in-app campaigns, where the cost arrives in A4G's `{cost}` macro. If you buy A4G's pop traffic, use the **A4G DSP Pop** template instead. See [A4G DSP Pop](/docs/en/integrations/a4g-dsp-pop-as-a-traffic-source.md).

## At a glance

| | |
| - | - |
| **Ad formats** | Programmatic display and in-app traffic bought through ad exchanges |
| **Click ID macro** | `{clickid}`, mandatory for conversion tracking |
| **Conversion tracking** | S2S postback to `conversion.bidpro.io` |
| **Payout passed back** | No. The template's postback sends the click ID only. |
| **Multiple events** | Not documented by A4G. Send one event. |
| **Cost** | Passed per click by the template, in A4G's `{cost}` macro. Cost Model: **Not Tracked**. |
| **Conversion API** | No |

## How it works

**1. A4G sends the click**

A visitor clicks your ad. A4G opens your ClickFlare campaign URL and fills in its macros: the click ID in `clickid`, the cost in `cost`, plus the placement, category, ad exchange, app, creative, device and ad.

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

ClickFlare saves the value of `clickid` 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 A4G**

ClickFlare fires the A4G postback, replacing `{external_id}` with the stored A4G click ID. A4G matches it to the original click.

> [!NOTE]
>
> The mirror to keep straight: in the **campaign URL** you write *ClickFlare's* parameter (`clickid`) and *A4G's* macro (`{clickid}`). The template does this for you. In the **postback URL** you write *A4G's* parameter (`clickid`) and *ClickFlare's* token (`{external_id}`). The parameter has the same name on both sides. What changes is who fills it in.

## 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).
* **Have an A4G DSP advertiser account.** You log in at `platform.a4g.com`.
* **Decide which conversion A4G should receive.** The postback has no event parameter, so A4G sees every postback as the same kind of conversion. If your funnel has several steps (lead, then sale), pick the one A4G should optimize to. See [Choosing the event](#choosing-the-event).

***

## Step 1 – Create the campaign and the A4G DSP traffic source

1. Go to **Campaigns** and click **New**.
2. In **Traffic Source**, open the dropdown and click **+ New Traffic Source**.
3. Type `a4g` in the search box and select the **A4G DSP** template. Don't pick **A4G DSP Pop** unless you buy pop traffic.
4. Enter a **Name**, for example `A4G DSP`.
5. Leave **Cost currency** on **USD** unless your A4G account is billed in another currency.

The template fills in the **Parameters** table for you:

| Name | TS Parameter | TS Token (A4G macro) | ClickFlare Token | What it carries |
| - | - | - | - | - |
| cost | `cost` | `{cost}` | `{cost}` | A4G's cost for the click. See [Cost](#cost). |
| externalId | `clickid` | `{clickid}` | `{external_id}` | A4G's click ID. Required for the postback. |
| placement\_id | `placement_id` | `{placement_id}` | `{trackingField1}` | The ID of the placement that showed the ad |
| placement | `placement` | `{placement}` | `{trackingField2}` | The placement's name |
| category | `category` | `{category}` | `{trackingField3}` | The site or app category |
| media\_type | `media_type` | `{media_type}` | `{trackingField4}` | The media type of the creative |
| exchange\_name | `exchange_name` | `{exchange_name}` | `{trackingField5}` | The ad exchange the impression was bought on |
| ifa | `ifa` | `{ifa}` | `{trackingField6}` | The device's advertising ID (IDFA or GAID) |
| app\_id | `app_id` | `{app_id}` | `{trackingField7}` | The app the ad ran in |
| creative | `creative` | `{creative}` | `{trackingField8}` | The creative's name |
| device | `device` | `{device}` | `{trackingField9}` | The device type |
| ad\_id | `ad_id` | `{ad_id}` | `{trackingField10}` | The A4G ad |

![The A4G DSP template's Parameters table in ClickFlare, with A4G's macros pre-filled](https://mintcdn.com/clickflare/vJtghtd_XfrC_OXQ/images/integrations/templates/a4g-dsp/parameters.png?fit=max\&auto=format\&n=vJtghtd_XfrC_OXQ\&q=85\&s=a074e342b725ac03ea92a3484edb8e0a)

Each tracking field becomes a column you can group reports by. `placement_id`, `app_id` and `exchange_name` are the ones you will use most. They tell you which apps, placements and exchanges convert, so you can block or bid up sources in A4G. `ifa` is a per-device ID. It is useful for spotting repeat devices, less so for grouping.

> [!WARNING]
>
> Don't change or remove the `externalId` row. Without `clickid={clickid}` in the campaign URL, ClickFlare has no A4G click ID to send back, and the postback reaches A4G empty.

To pass more A4G data, click **Add Parameter**, give it a name and parameter, and enter the A4G macro as the **TS Token**. ClickFlare assigns the next free tracking field. Only use macros your A4G account offers. A macro A4G doesn't know reaches ClickFlare as literal text.

## Step 2 – Set up the postback

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

A4G's postback is one shared URL. It carries no account ID, username or campaign ID. A4G finds the click, and your campaign, from the click ID alone. There is no postback to generate in your A4G account.

### Add it to the traffic source in ClickFlare

1. Back 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://conversion.bidpro.io/?t=postback&clickid={external_id}
```

![The Traffic source postback URL switched on, showing the A4G DSP template's postback](https://mintcdn.com/clickflare/vJtghtd_XfrC_OXQ/images/integrations/templates/a4g-dsp/postback.png?fit=max\&auto=format\&n=vJtghtd_XfrC_OXQ\&q=85\&s=1282dd54d48fbb9b27c8fd6635946934)

It sends the A4G click ID (`{external_id}`) in A4G's `clickid` parameter. `t=postback` tells A4G's server the request is a conversion. Keep both as they are.

3. Change `http://` to `https://`. The `http` address answers with a permanent redirect to `https`. Sending to `https` directly avoids relying on the redirect. The result:

```text theme={null}
https://conversion.bidpro.io/?t=postback&clickid={external_id}
```

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 A4G DSP traffic source selected.

> [!WARNING]
>
> The template's postback sends no payout. A4G counts the conversions, but it can't see their value. If you want A4G to receive revenue, ask your A4G account manager which parameter its postback reads the payout from. Then add it at the end of the URL with ClickFlare's `{payout}` token, for example `&PARAMETER={payout}`, using the name A4G gives you.

Don't replace `{external_id}` with A4G's `{clickid}`. `{clickid}` is A4G's macro for the campaign URL. ClickFlare doesn't know it and would send it as literal text.

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** to **Not Tracked**, so ClickFlare uses the cost A4G passes. See [Cost](#cost).
3. Choose **Redirect** or **Direct** tracking. Redirect is the usual choice for A4G DSP 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 A4G macro from the template, for example `clickid={clickid}` and `placement_id={placement_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 A4G.

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

## Step 4 – Create the campaign in A4G DSP

In A4G DSP, the ClickFlare URL goes on the creative. A campaign holds creatives, and each creative has its own click URL.

1. Upload your creatives. Open the **Campaigns** tab and choose **Creative library**. In **Manage library**, create a folder, then upload your files to it. A4G asks for a reference URL during the upload. Paste the ClickFlare campaign URL there and click **Start upload**.
2. Create the campaign. Open the **Campaigns** tab, choose **Campaigns** and click **Add campaign**. Enter a name, choose the campaign type and the traffic type, and click **Save**.
3. Create a creative in the campaign. Set its name, media type, bid and frequency cap, and select the creative you uploaded.
4. Paste the ClickFlare campaign URL into the **Click URL** field. Enter your page's domain and click **Save changes**.

Paste the URL exactly as ClickFlare gives it. A4G replaces each `{...}` macro when the ad is clicked. Repeat the **Click URL** step for every creative in the campaign. A creative without the ClickFlare URL sends untracked traffic.

## Step 5 – Test the integration

A4G has no public tool for checking a postback. Test end to end, with your own click.

1. Launch the campaign with a small budget, or wait for the first clicks.
2. In ClickFlare, open the campaign's report and check the **External ID** and tracking field columns. A real A4G click ID in External ID, and values such as an exchange name and placement ID, show the macros are being replaced. Text like `{clickid}` means the URL was edited or pasted somewhere A4G doesn't process macros.
3. Complete the offer yourself, or wait for the first conversion.
4. In ClickFlare, go to **Logs → Postback Status** and filter by the campaign. A successful request to `conversion.bidpro.io`, with a real click ID after `clickid=`, confirms ClickFlare sent it.
5. In A4G, check that the conversion appears in the campaign's statistics. If ClickFlare sent the postback and A4G shows nothing, send your A4G account manager the click ID from the log.

***

## Choosing the event

A4G's postback has no event parameter. Every postback it receives counts as the same conversion, and A4G optimizes on all of them. Send it one event, the one you want more of.

> **Sending only your final conversion**
>
> Create a [custom conversion](/docs/en/settings/custom-conversions.md) for each step of your funnel, for example `lead` and `purchase`. On the A4G DSP traffic source, set the postback's event dropdown to the final step, `purchase`. Earlier steps still show in ClickFlare. They just don't reach A4G.
>
> 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.

> **Why not send every step**
>
> Clicking **+ Another postback URL** and sending a second event to the same `conversion.bidpro.io` URL makes A4G count two conversions for one visitor. Its conversion count and its CPA both go wrong. Add a second postback only if A4G confirms its postback can tell events apart, and with the parameter it gives you.

## Cost

The template passes cost per click. The `cost` row sends A4G's `{cost}` macro, and ClickFlare records it as the visit's cost.

On the campaign, set the **Cost Model** to **Not Tracked** so ClickFlare uses the cost passed in the URL.

> [!NOTE]
>
> If you bid on CPM, `{cost}` may not match what you pay per click. After launch, compare ClickFlare's **Cost** column with your spend in A4G. If it doesn't match, switch the Cost Model to **CPC** and enter your average cost per click as the cost value. On a CPM bid, that is your spend divided by your clicks, not the CPM divided by 1,000, because one impression is not one visit on display traffic.

ClickFlare has no cost-tracking API integration for A4G. When the recorded spend differs from your A4G spend, correct it with a [manual cost upload](/docs/en/settings/manual-cost-upload.md). See [Cost Models](/docs/en/core-platform-concepts/cost-models.md) and [Traffic Source Cost Tracking](/docs/en/tracking/how-to-setup-traffic-source-cost-tracking.md).

## Delayed revenue

If you run search arbitrage (RSOC or AFD) behind A4G, the feed reports revenue hours or days after the click. A4G's postback doesn't carry revenue, but the timing still matters if you send A4G a conversion only once revenue arrives. See [Sending Delayed Revenue to Traffic Sources](/docs/en/advanced-tracking-configuration/how-to-send-delayed-revenue-to-traffic-sources.md).

***

## Troubleshooting

> **Conversions show in ClickFlare but not in A4G**
>
> * **Traffic source postback URL** is off on the A4G DSP 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.
> * The postback uses A4G's `{clickid}` instead of ClickFlare's `{external_id}`. ClickFlare doesn't know `{clickid}` and sends it as literal text.
> * Check **Logs → Postback Status**: a failed request shows the status code A4G returned.

> **The postback goes out with an empty click ID**
>
> * The **Click URL** on the A4G creative is missing `clickid={clickid}`, or the macro was edited. Copy the URL from ClickFlare again.
> * The `externalId` row was removed from the traffic source.
> * The conversion came from a visit that didn't start on an A4G click, for example a test click you opened yourself.

> **A4G shows conversions with no revenue**
>
> Expected. The template's postback sends the click ID only. Ask your A4G account manager for the payout parameter and add it with `{payout}`, as described in Step 2.

> **Placement, app or exchange columns are empty**
>
> The macros were not replaced, usually because the URL was pasted somewhere A4G doesn't process macros, or was edited. Some macros are empty by nature: `{app_id}` and `{ifa}` only have values on in-app traffic. 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:** Which template do I pick, A4G DSP or A4G DSP Pop?

**A1:** Pick **A4G DSP** for display and in-app campaigns. Pick **A4G DSP Pop** for pop traffic. The two are identical except for the cost row: A4G DSP reads `{cost}` into a `cost` parameter, A4G DSP Pop reads `{cpv}` into a `cpv` parameter. See [A4G DSP Pop](/docs/en/integrations/a4g-dsp-pop-as-a-traffic-source.md).

> **Q2:** Can I use the same A4G DSP traffic source for all my A4G campaigns?

**A2:** Yes. The postback is set once on the traffic source and every campaign using it sends conversions the same way. A4G's postback has no account ID, so the same URL works for every campaign in your account.

> **Q3:** Why is the parameter called `clickid` on both sides?

**A3:** A4G uses the same name for receiving the click ID and for reading it back. In the campaign URL, A4G fills `clickid` with its `{clickid}` macro. In the postback, ClickFlare fills `clickid` with its `{external_id}` token. Change neither.

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

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

> **Q5:** Where do I put the URL if I have several creatives?

**A5:** In the **Click URL** of each one. A4G sets the click URL per creative, not per campaign. Every creative should carry the same ClickFlare campaign URL.

## Related

> **[A4G DSP Pop](/docs/en/integrations/a4g-dsp-pop-as-a-traffic-source.md)**
>
> The template for A4G's pop traffic.

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

> **[Cost models](/docs/en/core-platform-concepts/cost-models.md)**
>
> How CPC, CPA and RevShare 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.