
REPLACE placeholders and depends on a pixel ID the template doesn’t fill. This guide goes through each one.
At a glance
How it works
1
Kwai sends the click
A visitor clicks your ad. Kwai opens your ClickFlare campaign URL and fills in its macros: the click ID in
click_id, plus the campaign, ad set and creative names.2
ClickFlare stores the Kwai click ID
ClickFlare saves the value of
click_id as the visit’s External ID and redirects the visitor to your lander or offer.3
The conversion reaches ClickFlare
Your affiliate network or store posts the conversion back to ClickFlare, matched on the ClickFlare click ID.
4
ClickFlare posts it back to Kwai
ClickFlare fires the Kwai postback, replacing
{external_id} with the stored Kwai click ID. Kwai records the event on your pixel and matches it to the original click.The mirror to keep straight: in the campaign URL you write ClickFlare’s parameter (
click_id) and Kwai’s macro (__CALLBACK__). In the postback URL you write Kwai’s parameter (clickid, no underscore) and ClickFlare’s token ({external_id}).Before you start
- Set up your own tracking domain. Run the campaign and the postback on your own custom domain. Shared domains get flagged by networks and blocked by browsers. See Custom Domains.
- Have an offer ready in ClickFlare, and its affiliate network set up to post conversions back to ClickFlare. See Creating an Offer and Adding an Affiliate Network.
- Create a Kwai pixel in Developer Mode. In Kwai for Business, click Assets, then Web Events, then Set up Web Events. Name the pixel, choose the Kwai Pixel card and Manually Install Pixel Code, click Next, choose Developer Mode and click Create. Note the pixel ID.
- Get the pixel’s access token. The postback authenticates with it. You find it in the pixel’s settings in Kwai for Business.
- Decide which conversions Kwai should receive. Kwai optimizes on the event you choose for the ad set. If your funnel has several steps (lead, then sale), decide now whether to send one event or several. See Tracking several events.
Step 1 – Create the campaign and the Kwai traffic source
- Go to Campaigns and click New.
- In Traffic Source, open the dropdown and click + New Traffic Source.
- Type
kwaiin the search box and select the Kwai template. - Enter a Name, for example
Kwai. - Set Cost currency to the currency your Kwai for Business account is billed in, for example BRL or USD. See Multicurrency in ClickFlare.

The click ID row
The External ID row is already filled in: TS Parameterclick_id, TS Token __CALLBACK__. Leave it as it is.
Kwai replaces __CALLBACK__ with a coded string that identifies the click and carries the information Kwai needs to match the conversion. It can be long. Pass it through unchanged.
The ID rows
The Campaign ID, Ad Set ID and Creative ID rows have parameters but no Kwai macro. If Kwai offers ID macros in your account’s URL parameter settings, enter them as the TS Token of each row. If not, remove the three rows, or leave them: they stay empty and do no harm. The name rows already identify each campaign, ad set and creative.The Pixel ID row
The template’s postback reads the pixel ID from tracking field 7, thepixel_id row. That row has no macro, because the pixel ID is not something Kwai fills in per click. You have two ways to deal with it. Option 1 is simpler.
- Hard-code it in the postback (recommended). In Step 2, replace
{trackingField7}in the postback with your pixel ID. You can then leave the Pixel ID row as it is. - Pass it in the campaign URL. Enter your pixel ID as the TS Token of the Pixel ID row. Kwai doesn’t recognize it as a macro and leaves it as it is, so every click arrives with
pixel_id=your pixel ID, and the postback picks it up. Use this if campaigns on the same traffic source report to different pixels.
Step 2 – Set up the postback
The postback is what sends conversions to Kwai. It lives on the traffic source, so every campaign that uses this Kwai traffic source sends conversions the same way.- In the New Traffic Source form, scroll to Passing conversion info to traffic source.
- Turn on Traffic source postback URL. The template’s postback appears:

