Tracking and attribution

Send conversions from ClickFlare

Point a ClickFlare conversion webhook at the Koast pixel's server-side endpoint, so conversions tracked in ClickFlare reach your Koast ad account.

ClickFlare isn't a Koast integration: there's nothing to connect inside Koast. Instead, you set up a webhook in ClickFlare that sends each conversion to the Koast pixel's server-side endpoint, using a key you create in Koast. It's a plain JSON request, so you don't need any middleware or code.

Koast ad account

Before you start

  • This is for Koast ad accounts, which are provided through our partner Whop. On a Meta ad account you use your own Meta pixel, so set up ClickFlare's Meta integration against Meta's endpoint instead.
  • The Koast browser pixel must already be on your site and firing. See Set up the Koast pixel.
  • Create a server-side key in Settings, Pixel, under Server-side tracking. See Server-side conversions.
  • Note your ad account ID from the Pixel tab. It must be the same account the browser pixel and the key belong to.
  • You need access to webhooks in your ClickFlare workspace, under Integrations, Conversion API at the time of writing. ClickFlare renames its menus from time to time.

Set up the webhook in ClickFlare

These steps happen in ClickFlare. ClickFlare renames its menus from time to time, so the labels may differ slightly.

  1. Go to Integrations, Conversion API, Add Integration, and pick Webhooks.

  2. Choose the event that counts as your conversion, such as Conversion, Purchase or a custom event, and set the method to POST.

  3. Set the URL to https://api.whop.com/api/v1/events.

  4. Under Advanced Configuration, Headers, add Authorization: Bearer YOUR_KOAST_KEY, with your server-side key in place of YOUR_KOAST_KEY. ClickFlare sets the content type for JSON bodies itself.

  5. Paste the body below, put in your own account_id, and pick each macro from ClickFlare's dropdown rather than typing it.

  6. Save and fire a test conversion. Events show up in Koast within about 15 minutes.

{
  "account_id": "biz_7Qm2NimbusSleep",
  "event_name": "lead",
  "event_id": "{txid}",
  "value": {payout},
  "currency": "{payout_currency}",
  "action_source": "website",
  "user": { "email": "{email}" },
  "context": {
    "fbclid": "{external_id}",
    "ip_address": "{ip}",
    "user_agent": "{user_agent}"
  }
}

Set event_name to the event that matches this conversion: lead, complete_registration, submit_application, schedule, contact, view_content, add_to_cart or purchase. event_id must resolve to the same ID the browser pixel sends for the same conversion.

Why conversions don't count

ProblemWhat happens
event_name isn't a supported eventThe conversion isn't recorded as one of your tracked events.
event_id doesn't match the browser pixel's IDThe conversion is counted twice.
{txid} isn't filled inEvery event carries the same ID, and all but the first are dropped as duplicates.
The IP address is longer than 45 charactersThe event is rejected. Send only the first address if ClickFlare passes a chain.
You resend Whop checkout purchasesPurchases through Whop checkout are already tracked, so they're counted twice.
account_id doesn't match the key's ad accountThe key only accepts its own ad account, so the event is refused.

Don't remove the browser pixel. Server-side events add to it, and matching the two is what stops conversions being counted twice.

On this page