Skip to main content
Pipedrive and ClickFlare Integration Pipedrive is a sales CRM built around a deal pipeline. Leads come in, become deals, move through stages and end as won or lost. The outcome you want to optimize on, a won deal and its value, is recorded in Pipedrive long after the ad click. This guide sends it back to ClickFlare:
  • ClickFlare → Pipedrive: ClickFlare passes its click ID to your page, and the lead or deal is created with the click ID in a custom field.
  • Pipedrive → ClickFlare: when the deal reaches the stage you choose, a Pipedrive automation sends a webhook to ClickFlare with that click ID and the deal value.
Each stage arrives as its own custom conversion, so leads, qualified deals and won deals show as separate columns next to your ad cost. An optional last section covers the reverse direction.

At a glance

To set up Pipedrive with ClickFlare:
  1. Create conversions, campaign and offer.
  2. Create the click ID custom field.
  3. Get the click ID into the field.
  4. Create the automation webhook.
  5. Build the automation and test.
Each step is explained in Setup.

How the data flows


What you’ll need

  • A ClickFlare account with your own tracking domain. See Tracking domains.
  • A Pipedrive plan with automations. Pipedrive’s article says automations and webhooks in automations are available on Advanced and higher plans; regular webhooks are on all plans. Pipedrive has recently renamed its plans, so check yours.
  • Global admin rights to create the automation webhook, and permission to add custom fields.
  • A way to get the click ID into Pipedrive with the lead. See the setup step for the options.

Setup

1

Set up your own tracking domain

Add a custom tracking domain, for example trk.yourdomain.com, under Tracking domains. The Pipedrive webhook points at it.
2

Create a custom conversion for each stage

In ClickFlare, go to Settings → Custom Conversions and create one per stage:The parameter of each custom conversion is the ct value Pipedrive sends. It must match exactly. See Custom conversions.
3

Create the campaign and add your page as the offer

Go to Campaigns → New Campaign and pick your traffic source and tracking domain. See Creating a campaign.In the campaign path, create a new offer inline with the page that holds your form:
Keep the braces. Set the offer payout to Auto so ClickFlare uses the deal value Pipedrive sends. Save the campaign and copy the campaign URL for your ads.
4

Create the click ID custom field

In Pipedrive, open the account menu, go to Personal preferences → Data fields, choose lead/deal and click + Custom field. Name it, for example ClickFlare click ID, and pick a text type.A lead/deal field follows the lead when it becomes a deal, which is what the webhook reads. If your form only creates persons, add the field to the person instead.
5

Get the click ID into the field

Your form must read cf_click_id from the page URL into a hidden field and send it with the lead. Pipedrive users report that Pipedrive’s own web forms don’t capture URL parameters into hidden fields, so check your current web forms first. The common setups are:
  • A form on your page (or a form builder) with a hidden field, sending submissions to Pipedrive through Zapier, Make or n8n, which create the lead with the custom field filled.
  • Your own backend creating the lead through the Pipedrive API with the custom field’s value.
Test with one lead and check the field before you go further.
6

Create the automation webhook

Go to the Webhooks page (under Tools and apps) and click + Webhooks → Automation webhook. Existing regular webhooks can’t be reused.
  • Name: something you’ll recognize in the automation, for example “ClickFlare postback”.
  • Endpoint URL: https://trk.yourdomain.com/
Pipedrive requires the endpoint URL to end with /, &, ? or =. Enter the base domain with a trailing slash and add the path in the automation. No authentication is needed.
7

Build the automation

Go to Automations and create one for deals, with the trigger and condition for your stage, for example a deal updated with status won.Add the webhook action and fill in:
  1. Webhook: the automation webhook you created.
  2. Method: POST.
  3. Body: choose Key-value and add:
  1. Path: cf/cv, so the request goes to https://trk.yourdomain.com/cf/cv.
