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

# Retreaver and ClickFlare Integration Guide

> Track Retreaver calls in ClickFlare: map the click ID to a tag with a Parameter Mapper and fire a Conversion webhook with the payout.

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

Retreaver is a call tracking and routing platform for pay-per-call. You put Retreaver.js on your lander, it shows a number from a number pool, and Retreaver routes each call to a buyer and decides whether the call converted.

To track Retreaver calls in ClickFlare, the ClickFlare click ID has to travel with the visitor onto the phone call, and back:

* **Into Retreaver:** your lander URL carries the click ID. A Retreaver **Parameter Mapper** reads it from the URL and saves it as a **tag** on the number the visitor sees. Every call to that number inherits the tag.
* **Back to ClickFlare:** when a call meets your campaign's conversion criteria, a Retreaver **Conversion webhook** loads the ClickFlare postback URL with that tag as the click ID, the call's payout and the call's unique ID.

Data moves one way for conversions: Retreaver to ClickFlare. ClickFlare doesn't need to send anything to Retreaver except the click ID in the lander URL.

***

## At a glance

To set up Retreaver with ClickFlare:

1. Create a custom conversion for calls.
2. Create the campaign.
3. Add your lander as the offer.
4. Map clickid to a tag.
5. Add the Conversion webhook.

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

| | Retreaver + ClickFlare |
| - | - |
| **How it connects** | Retreaver campaign webhook to the ClickFlare postback |
| **What reaches ClickFlare** | Converted calls, payout, call ID, call tags |
| **Timing** | At call end, when conversion criteria are met |
| **Key parameters** | \[clickid], \[payout], `[call_uuid]`, `ct`, param1 to param20 |
| **Works with** | Retreaver.js with a number pool on your lander |
| **Good to know** | Calls to the default number carry no click ID and can't match. |

***

## 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)
  → https://your-lander.com/?clickid=CF_CLICK_ID
     (Retreaver.js shows a pool number; the Parameter Mapper tags it clickid:CF_CLICK_ID)
  → Visitor calls the number. The call inherits the clickid tag.
  → Call meets the campaign's conversion criteria
  → Retreaver fires the Conversion webhook:
     https://trk.yourdomain.com/cf/cv?click_id=CF_CLICK_ID&payout=25.00&txid=CALL_UUID&ct=converted_call
     (ClickFlare matches the call to the original click)
