> ## 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.

# Zemanta (Outbrain DSP) as a Traffic Source

> Track Zemanta (Outbrain DSP) campaigns in ClickFlare: capture the postbackid click ID and publisher data, and post conversions to your S2S definition.

![Zemanta traffic source template](https://mintcdn.com/clickflare/Z7FseNUODe2P_cAH/images/integrations/covers/templates/zemanta.png?fit=max\&auto=format\&n=Z7FseNUODe2P_cAH\&q=85\&s=0912aa2ef371ae72809f5459ecf57dbe)

Zemanta is a demand-side platform (DSP) that buys native, display and video inventory programmatically across ad exchanges. It was renamed **Outbrain DSP** in August 2024, and Outbrain itself now operates under the **Teads** brand. The platform, its macros and its postback domain (`zemanta.com`) are the same. ClickFlare's template is still called **Zemanta**.

This guide sets up Zemanta (Outbrain DSP) as a traffic source in ClickFlare. It covers passing the DSP's click data into your reports and sending conversions back to the DSP through its server-to-server postback, so its optimization and your stats agree.

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

## At a glance

| | |
| - | - |
| **Inventory** | Native, display and video, bought programmatically across exchanges |
| **Click ID macro** | `{postbackid}`, mandatory for conversion tracking |
| **Conversion tracking** | S2S postback to `p1.zemanta.com`, one URL per conversion definition |
| **Payout passed back** | No. The template sends the click ID only. |
| **Multiple events** | Yes, one conversion definition and one postback per event |
| **Cost** | Not passed in the URL. The DSP has no cost macro. Use **CPC** or upload costs. |
| **Conversion API** | No |

## How it works

**1. The DSP sends the click**

A visitor clicks your ad. The DSP opens your ClickFlare campaign URL and fills in its macros: the click ID in `zemid`, plus the media source, publisher, placement, campaign, ad group and content ad.

**2. ClickFlare stores the postback ID**

ClickFlare saves the value of `zemid` as the visit's **External ID** 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 the DSP**

ClickFlare fires the postback of your conversion definition, replacing `{external_id}` with the stored postback ID. The DSP matches it to the original click.

> [!NOTE]
>
> The mirror to keep straight: in the **campaign URL** you write *ClickFlare's* parameter (`zemid`) and *the DSP's* macro (`{postbackid}`). The template does this for you. In the **postback URL** you write *the DSP's* parameter (`postbackid`) 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).
* **Have a DSP Pixel in your account.** Every conversion definition is attached to a pixel. You don't need to install the pixel on your pages for S2S tracking.
* **Decide which conversions the DSP should receive.** The DSP optimizes on what you send it. If your funnel has several steps (lead, then sale), decide now whether to send one event or several. See [Tracking several events](#tracking-several-events).

***

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

1. Go to **Campaigns** and click **New**.
2. In **Traffic Source**, open the dropdown and click **+ New Traffic Source**.
3. Type `zemanta` in the search box and select the **Zemanta** template.
4. Enter a **Name**, for example `Outbrain DSP (Zemanta)`.
5. Leave **Cost currency** on **USD** unless your DSP account is billed in another currency.

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

| Name | TS Parameter | TS Token (DSP macro) | ClickFlare Token | What it carries |
| - | - | - | - | - |
| Cost | (empty) | (empty) | `{cost}` | Nothing. The DSP has no cost macro. See [Cost](#cost). |
| External ID | `zemid` | `{postbackid}` | `{external_id}` | The DSP's unique click ID. Required for the postback. |
| mediasource | `mediasource` | `{mediasource}` | `{trackingField1}` | The media source (exchange or network), as its slug in the DSP's Media Sources tab |
| publisher | `publisher` | `{publisher}` | `{trackingField2}` | The domain where the ad was shown |
| placement | `placement` | `{placement}` | `{trackingField3}` | The ID or name of the ad placement |
| campaignid | `campaignid` | `{campaignid}` | `{trackingField4}` | The DSP campaign |
| adgroupid | `adgroupid` | `{adgroupid}` | `{trackingField5}` | The ad group |
| contentadid | `contentadid` | `{contentadid}` | `{trackingField6}` | The content ad (creative) |
| cachebuster | `cachebuster` | `{cachebuster}` | `{trackingField7}` | A random number that defeats caching. Not useful in reports. |
| timestamp | `timestamp` | `{timestamp}` | `{trackingField8}` | The Unix time of the click |
| random | `random` | `{random}` | `{trackingField9}` | A random number per event. Not useful in reports. |

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

Each tracking field becomes a column you can group reports by. `publisher`, `mediasource` and `contentadid` are the ones you will use most: they tell you which sites, exchanges and ads convert, so you can block publishers or pause ads in the DSP.

`cachebuster` and `random` change on every click, so grouping by them gives one row per visit. You can repurpose those two rows for macros you will actually report on. The DSP also offers `{title}` (the ad headline), which is useful for headline tests.

> [!WARNING]
>
> Don't change or remove the **External ID** row. Without `{postbackid}` in the campaign URL, the DSP has no click ID to match your postbacks against, and no conversion is attributed.

To pass more DSP data, click **Add Parameter**, give it a name and parameter, and enter the DSP macro as the **TS Token**. ClickFlare assigns the next free tracking field. Macros are written in curly braces and are not case-sensitive. Check the DSP's **Tracking parameters and macros** article for the full list.

## Step 2 – Set up the postback

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

### Get your postback URL from the DSP

1. In the DSP, open the **Conversions** tab in the main menu.
2. Click **+ Add new conversion definition**.
3. Enter a name and description, choose the account and a DSP Pixel, and choose the type of event to track.
4. As the conversion trigger method, choose **Server to Server**. This is the important part.
5. Define your attribution rules and click **Save**.
6. The DSP shows the postback URL for this conversion definition. Copy it.

The DSP's help center gives this example of a finished postback, for a postback ID of `1234`:

```text theme={null}
https://p1.zemanta.com/p/486/820/?postbackid=1234
```

The two numbers in the path identify your conversion definition. Your URL has its own values.

> [!NOTE]
>
> Leave **Treat all received events as already attributed conversions** unticked. Tick it only if the conversions were already attributed elsewhere and you don't want the DSP to attribute any.

### 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}
https://p1.zemanta.com/v2/p/s2s/REPLACE/REPLACE/?postbackid={external_id}
```

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

It already sends the click ID (`{external_id}`) in the DSP's `postbackid` parameter.

3. Replace the two `REPLACE` placeholders with the two values from the path of the URL the DSP gave you, in the same order.
4. Compare the result with the DSP's URL. The template's path (`/v2/p/s2s/`) is not the one in the DSP's help-center example (`/p/`). If your DSP URL has a different path from the template, use the DSP's URL instead: paste it and replace the postback ID value at the end with `{external_id}`, so it ends in `?postbackid={external_id}`.
5. 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.
6. Click **Save**. You are back in the campaign editor with the Zemanta traffic source selected.

> [!WARNING]
>
> Replace both `REPLACE` placeholders. If either stays in the postback, the DSP cannot find your conversion definition and the conversion is lost. **Logs → Postback Status** still shows the request, so check the URL there if conversions don't appear in the DSP.

The template sends no payout, and the DSP's postback documentation names no value parameter. The DSP counts conversions. Track revenue and ROI in ClickFlare.

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**. The DSP passes no cost in the URL, so use **CPC** with your bid. See [Cost](#cost).
3. Choose **Redirect** or **Direct** tracking. Redirect is the usual choice.
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 DSP macro from the template, for example `zemid={postbackid}` and `publisher={publisher}`.

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 the DSP.

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

## Step 4 – Create the campaign in the DSP

1. In the DSP, create a campaign and an ad group with your targeting, budget and bid.
2. When you upload content ads, paste the ClickFlare campaign URL as each ad's URL.
3. Submit the ads for review.

Paste the URL exactly as ClickFlare gives it. The DSP replaces each `{...}` macro when the ad is clicked.

The DSP also offers a **Tracking codes** box in the ad group settings, which appends parameters to every ad URL. You don't need it with the ClickFlare URL, which already carries `zemid={postbackid}`. Don't add a second `postbackid` parameter there. The DSP also appends its own `_z1_` parameters (such as `_z1_pub` and `_z1_msid`) by default. They don't affect ClickFlare.

## Step 5 – Test the integration

1. Launch the campaign on a small budget, or open your ClickFlare campaign URL with a test value, for example `zemid=test123`.
2. In ClickFlare, check that the visit appears with `test123` as its External ID.
3. Complete the offer the way a real visitor would.
4. In ClickFlare, go to **Logs → Postback Status** and filter by the campaign. A successful request to `p1.zemanta.com` confirms ClickFlare sent it, and the URL shows the postback ID it used.
5. With a real click from the DSP, check the conversion definition's numbers in the DSP once its reporting updates.

A test value like `test123` doesn't belong to a real DSP click, so the DSP won't attribute it. It only proves the ClickFlare side. Confirm attribution with real traffic.

***

## Tracking several events

The DSP tracks each event through its own conversion definition, each with its own postback URL. For example, one definition for leads and one for purchases.

1. In the DSP, create one conversion definition per event, each with **Server to Server** as the trigger method. Copy each postback URL.
2. In ClickFlare, create a [custom conversion](/docs/en/settings/custom-conversions.md) for each step, for example `lead` and `purchase`.
3. On the Zemanta traffic source, click **+ Another postback URL** once per extra event.
4. Paste each DSP postback URL, ending in `?postbackid={external_id}`, and map it to its ClickFlare event: `lead` to the lead definition's URL, `purchase` to the purchase definition's URL.

> **Rules for multi-event postbacks**
>
> * One conversion definition per event, each with its own postback URL. The path values differ between them.
> * One postback per event. Don't send several events to the same URL.
> * Optimize your ad groups on the conversion definition that matches your goal, usually the final one.

> **Sending only one event**
>
> If the DSP should only learn from your final sale, keep a single postback and map it to that event. Earlier steps still show in ClickFlare. They just don't reach the DSP.
>
> 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

The template doesn't pass cost. Its **Cost** row is empty, and the DSP's macro list has no cost or CPC macro.

Set the campaign's **Cost Model** to **CPC** and enter your bid. If you buy on CPM, enter your CPM bid divided by 1,000. If you buy on a CPA goal, use **CPA** with your price per conversion.

> [!NOTE]
>
> Don't use **Not Tracked** with this template. It records cost only when the URL or a cost integration provides it, and neither does here, so your cost would show as zero. ClickFlare's [Outbrain cost integration](/docs/en/integrations/outbrain.md) connects to Outbrain's native platform accounts, not to the DSP.

The DSP's real cost per click varies from your bid. When the recorded spend differs from your DSP 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).

## Delayed revenue

If you run search arbitrage (RSOC or AFD) behind the DSP, the feed reports revenue hours or days after the click. To pass conversions to the traffic source once the revenue arrives, see [Sending Delayed Revenue to Traffic Sources](/docs/en/advanced-tracking-configuration/how-to-send-delayed-revenue-to-traffic-sources.md). The DSP's postback has no value parameter, so it receives the conversion but not the amount.

***

## Troubleshooting

> **Conversions show in ClickFlare but not in the DSP**
>
> * A `REPLACE` placeholder is still in the postback, or the path doesn't match the URL the DSP gave you. Compare them.
> * **Traffic source postback URL** is off on the Zemanta 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 conversion falls outside the attribution rules of your conversion definition.
> * Check **Logs → Postback Status**: a failed request shows the status code the DSP returned.

> **The postback is sent with an empty postback ID**
>
> * The ad URL in the DSP is missing `zemid={postbackid}`, or the macro was edited. Copy the URL from ClickFlare again.
> * The **External ID** row was removed or changed on the traffic source.
> * The visit didn't come from a DSP click, for example a test visit without `zemid`.

> **Cost is zero in ClickFlare**
>
> The Cost Model is **Not Tracked**. The template passes no cost, so switch to **CPC** with your bid, or upload costs.

> **Publisher or placement columns are empty**
>
> The macros were not replaced, usually because the URL was edited or pasted somewhere the DSP doesn't process macros. In GDPR regions, the DSP only appends tracking parameters for trackers that are IAB TCF v2 compliant and in the IAB Global Vendor List, so EU clicks may arrive without them. Paste the campaign URL from ClickFlare unchanged. 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:** Is this the same as the Outbrain template?

**A1:** No. Outbrain's native platform and Outbrain DSP (formerly Zemanta) are separate products with separate macros and postbacks. Use this template for DSP campaigns and the Outbrain template for Outbrain's native campaigns.

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

**A2:** Yes, if they all report to the same conversion definition. The postback URL belongs to one definition. Create a second Zemanta traffic source for campaigns that optimize on a different definition, or add more postbacks as described in [Tracking several events](#tracking-several-events).

> **Q3:** Why is it called `zemid` in the campaign URL and `postbackid` in the postback?

**A3:** They are two halves of the same value. ClickFlare reads the DSP's click ID from its own `zemid` parameter. The DSP expects it back in its own `postbackid` parameter. Both names are fixed. Change neither.

> **Q4:** Do I need to install the DSP Pixel on my pages?

**A4:** No. S2S tracking doesn't need the pixel on your site. The conversion definition still has to be attached to a DSP Pixel in your account.

## 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 leads and sales into separate events.

> **[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.