ClickFlare reads cf_click_id, ct, payout, txid and param1 to param20 from a JSON body:
Pipedrive also has a Raw body for writing your own JSON. Use Key-value if you need Pipedrive fields in the body, since Pipedrive’s article only describes the field picker for the key-value builder.
8

Turn the automation on and test

Win a test deal that has a real click ID in the field. Then check the automation’s execution history: it shows the final body and path Pipedrive sent. Compare them with the example above, then check ClickFlare (see Verify the setup).

When you need a relay instead

Pipedrive’s automation webhook sends POST, PUT or DELETE only, so it can’t call ClickFlare’s GET postback. Put a relay in between when:
  • The execution history shows a body that isn’t plain JSON with your keys.
  • Your plan has no automations.
A relay (Zapier, Make or n8n) listens for the Pipedrive deal update, or receives the automation webhook, and calls the postback:

Stages, payout and duplicates

One stage, one ct. A conversion with a different ct on the same click is added as a new conversion. A deal that is created, qualified and won shows once in each of the three columns, so you see cost per lead and cost per won deal side by side. Payout from the deal value. Map payout to the deal value on the won webhook only. Send 0 on earlier stages so revenue isn’t counted twice. Repeats. Without txid, a second won on the same click counts as the same conversion. That protects you if a deal is reopened and won again. If one click can lead to several separate deals, add the deal ID as txid in the body so each counts. Choose what the ad platform sees. Each custom conversion is mapped to the traffic source postback separately, so you can send only won to the ad platform. Execution limits. Automation webhooks count toward Pipedrive’s automation execution limits. When the limit is reached, Pipedrive pauses webhook requests, and conversions arrive late or not at all. Watch this on busy pipelines.

Verify the setup

1

Click through the campaign

Open your ClickFlare campaign URL. The page URL should contain cf_click_id= and a real click ID, not the text {cf_click_id}.
2

Submit the form

Check that the new lead or deal in Pipedrive has the same ID in the custom field.
3

Win the deal

Mark the test deal won and open the automation’s execution history. The body should hold the click ID and value, and the path should be cf/cv.
4

Check ClickFlare

In Logs → Event Logs, the conversion should appear with ct set to won and the deal value as payout.

Send ClickFlare conversions to Pipedrive (optional)

To go the other way, for example to add a note to a deal when ClickFlare records a payment from your checkout, use the Custom Webhook integration. Go to Integrations → Conversion API → New integration, choose Webhooks, map the event, choose POST and put macros such as {cf_click_id} and {payout} in the body. Pipedrive has to find the deal by the click ID first. A relay such as Zapier, Make or n8n can receive the webhook, search deals by the click ID field and update the one it finds.

Troubleshooting

The URL must end with /, &, ? or =. Use https://trk.yourdomain.com/ and put cf/cv in the action’s path.
Pipedrive only offers the action when an automation webhook already exists, and only global admins can create one. Create it on the Webhooks page first.
  • The path is missing, so the request went to the domain root instead of /cf/cv.
  • The key is click_id instead of cf_click_id. JSON bodies use cf_click_id.
  • The custom field was empty on that deal.
  • The ct value doesn’t match a custom conversion’s parameter exactly.
See Troubleshooting S2S postbacks.
Pipedrive fails the execution if the webhook stops working or is missing permissions. Check the execution history for the error, and check whether you’ve hit your automation execution limits.

FAQ

Yes. The click ID is saved in a Pipedrive custom field, and an automation webhook posts it to ClickFlare with ct and the deal value when the deal reaches your stage.
Yes. Place the conversion tracking pixel on the thank-you page with ct=lead, and use Pipedrive automations only for later stages.
On the lead/deal, because the automation runs on the deal and reads its fields. Store it on the person too if one person can have several deals from different clicks: each deal should keep its own click ID.
Yes. Add param1 to param20 as keys in the body and map them to fields. ClickFlare stores them with the conversion.
Use a relay that watches deals, or export won deals with their click IDs and import them with Conversion Upload.

Custom conversions

One ct per stage

Custom Webhook

Send ClickFlare events out

Zapier

Relay without code