{external_id}) as a ClickFlare token. Replace the rest:
Leave
mmpcode, pixelSdkVersion, is_attributed, testFlag and trackFlag as they are. The result, for a purchase:
- In the dropdown on the left, choose the ClickFlare event that should fire the postback. Keep Conversions to send every conversion. If your final action is a custom conversion (for example
purchase), choose that instead. - Click Save. You are back in the campaign editor with the Kwai traffic source selected.
Use the event your Kwai ad set optimizes for. The name in the postback must match it exactly.
The template’s postback sends no payout, so Kwai sees conversion counts but no revenue. Kwai’s value parameter for this endpoint isn’t part of the template. Ask your Kwai account manager for it before adding one.
To learn what each postback token does, see How to Configure a Traffic Source S2S Postback URL.
Step 3 – Finish the campaign and copy its URL
- Name the campaign.
- Set the Cost Model to CPC and enter your expected cost per click. See Cost.
- Choose Redirect or Direct tracking. Redirect is the usual choice.
- Click Next and, on Destination, add your lander (optional) and your offer.
- Save, open Tracking, select your own tracking domain and copy the campaign URL.
click_id=__CALLBACK__ and CampaignName=__CMPN__.
If you use a lander, its call-to-action must link to the ClickFlare click URL, not to the offer directly. Otherwise the visit reaches the offer without a ClickFlare click ID, and the conversion cannot be traced back to Kwai.
See Creating a Campaign in ClickFlare.
Step 4 – Create the campaign in Kwai for Business
- In Kwai for Business, create a campaign and an ad set as usual.
- Choose a conversion objective and select the pixel you created, with the event you send in the postback.
- Paste the ClickFlare campaign URL into the ad’s destination URL field.
- Submit the ad for review.
__...__ macro when the ad is clicked.
Step 5 – Test the integration
- Open your campaign URL in a browser and replace
__CALLBACK__with a test value, for exampleclick_id=test123. In ClickFlare, check that the visit’s External ID istest123. - Complete the offer the way a real visitor would. The conversion should appear in ClickFlare against that visit.
- Go to Logs → Postback Status and filter by the campaign. Check the postback to
adsnebula.com: it should contain your access token, your pixel ID andclickid=test123, with noREPLACEleft. - After launch, check your pixel’s events in Kwai for Business. Real events only show for real Kwai click IDs. A test value like
test123reaches Kwai but won’t match a click.
Tracking several events
Kwai records eachevent_name as a separate event. Each event needs its own postback:
- In ClickFlare, create a custom conversion for each step, for example
leadandpurchase. - On the Kwai traffic source, click + Another postback URL once per extra event.
- Map each postback to its ClickFlare event: the
leadcustom conversion to theEVENT_COMPLETE_REGISTRATIONURL,purchaseto theEVENT_PURCHASEURL. - In Kwai for Business, choose which event each ad set optimizes for.
Rules for multi-event postbacks
Rules for multi-event postbacks
- One postback per event. Don’t combine events in one URL.
- Use Kwai’s standard event names exactly, in capitals.
- Every postback needs the same access token and pixel ID.
- The event dropdown offers Conversions, Clicks and Visits, plus your custom conversions. Map each postback to one.
Sending only one event
Sending only one event
If Kwai should only learn from your final sale, keep a single postback and map it to that event. Earlier steps (leads, add to carts) still show in ClickFlare. They just don’t reach Kwai.To send a postback only for some conversions, for example only those above a certain payout, use Event filter under the postback to add conditions.
Cost
The template has a Cost row, but its parameter and macro are empty, so Kwai passes no cost in the URL. ClickFlare can’t read cost from the click. Set the campaign’s Cost Model to CPC and enter your expected cost per click. If you buy on CPM, a video impression is not a visit, so work out the cost per click: CPM ÷ (1,000 × click-through rate). Check it against your Kwai spend after a few days and adjust. For exact spend, export the daily cost per campaign from Kwai for Business and import it with a manual cost upload. The Campaign Name column helps you match the rows. See Cost Models.Delayed revenue
If you run search arbitrage (RSOC or AFD) behind Kwai, the feed reports revenue hours or days after the click. To fire the Kwai postback once that revenue arrives, see Sending Delayed Revenue to Traffic Sources. Since the template sends no value, Kwai receives the event, not the amount.Troubleshooting
The postback has clickid= empty
The postback has clickid= empty
- The campaign URL was edited, so
click_id=__CALLBACK__is missing or changed. Copy the campaign URL again from ClickFlare. - The ad in Kwai uses an older or hand-typed URL without
click_id=__CALLBACK__. - The External ID row was changed. Its TS Token should be
__CALLBACK__. - The postback uses a Kwai-side placeholder instead of ClickFlare’s
{external_id}.
Conversions show in ClickFlare but not in Kwai
Conversions show in ClickFlare but not in Kwai
- Traffic source postback URL is off on the Kwai traffic source.
- Disable sending postbacks to traffic source is on in the campaign.
access_tokenorevent_namestill saysREPLACE.pixelIdis empty: the postback still uses{trackingField7}and the Pixel ID row has no value.- The event name doesn’t match the event the Kwai ad set optimizes for.
- Check Logs → Postback Status: a failed request shows the status code Kwai returned.
Kwai shows conversions with no value
Kwai shows conversions with no value
Expected. The template’s postback sends no payout. ClickFlare still records the revenue in your reports.
Campaign ID, Ad Set ID or Creative ID columns are empty
Campaign ID, Ad Set ID or Creative ID columns are empty
Expected. Those rows have no Kwai macro in the template. Use the name columns, or add the ID macros if your Kwai account offers them. If the name columns are empty too, the URL was edited or pasted somewhere Kwai doesn’t process macros. See Traffic Source Tokens Arriving Empty.
FREQUENTLY ASKED QUESTIONS
Q1: Can I use the same Kwai traffic source for all my Kwai campaigns?A1: Yes, as long as they report to the same pixel. The postback is set once on the traffic source. If campaigns use different pixels, either create one traffic source per pixel, or use the Pixel ID row to pass each campaign’s pixel ID in its URL.
Q2: Why is itA2: They are two halves of the same value. ClickFlare reads Kwai’s click ID from its ownclick_idin the campaign URL andclickidin the postback?
click_id parameter. Kwai expects it back in its own clickid parameter. Change neither.
Q3: Do I still need the Kwai pixel code on my site?A3: Not for the postback. It sends each event to your pixel server to server, so it works on offers whose pages you don’t control. You need the Developer Mode pixel for its ID and access token.
Q4: Should I use Redirect or Direct tracking with Kwai?A4: Redirect is the usual choice. Use Direct only if Kwai must see your lander’s domain as the destination. See Direct Campaign Tracking.
Q5: Is my access token safe in the postback?A5: The postback is stored on your traffic source and sent from ClickFlare’s servers to Kwai. It never appears in your ad or campaign URL. Treat it like a password anyway: don’t share screenshots of the postback.
Related
Traffic source postbacks
Every token you can use in a postback.
Custom conversions
Split leads and sales into separate events.
Cost models
How CPC, CPA and RevShare costs are calculated.
Conversions not showing
The general checklist when postbacks don’t arrive.