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.
Ad blockers and cookie rules hide some conversions from any browser pixel. Server-side conversions close that gap: your server, or your tracker, sends the conversion straight to the Koast pixel with a key you create in Koast. Keep the browser pixel in place too. The two work together.
Before you start
- This is for Koast ad accounts, which are provided through our partner Whop.
- Set up the browser pixel first. See Set up the Koast pixel.
- You need someone who can change your server code or your tracker's settings.
Create a key
Open Settings, then Pixel, and scroll to Server-side tracking, marked Optional.
Select Create key. Type a name you'll recognise, for example "Checkout server", and select Create key again. Names are 2 to 60 characters.
Select Copy key and store the key somewhere safe. It's shown once, so copy it now.
Select I saved it. The key stays listed with its first characters and Active, and the count goes up, for example 1 of 3 keys created.
Select API instructions to copy a ready-made set of instructions, with your ad account ID already filled in, for your developer or an AI coding agent.
Up to 3 keys per ad account
A key works only for the ad account it was created on, and it can only send conversions. You can't delete keys from Koast yet. If you've used all 3 and need another, message us.
Send an event
Send a POST request to https://api.whop.com/api/v1/events with your key in the Authorization header:
curl -X POST https://api.whop.com/api/v1/events \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"account_id":"biz_7Qm2NimbusSleep","event_name":"lead","event_id":"order_1234",
"value":49.99,"currency":"usd","action_source":"website",
"user":{"email":"buyer@example.com"},
"context":{"fbclid":"...","ip_address":"...","user_agent":"..."}}'The event is acknowledged right away and shows up within about 15 minutes.
| Field | What to send |
|---|---|
account_id | Your ad account ID, as shown on the Pixel tab. Always send it. The key only accepts that account. |
event_name | One of the supported events below. |
event_id | The same ID the browser pixel sends for this conversion, and unique per conversion. |
value, currency | The conversion value. For purchase, the value must be greater than zero. |
action_source | Where it happened, usually website. |
user | As many match keys as you have: email, phone, external_id. |
context | As much attribution as you have: fbclid, fbp, fbc, gclid, ttclid, ip_address, user_agent, utm_source, utm_medium, utm_campaign. |
Supported events: lead, complete_registration, submit_application, schedule, contact, view_content, add_to_cart and purchase.
Rules that keep your numbers right
- Match the browser pixel's
event_id. When the browser and your server report the same conversion with the sameevent_id, it's counted once. Different IDs count it twice. - Keep
event_idunique per conversion. If a macro such as{txid}isn't filled in, every event carries the same ID and all but the first are dropped as duplicates. - Send one IP address, 45 characters at most. If your tracker sends a comma-separated chain of addresses, send only the first one. Anything longer is rejected with "ipAddress is too long (maximum is 45)".
- Don't resend Whop checkout purchases. Purchases through Whop checkout are already tracked. Send
purchaseonly for sales on your own checkout.
Send conversions from a tracker
Trackers like RedTrack, Voluum and BeMob send conversions as a postback: a plain GET URL with macros in it. The events endpoint needs a POST with your key in the Authorization header, which a postback can't carry. So put a small relay in between, such as a Zapier or Make webhook, or a short script on your own server.
Koast's RedTrack, Cometly and Hyros integrations only read data into Koast. They don't send conversions anywhere, so you still need this relay.
Create a webhook in Zapier (Webhooks by Zapier, Catch Hook) or Make (Custom webhook) and copy its URL.
In your tracker, set that URL as the postback URL for your traffic source, with the tracker's macros as query parameters, for example
https://hooks.example/abc?txid={txid}&payout={payout}&fbclid={fbclid}&ip={ip}&ua={ua}. Macro names differ per tracker, so pick them from its list.Add a step that sends a
POSTtohttps://api.whop.com/api/v1/eventswith the headersAuthorization: Bearer YOUR_KEYandContent-Type: application/json, and a JSON body built from the query parameters, mapped as below.Fire a test conversion in your tracker. It shows up within about 15 minutes.
| Body field | Fill it with |
|---|---|
account_id | Your ad account ID from the Pixel tab, typed in, for example biz_7Qm2NimbusSleep. |
event_name | The event, typed in, for example lead or purchase. |
event_id | The tracker's order or transaction ID, for example {txid}. It must be different for every sale. |
value, currency | The payout or sale amount and its currency. |
action_source | website. |
context.fbclid | The click ID your tracker captured from the ad click, for example {fbclid}. |
context.ip_address | The visitor's IP address. Only the first one if the tracker sends a list. |
context.user_agent | The visitor's browser user agent. |
user.email | The buyer's email, if the tracker has it. |
Leave utm_source and utm_medium off your ad links
Whop adds utm_source and utm_medium to every click itself and rejects an ad whose destination URL already has them, so Koast stops the launch and asks you to remove them. If your tracker's link template uses them, pass those values in the tracker's own parameters instead. The same applies to utm_content, utm_placement and utm_adset.
Using ClickFlare? It can send the POST itself, with no relay. See ClickFlare.
Seed your pixel with past conversions
Send the conversions you already have from the last 28 days to a new Koast pixel, so it starts with history instead of from zero.
RedTrack
Connect RedTrack so Agent Tasks can act on its conversions, revenue and profit, and push your live ad spend into RedTrack every hour.