```

| Link | Where you set it | Retreaver side | ClickFlare side |
| - | - | - | - |
| **Lander URL** (offer URL in ClickFlare) | ClickFlare offer | `clickid` URL parameter, read by a Parameter Mapper | `{cf_click_id}` |
| **Conversion webhook** (postback URL) | Retreaver campaign, **Webhooks** section | `[clickid]`, `[payout]`, `[call_uuid]` | `click_id`, `payout`, `txid`, `ct` |

> [!NOTE]
>
> Retreaver tokens use square brackets: `[tag_key]` is replaced with the value of that tag on the call. If your Parameter Mapper saves the click ID under the tag key `clickid`, the token is `[clickid]`.

***

## What you'll need

* A ClickFlare account with your **own tracking domain**. Shared domains get flagged. See [Tracking domains](/docs/en/settings/tracking-domains.md).
* A Retreaver campaign with buyers, conversion criteria and a **number pool**.
* **Retreaver.js** on your lander. Copy it from the campaign overview page: **Retreaver JS Settings →** `</>` **Code Menu**, and place it in the page's `<head>`.
* A real, reachable default number in the page source. Retreaver shows it when the pool is full or the script is blocked.

***

## Setup

Everything in ClickFlare is done from inside the campaign editor. You create the lander as an **offer**, because the call happens after the visitor reaches it.

**1. Set up your own tracking domain**

Add a custom tracking domain first, for example `trk.yourdomain.com`. The postback URL in Retreaver is built on it, so changing it later means editing the webhook too. See [Tracking domains](/docs/en/settings/tracking-domains.md).

**2. Create a custom conversion for calls**

Go to **Settings → Custom Conversions** and add a conversion for converted calls, for example with the parameter `converted_call`. The `ct` value in the webhook must match this parameter exactly. See [Custom conversions](/docs/en/settings/custom-conversions.md).

If you also want other call outcomes, such as connected calls, create one custom conversion for each now.

**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. Add your lander as the offer**

In the campaign path, create a new offer for the page that shows the Retreaver number. Add the click ID to its URL:

```text theme={null}
https://your-lander.com/?clickid={cf_click_id}
```

Set the payout to **Auto** so ClickFlare uses the `payout` value from the webhook.

> [!WARNING]
>
> Keep the braces: `{cf_click_id}`. Without them the lander receives the literal text `cf_click_id`, Retreaver tags every call with it, and no call can be matched to a click.

**5. Map the click ID to a tag in Retreaver**

In Retreaver, go to your **Campaign List** and click **view** next to the campaign. Open the **Retreaver JS settings** tab, then the **Parameter Mappers** tab. Click **Edit**, add a mapper from the URL parameter `clickid` to the tag key `clickid`, and press **Update Campaign**.

Retreaver.js now reads `clickid` from the lander URL and tags the number on the page with it. Calls to that number inherit the tag.

> [!NOTE]
>
> Company-wide default mappers live under **Settings → Company → Edit Company**, in **Default URL Parameter Mappers**. Changing the defaults doesn't change existing campaigns, so add the mapper on the campaign itself.

**6. Add the Conversion webhook**

Edit the Retreaver campaign and scroll to the **Webhooks** section. Click the green **Add** button and:

1. Set the trigger to **Conversion**.
2. Give the webhook a name you'll recognize in the logs, for example "ClickFlare converted call".
3. Leave the tag matches empty, unless you only want this webhook for some calls, for example one publisher.
4. Enter the ClickFlare postback URL with Retreaver tokens:

```text theme={null}
https://trk.yourdomain.com/cf/cv?click_id=[clickid]&payout=[payout]&txid=[call_uuid]&ct=converted_call
```

Click **Update Campaign** to save.

**7. Save the campaign and launch**

Save the ClickFlare campaign, copy the campaign URL from the **Tracking** tab and use it in your ads. Run the checks in [Verify the setup](#verify-the-setup) before you spend on traffic.

***

## The postback parameters

| ClickFlare parameter | Retreaver token | What it does |
| - | - | - |
| `click_id` | `[clickid]` | The ClickFlare click ID from the tag your Parameter Mapper set. Required. |
| `payout` | `[payout]` or `[revenue]` | The value of the converted call. See [Payout or revenue](#payout-or-revenue). |
| `txid` | `[call_uuid]` | Retreaver's unique ID for the call. Each converted call counts as its own conversion. |
| `ct` | fixed text, for example `converted_call` | The custom conversion this webhook reports. Must match the parameter in ClickFlare. |
| `param1`…`param20` | any tag, for example `[caller_zip]` | Extra values you want in ClickFlare reports. |

### Payout or revenue

Retreaver keeps two amounts per converted call. In Retreaver's own example, the publisher receives a \$10 **payout** and the buyer is charged \$20 **revenue**.

* If you send calls into someone else's Retreaver campaign as a publisher, your income is the **payout**: use `[payout]`.
* If you own the Retreaver campaign and sell calls to buyers, your income is the buyer **revenue**: use `[revenue]`.

Send the one you're paid, and check it on your first test call.

***

## Number pools and the click ID

Tracking down to the click ID means every visitor needs their own number. Retreaver says so plainly: when you track a click ID, each viewer gets a unique number, so the pool has to cover your **concurrent** visitors within the lease time.

* **Max Lease Time** is how long a visitor can look at a number without calling before it goes back to the pool. **Buffer Seconds** is how long Retreaver holds it after the visitor leaves.
* When the pool is empty, visitors see the **default number**. Calls to it carry no click ID and can't be matched in ClickFlare.
* Retreaver emails you when the pool is too small. Increase the pool or shorten the lease time.

Retreaver also keeps the URL parameters it gathered for the browser session in two cookies: `CallPixels-u` (the most recent URL) and `CallPixels-ou` (the original URL). A visitor who leaves and comes back to the lander in the same session keeps the click ID.

***

## Other call outcomes

The **Conversion** trigger is the right one for revenue. Retreaver's other end-of-call triggers can report more outcomes, each as its own custom conversion with its own `ct`:

| Retreaver trigger | Fires when | Example `ct` |
| - | - | - |
| **Connect** | At the end of a call that connected to a buyer | `connected_call` |
| **Conversion** | The call meets the campaign's conversion criteria | `converted_call` |
| **Non-Conversion** | The call didn't meet the conversion criteria | `non_converted_call` |
| **Timer** | The call passes the duration you set on the webhook | `call_60s` |
| **Always** | At the end of every call, after the other webhooks | `call` |

Send `payout` only on the webhook that represents money. On the others, leave it out or send `payout=0`.

> [!NOTE]
>
> These end-of-call triggers are "browser emulated": Retreaver loads the webhook URL with a browser bot. They can't send custom HTTP headers, and tokens are only replaced in the URL. ClickFlare's postback carries everything in the URL, so neither limit matters here.

### Repeat callers

Retreaver's **de-dupe** setting on a webhook or on conversion criteria blocks repeat conversions from the same caller within a time frame you choose, from one hour to forever. Use it if a caller who hangs up and redials shouldn't count twice. Without it, each converted call has its own `[call_uuid]` and ClickFlare counts each one.

***

## Verify the setup

**1. Click through the campaign**

Open the ClickFlare campaign URL. On the lander, check the address bar: `clickid=` must be followed by a real click ID, not `{cf_click_id}`. Check that a Retreaver number replaced the default number.

**2. Place a test call**

Call the number shown and stay on the line long enough to meet the conversion criteria. Retreaver suggests routing test calls to a "Tester" endpoint, your own phone, while you test.

**3. Check the call in Retreaver**

In the **Call Log**, open the call. It should carry the `clickid` tag. Scroll right to the **Pixels** column, or open the call and look at **Fired Pixels**, to see the webhook request and ClickFlare's response.

**4. Check the conversion in ClickFlare**

The conversion should show on the campaign with the payout. In **Logs → Event Logs**, check it arrived with the `txid` from Retreaver and the right conversion type.

***

## Troubleshooting

> [accordion] Calls show in Retreaver but not in ClickFlare
>
> * **No clickid tag on the call.** The Parameter Mapper is missing, maps a different URL parameter, or sits only in company defaults. Add it on the campaign.
> * **The visitor saw the default number.** The pool was full or Retreaver.js didn't load. Calls to the default number have no click ID.
> * **The webhook is on the wrong trigger.** A webhook on **Conversion** only fires when the call meets the conversion criteria. Check the criteria's duration.
> * **The webhook didn't fire.** Look at **Fired Pixels** on the call. If it's missing, check the tag matches on the webhook.
>
> See [Troubleshooting S2S postbacks](/docs/en/tracking/troubleshooting-s2s-postback-url-in-clickflare.md) for the ClickFlare side.

> [accordion] ClickFlare receives a literal \[clickid]
>
> Retreaver didn't find a tag called `clickid` on the call, so it left the token as is. The token must match the tag key in your Parameter Mapper exactly. If you mapped to `click_id`, the token is `[click_id]`.

> [accordion] The conversion has the wrong type or no type
>
> The `ct` value doesn't match a custom conversion parameter in ClickFlare. Check spelling and case in **Settings → Custom Conversions**.

> [accordion] The payout is 0 or not what you earned
>
> * Check the offer payout is set to **Auto** in ClickFlare.
> * Check you're sending the right amount: `[payout]` for publisher payout, `[revenue]` for buyer revenue.
> * A call that converts for the publisher but not the buyer can have no revenue when Split Conversions are on.

> [accordion] Many calls share one click ID
>
> The pool is too small or the lease time too long, so Retreaver reuses numbers before the earlier tags expire. Increase the pool size and check Retreaver's pool emails.

***

## FAQ

> [accordion] Does ClickFlare integrate with Retreaver?
>
> Yes, through ClickFlare's S2S postback fired by a Retreaver webhook. There's no native integration and nothing to install on the ClickFlare side.

> [accordion] Is there a native Retreaver integration in ClickFlare?
>
> No. The connection is ClickFlare's S2S postback, fired by a Retreaver webhook. Nothing to install on the ClickFlare side.

> [accordion] Can Retreaver send ClickFlare a JSON body instead?
>
> ClickFlare accepts a JSON POST on the same endpoint, but Retreaver's standard webhooks work with URL parameters. JSON bodies need Retreaver's **Webhook Configurator**, which is built around templates and ping/post flows. The URL postback above is simpler. If you do build a JSON body, include `txid` with `[call_uuid]` so each call stays its own conversion.

> [accordion] Can I use direct tracking instead of a redirect?
>
> With direct tracking the click ID isn't in the lander URL, so a Parameter Mapper can't read it. Retreaver.js lets a developer add tags to the displayed number with `add_tags()`. You'd need custom code that reads the ClickFlare click ID on the page and adds it as the `clickid` tag. Test this with a few calls before relying on it. See [Direct tracking](/docs/en/tracking/direct-tracking-clickflare.md).

> [accordion] Can I set this webhook once for all campaigns?
>
> Retreaver has **Default Webhooks** under **Settings → Company → Edit**. They're applied to campaigns you create afterwards, not to existing ones.

> [accordion] Can I send the call conversion to my traffic source?
>
> Yes. Once ClickFlare records the call, it can pass it to the traffic source through that source's postback or conversion API integration. Nothing changes in Retreaver.

***

## Related

> [card] [Ringba](/docs/en/integrations/how-to-track-ringba-pay-per-call-campaigns-with-click-flare.md)
>
> Another pay-per-call setup

> [card] [Custom conversions](/docs/en/settings/custom-conversions.md)
>
> One ct per call outcome

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