Tracking and attribution

ClickFlare

Connect ClickFlare to see its conversions and revenue next to your campaigns, and push your live ad spend into ClickFlare every hour.

Connect ClickFlare and Koast brings in its visits, conversions and revenue every hour, so you see what each campaign earned next to what it spent. Turn on the spend push and Koast also writes your live ad spend into ClickFlare, so its cost and ROI reports stop depending on cost you upload by hand.

Before you start

  • You need a ClickFlare API key.
  • Only the organization owner and admins can connect ClickFlare and change its settings. Everyone on the team sees the numbers.
  • Integrations are set per brand, so connect ClickFlare while the right brand is selected.
  • Your ClickFlare tracking links must pass the ad platform's campaign ID in one of ClickFlare's tracking fields, and ideally the ad set and ad IDs in two more. Your traffic source template in ClickFlare decides which field holds which ID.

Connect ClickFlare

  1. Open Settings, then ClickFlare under Integrations.

  2. Select Add API Key, paste your ClickFlare API key and connect. If ClickFlare refuses the key, you'll see "ClickFlare rejected this API key."

  3. Pick the ClickFlare workspaces to read. Leave it empty to read all of them. If Koast can't read your workspaces, you'll see "Could not read workspaces from ClickFlare." Select Try again. You can't continue until the list loads.

  4. Check the tracking fields. Koast suggests which field carries the campaign, ad set and ad ID. Change any that are wrong.

Right after you connect, Koast brings in the last 30 days in the background.

How Koast picks the tracking fields

Koast looks at the last 14 days of each of ClickFlare's 20 tracking fields and matches the values against the campaign, ad set and ad IDs of your own launches. The field with the most matching visits wins each role. If no field matches, Koast falls back to how your ClickFlare traffic source labels its fields. Anything it still can't place is left empty for you to pick.

A field you pick by hand is never changed by Koast, even when you reconnect.

See ClickFlare numbers next to your campaigns

ClickFlare's visits, conversions, revenue, cost, CPA, ROAS and ROI are Ads Manager columns, next to the Cometly and Hyros ones. Open Ads Manager, select Columns above the grid, and turn them on under ClickFlare. Koast matches them to your campaigns, ad sets and ads by the IDs in your tracking fields.

  • Updated every hour. Each hourly run re-reads the last 3 days, so late conversions are picked up.
  • Visits count as clicks. ClickFlare's visits, the landings on your tracking links, are the clicks behind CVR and CPC.
  • Blank means unknown, not zero. When a number can't be worked out, for example cost per conversion on a day with no conversions, Koast leaves it blank instead of showing 0.
  • Days follow your ClickFlare timezone, the one set in your ClickFlare account.

Push spend to ClickFlare

Koast reads each campaign's spend live from the ad platform and uploads it to the ClickFlare campaign it's mapped to. It's off until you turn it on, and it's set per brand.

Turn off ClickFlare's own Facebook cost sync

ClickFlare's Facebook integration can also update campaign cost. If it runs on a campaign Koast pushes to, each one overwrites the other's cost. In ClickFlare, turn off cost sync for every campaign Koast pushes spend to. Koast can't see that setting, so it can't do it for you.

  1. In Settings, ClickFlare, make sure the campaign tracking field is set. The push can't start without it.

  2. Turn on Push spend to ClickFlare.

  3. Check the mapping table, and pick a ClickFlare campaign for any row that has none.

The mapping table

Each row pairs a Koast campaign with the ClickFlare campaign its spend goes to.

  • Matched automatically. Koast finds the pair from the last 14 days of ClickFlare data, using the campaign tracking field. These rows refresh every hour.
  • Not matched. Campaigns with spend today or yesterday that Koast couldn't pair. Pick the ClickFlare campaign by hand. A campaign seen under two ClickFlare campaigns is listed here too, with both as options, because Koast won't guess.
  • Your pick wins. A campaign you mapped by hand is never changed by the automatic match. Clear your pick to hand it back.

Several Koast campaigns can share one ClickFlare campaign. Koast adds up their spend and uploads one total.

Some ClickFlare campaigns are kept out of the push on purpose, because uploading would write a wrong number:

ReasonWhat it means
The ClickFlare campaign is missingIt was deleted, or it's in a workspace Koast doesn't read. Pick another one.
Mixed timezonesThe Koast campaigns mapped to it spend in ad accounts with different timezones. Map them to separate ClickFlare campaigns.
Not in USDClickFlare takes manual cost in US dollars only, and one of the ad accounts spends in another currency.
Spend unavailableKoast couldn't read the spend of one of its campaigns. Uploading the rest would undercount it, so Koast waits for the next pass.
No visitsClickFlare only accepts cost for a campaign that had at least one visit that day.

When it runs

  • Today, every hour. Each upload sends the spend from midnight to now, in the ad account's timezone. ClickFlare replaces the earlier figure with the new one, so cost is never counted twice.
  • Yesterday, once more after the day closes. After 2:00 in the ad account's timezone, Koast uploads yesterday's final spend.
  • Koast waits a few seconds between uploads for the same ClickFlare key, and brands sharing a key share that queue.

When something goes wrong

  • ClickFlare rejects your key. Koast turns the push off for that brand and shows the error. Fix the key in ClickFlare, then turn the push back on.
  • Any other failure. Koast shows the last error and tries again on the next hourly pass.

Koast ad accounts

Koast ad account

ClickFlare has no connector for Koast ad accounts, so the spend push is how their cost gets into ClickFlare. Automatic matching can't find a pair for them: your tracking links carry Meta's campaign ID, and Koast only knows the Koast ad account's own campaign ID. Map those campaigns by hand.

For the same reason, ClickFlare's conversions and revenue can't be matched to a Koast ad account's campaigns, so its tracker columns stay empty.

Disconnect ClickFlare

In Settings, ClickFlare, select Disconnect under "Disconnect integration" and confirm. Koast deletes the key, the mappings and the push setting, and stops reading and pushing. The ClickFlare numbers already brought in stay.

Send conversions to the Koast pixel instead

Koast ad account

This is a separate setup from the integration above. ClickFlare can send each conversion straight to the Koast pixel's server-side endpoint with a key you create in Koast, so conversions tracked in ClickFlare reach your Koast ad account. It's a plain JSON request, with no middleware or code.

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

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