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

# A4G DSP Pop Conversion Tracking & Postback Setup

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

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

A4G DSP is the self-serve demand-side platform of A4G (Ad4Game). Besides display and in-app traffic, it sells pop traffic, where your page opens in a new window and you pay per view. This guide sets up A4G's pop traffic 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 Pop traffic source is created inline, without leaving the campaign.

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

## At a glance

| | |
| - | - |
| **Ad formats** | Pop traffic (popunder), bought on a cost-per-view basis |
| **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 visit by the template, as A4G's cost per view (`{cpv}`). Cost Model: **Not Tracked**. |
| **Conversion API** | No |

## How it works

**1. A4G sends the pop view**

A4G opens your ClickFlare campaign URL in a pop window and fills in its macros: the click ID in `clickid`, the price of the view in `cpv`, 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 Pop 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 Pop** template. The search also shows **A4G DSP**, which is for display and in-app campaigns.
4. Enter a **Name**, for example `A4G DSP Pop`.
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 | `cpv` | `{cpv}` | `{cost}` | A4G's price for the pop view. 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 Pop template's Parameters table in ClickFlare, with A4G's macros pre-filled](https://mintcdn.com/clickflare/vJtghtd_XfrC_OXQ/images/integrations/templates/a4g-dsp-pop/parameters.png?fit=max\&auto=format\&n=vJtghtd_XfrC_OXQ\&q=85\&s=f470ba319cfd0aa47eb7367994d0b441)

The tracking fields are the same as in the A4G DSP template. Each becomes a column you can group reports by. On pop traffic, `placement_id` and `exchange_name` are the ones you will use most. They tell you which placements and exchanges convert, so you can block or bid up sources in A4G. `app_id` and `ifa` usually stay empty on pop traffic, which runs on websites rather than in apps.

> [!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 Pop 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 Pop template's postback](https://mintcdn.com/clickflare/vJtghtd_XfrC_OXQ/images/integrations/templates/a4g-dsp-pop/postback.png?fit=max\&auto=format\&n=vJtghtd_XfrC_OXQ\&q=85\&s=48eb1f29b6d7f56b0f0e5ad4d902d7a1)

It is the same postback as the A4G DSP template's. 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 Pop 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 per view A4G passes. See [Cost](#cost).
3. Choose **Redirect** or **Direct** tracking. Redirect is the usual choice for pop 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}`.

Pop traffic usually lands straight on the offer or on a short pre-lander. 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

1. In A4G DSP, open the **Campaigns** tab, choose **Campaigns** and click **Add campaign**.
2. Enter a name, choose the campaign type and the traffic type for pop, and click **Save**.
3. Set your targeting and your bid.
4. Paste the ClickFlare campaign URL into the campaign's destination URL field. On A4G's display campaigns this field is the creative's **Click URL**. If you can't find where a pop campaign takes its URL, ask your A4G account manager.

Paste the URL exactly as ClickFlare gives it. A4G replaces each `{...}` macro when the pop opens. A pop campaign has no banner, so the URL you paste is the page the visitor sees.

## 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, a cost per visit, 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 Pop 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 view. The `cost` row reads A4G's `{cpv}` macro into a `cpv` parameter, and ClickFlare records it as the visit's cost. This row is the only difference between this template and the A4G DSP template, which reads `{cost}` instead.

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

> [!NOTE]
>
> A pop view is roughly one visit, so the cost per view maps cleanly onto ClickFlare's cost per visit. After launch, compare ClickFlare's **Cost** column with your spend in A4G. If `{cpv}` arrives empty or the totals don't match, switch the Cost Model to **CPC** and enter your bid per view as the cost value. If you bid per thousand views, divide that bid by 1,000.

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

> **Q2:** Can I use one traffic source for both my pop and display campaigns on A4G?

**A2:** It works for conversions, because both templates send the same postback. It doesn't work for cost: a pop campaign needs `{cpv}`, a display campaign needs `{cost}`. Keep one traffic source per template, and use each for all campaigns of its kind.

> **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 pop traffic?

**A4:** Redirect is the usual choice for pops. 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:** Why does ClickFlare show one visit for every view I pay for?

**A5:** Because a pop view opens your campaign URL directly. There is no ad to click first. Your visits in ClickFlare should be close to the views A4G bills, and the cost per visit close to your bid. A large gap points to pops blocked before the page loaded.

## Related

> **[A4G DSP](/docs/en/integrations/a4g-dsp-as-a-traffic-source.md)**
>
> The template for A4G's display and in-app 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.