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 accountBefore 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.
Go to Integrations, Conversion API, Add Integration, and pick Webhooks.
Choose the event that counts as your conversion, such as Conversion, Purchase or a custom event, and set the method to POST.
Set the URL to
https://api.whop.com/api/v1/events.Under Advanced Configuration, Headers, add
Authorization: Bearer YOUR_KOAST_KEY, with your server-side key in place ofYOUR_KOAST_KEY. ClickFlare sets the content type for JSON bodies itself.Paste the body below, put in your own
account_id, and pick each macro from ClickFlare's dropdown rather than typing it.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
| Problem | What happens |
|---|---|
event_name isn't a supported event | The conversion isn't recorded as one of your tracked events. |
event_id doesn't match the browser pixel's ID | The conversion is counted twice. |
{txid} isn't filled in | Every event carries the same ID, and all but the first are dropped as duplicates. |
| The IP address is longer than 45 characters | The event is rejected. Send only the first address if ClickFlare passes a chain. |
| You resend Whop checkout purchases | Purchases through Whop checkout are already tracked, so they're counted twice. |
account_id doesn't match the key's ad account | The 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.
Server-side conversions
Send conversions from your server to the Koast pixel with a server-side key, so ad blockers and cookie rules don't hide them.
Connect a Meta pixel to an ad account in Business Manager
Give an ad account access to your Meta pixel in Business Manager, so you can pick it when you launch from Koast.