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

# TheOptimizer and ClickFlare Integration Guide

> Connect TheOptimizer to ClickFlare: import conversions, revenue and custom events with your API key and run automation rules on tracker data.

![TheOptimizer and ClickFlare Integration](https://mintcdn.com/clickflare/gS923ib4WFySqxSL/images/integrations/covers/theoptimizer.png?fit=max\&auto=format\&n=gS923ib4WFySqxSL\&q=85\&s=bcc8feaffd53de62e35578bbe50bbb35)

TheOptimizer is an ad automation platform. It connects your ad network accounts (Meta, TikTok, Google Ads, Taboola, Outbrain, MGID and others) in one dashboard, runs rules that pause, scale or change bids and budgets, and launches campaigns in bulk. Its AI copilot can also analyze performance and build rules and reports for you.

Ad networks only see the conversions their own pixels report. ClickFlare sees every click, every lander step and every postback. Connecting the two lets TheOptimizer use ClickFlare's numbers for its reports and rules.

The connection runs **one way, from ClickFlare to TheOptimizer**. TheOptimizer reads your ClickFlare data through the API with your API key. It matches each conversion to the ad network's campaign, ad set and ad, and shows ClickFlare's numbers next to the network's. Nothing is changed in ClickFlare.

***

## At a glance

To set up TheOptimizer with ClickFlare:

1. Check your traffic sources.
2. Copy your ClickFlare API key.
3. Connect ClickFlare in TheOptimizer.
4. Pick a template per ad network.
5. Add the tracking parameters.

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

| | TheOptimizer + ClickFlare |
| - | - |
| **How it connects** | TheOptimizer reads the ClickFlare API with your API key |
| **What reaches ClickFlare** | Conversions, revenue and custom conversion events |
| **Timing** | Every 20 min, every 10 min on the Master plan |
| **Key parameters** | Campaign ID, Ad Set ID, Ad ID, Placement |
| **Works with** | Meta, TikTok, Google Ads, Taboola, Outbrain, MGID and more |
| **Good to know** | Connect at least one ad network in TheOptimizer first. |

***

## How the data flows

```text theme={null}
Ad click on Meta / TikTok / Taboola...
  → ClickFlare campaign URL with the traffic source's parameters
     ?campaign_id=...&adset_id=...&ad_id=...&placement=...
     (ClickFlare stores the IDs with the click)
  → Lander → offer → conversion postback to ClickFlare

Every 20 minutes (10 on the Master plan)
  → TheOptimizer calls the ClickFlare API with your API key
  → Pulls conversions, revenue and custom conversion events
  → Matches them to the ad network's campaign, ad set, ad and placement IDs
  → Reports, AI analysis and automation rules use the tracker numbers
```

| What | Where it comes from | How TheOptimizer uses it |
| - | - | - |
| **Cost, impressions, clicks** | The ad network's API | The network's own columns |
| **Conversions, revenue** | ClickFlare, through the API | Tracker columns next to the network's (for example **Revenue (tracker)**) |
| **Custom conversion events** | ClickFlare's custom conversions | Funnel metrics, custom KPIs and rule conditions |
| **The link between them** | Campaign, ad set, ad and placement IDs stored in ClickFlare | Matching tracker data to each ad |

> [!NOTE]
>
> The matching only works if ClickFlare stores the ad network's IDs with every click. That is what the traffic source's parameters do: they put the network's campaign, ad set, ad and placement IDs into your ClickFlare campaign URL.

***

## What you'll need

* A ClickFlare account with campaigns already tracking traffic from your ad networks.
* A TheOptimizer account with **at least one ad network connected**. TheOptimizer relies on ad network data, so you can't connect ClickFlare without one.
* A ClickFlare API key.
* For each ad network, a traffic source in ClickFlare whose parameters include the campaign ID, ad set (or ad group) ID, ad ID and placement.

***

## Setup

**1. Check your traffic sources in ClickFlare**

TheOptimizer calls the traffic sources in ClickFlare "tracking templates". For each ad network you'll connect, open its traffic source in ClickFlare and check that its parameters capture:

| TheOptimizer needs | Example of what the parameter holds |
| - | - |
| **Campaign ID** | The network's campaign ID |
| **Ad Set ID** | The ad set or ad group ID |
| **Ad ID** | The ad or creative ID |
| **Placement** | The site, publisher or placement ID |

If any are missing, TheOptimizer flags the template and won't connect that network until you fix it in ClickFlare.

**2. Note your currency, conversion time and timezone**

TheOptimizer asks for two settings that must match ClickFlare exactly:

* **Currency**: the currency your ClickFlare account reports revenue in.
* **Conversion registration time**: what ClickFlare uses under **Settings → General Settings → Conversion registration time reporting**. **Visit Timestamp** in ClickFlare is **Visit time** in TheOptimizer, **Postback Timestamp** is **Postback time**.

TheOptimizer pulls tracker data in each ad account's own timezone. If ClickFlare reports in a different timezone, daily numbers won't line up.

**3. Copy your ClickFlare API key**

In ClickFlare, go to **Settings → API Keys** and copy a key, or generate one for TheOptimizer. See [API overview](/docs/en/api/clickflare-api-overview.md).

> [!NOTE]
>
> TheOptimizer's own guide points to your profile avatar → **My Profile** → **API Keys**. In ClickFlare's settings, the keys are under **Settings → API Keys**.

**4. Connect ClickFlare in TheOptimizer**

In TheOptimizer, go to **Integrations**, scroll to **Tracking Platforms**, find the **ClickFlare** card and click **Connect →**. Fill in:

| Field | What to enter |
| - | - |
| **Integration name** | A label, for example "ClickFlare – Brand A" |
| **API Key** | The key from ClickFlare |
| **Currency** | Your ClickFlare reporting currency |
| **Conversion registration time** | **Visit time** or **Postback time**, as set in ClickFlare |

**5. Pick a tracking template for each ad network**

After you save, TheOptimizer lists your connected ad networks. Click **Configure →** next to each one and pick, from **Choose a tracking template**, the ClickFlare traffic source you use for that network. The status changes to **Connected**.

The template you pick becomes the default for all ad accounts of that network. Networks without a template get no ClickFlare data.

**6. Add the tracking parameters to your ad campaigns**

At the end, TheOptimizer generates a **tracking parameters code**. Add it to your campaigns on each ad network. Without it, ClickFlare receives visits but can't tie them to campaign and ad IDs, and no conversions or revenue reach TheOptimizer.

If your ClickFlare campaign URLs already carry the traffic source's parameters, compare the two and make sure the ads send every ID TheOptimizer expects.

***

## What TheOptimizer imports

* **Conversions and revenue** from ClickFlare, matched by campaign ID, ad set or ad group ID, ad ID, publisher ID and other identifiers.
* **Tracker metrics** as their own columns: clicks, conversions, revenue, CPA, EPC and ROI, next to the ad network's numbers.
* **Custom conversion events.** Every [custom conversion](/docs/en/settings/custom-conversions.md) you track in ClickFlare, reported with funnel metrics such as landing page CTR, offer conversion rate, conversion rate and revenue.

All of it is available in reports, AI analysis, custom metrics and automation rules.

***

## Sync timing

| Plan | ClickFlare sync |
| - | - |
| All plans except Master | Every 20 minutes |
| Master | Every 10 minutes |

Your rules act on data that is up to one sync interval old. Allow for that in rules that react within the same day, and for the time conversions take to reach ClickFlare from the network or offer.

***

## What you can automate

With ClickFlare data in TheOptimizer, rules can use tracker numbers instead of the network's estimates. Examples from TheOptimizer's own material:

* **Spot tracking gaps.** Compare network conversions with ClickFlare conversions and catch discrepancies before you cut or scale.
* **Act before full CPA.** Pause ads on weak lander CTR or lead rate from ClickFlare custom conversions, instead of spending two to three times your CPA first.
* **Rule on early funnel events.** Use a custom conversion such as a lead or add-to-cart as the rule's condition when final sales come in late.
* **Placement control.** Block or adjust placements on native networks using ClickFlare revenue matched by publisher ID.
* **Custom KPIs.** Combine network cost with ClickFlare revenue, for example a true CPA or blended ROAS, across many ad accounts.

> [!WARNING]
>
> In rule conditions, pick the tracker metric, for example **Revenue (tracker)** and not **Revenue**. TheOptimizer's FAQ names the wrong metric as a common reason a rule doesn't fire. In the dashboard, also check that the revenue toggle shows tracker revenue.

***

## One ClickFlare integration per campaign

Only one integration of the same tracker type should track a campaign. Two ClickFlare integrations on the same campaign cause matching and attribution conflicts. Different tracker types side by side are fine, for example ClickFlare with Google Analytics.

From an ad network's integration page, you can also customize the tracker per ad account: link a different tracker, pause the connection for one account, or use a different tracking template for it.

***

## Verify the setup

**1. Check the connection status**

In TheOptimizer, every ad network you use should show **Connected** under the ClickFlare integration.

**2. Check a click in ClickFlare**

Click one of your ads and find the visit in ClickFlare. The campaign, ad set, ad and placement values should hold real IDs, not empty values or macro text.

**3. Compare numbers after a sync**

After 20 minutes (10 on Master), open the campaign in TheOptimizer. The tracker columns should match ClickFlare for the same day, timezone and conversion time.

***

## Troubleshooting

> [accordion] An ad network shows no ClickFlare data
>
> * No tracking template is selected for that network. Click **Configure →** and pick one.
> * The template is missing Campaign ID, Ad Set ID, Ad ID or Placement. Fix the traffic source in ClickFlare.
> * The tracking parameters code isn't on the network's campaigns, so ClickFlare can't store the IDs.

> [accordion] Only some campaigns show 0 revenue
>
> The campaign ID isn't tracked for those campaigns. Check that their ads send the campaign ID parameter and that ClickFlare stores it on the clicks.

> [accordion] Revenue or conversions don't match ClickFlare
>
> * Currency or conversion registration time in TheOptimizer differs from ClickFlare.
> * ClickFlare reports in a different timezone from the ad account.
> * Two ClickFlare integrations track the same campaign.
> * The last sync hasn't run yet.

> [accordion] The connection fails with the API key
>
> The key was deleted or copied incompletely. Generate a new one under **Settings → API Keys** and update the integration in TheOptimizer.

***

## FAQ

> [accordion] Does ClickFlare integrate with TheOptimizer?
>
> Yes. TheOptimizer reads your ClickFlare data through the API with your API key, and matches conversions and revenue to your ad network campaigns, ad sets and ads.

> [accordion] Can I connect ClickFlare without an ad network?
>
> No. TheOptimizer needs at least one supported ad network connected first.

> [accordion] Does TheOptimizer change anything in ClickFlare?
>
> No. It reads data through the API. Its rules act on your ad network campaigns.

> [accordion] Are my custom conversions imported?
>
> Yes. TheOptimizer imports ClickFlare custom conversion events and lets you use them in reports, custom metrics and rules.

> [accordion] Can I use ClickFlare and Google Analytics on the same campaign?
>
> Yes. Different tracker types can run side by side. Only two integrations of the same tracker type on one campaign cause conflicts.

***

## Related

> [card] [API overview](/docs/en/api/clickflare-api-overview.md)
>
> Where API keys live

> [card] [Custom conversions](/docs/en/settings/custom-conversions.md)
>
> Events TheOptimizer imports

> [card] [Creating a campaign](/docs/en/campaigns/creating-a-campaign-in-click-flare.md)
>
> Traffic source and parameters


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