
sub1 parameter, Next Commerce stores it on the order, and the order comes back to ClickFlare in one of two ways:
- Server-side (recommended): the
order.createdwebhook sends the order, with its attribution, to Zapier or Make, which calls your ClickFlare postback. - Browser: a
checkout_completedevent tracker in your store calls the postback from the buyer’s browser.
At a glance
To set up Next Commerce with ClickFlare:- Set up a tracking domain and campaign.
- Create the store as an offer with sub1.
- Create the catch URL and webhook.
- Place a test order.
- Send the postback.
How the data flows
What you’ll need
- A ClickFlare account with your own tracking domain. Shared domains get flagged by ad platforms and blocked by browsers. See Tracking domains.
- Access to Settings in your Next Commerce store.
- For the server-side route: a Zapier or Make account. See the Zapier and Make guides.
Setup
Set up your own tracking domain
trk.yourdomain.com before anything else. The postback is built on it. See Tracking domains.Create the custom conversion (optional)
sale, Include in Conversions and Include in Revenue turned on. Add Upsell (upsell) too if you report upsells separately. The value in ct must match exactly. See Custom conversions.Create the campaign
Create the store as an offer with sub1
sub1:https://yourstore.com/checkout/add/?product=12:1&sub1={cf_click_id}. Next Commerce reads attribution on storefront checkout and product pages.If you run a lander first, its CTA must link to the ClickFlare click URL. Save the campaign and use its URL in your ads.Choose how the order reaches ClickFlare
Route 1: order.created webhook
Next Commerce sends webhooks as a fixed JSON body with its own field names, and the receiving URL must answer with a 200 status. Zapier or Make sits in between and turns it into a ClickFlare postback.Create the catch URL
Create the webhook in Next Commerce
order.created event trigger. Save.Place a test order
data, find number, total_incl_tax and the attribution object with subaffiliate1, which should hold your click ID.Send the postback
subaffiliate1 has a value; orders without a ClickFlare click have nothing to match. Turn the Zap or scenario on.txid, a retried order replaces itself in ClickFlare instead of counting twice. You can check deliveries under Settings → Webhooks, then Actions → Detail on the webhook.
/cf/cv with cf_click_id, payout, txid, ct and param1 to param20, for example {"cf_click_id": "SUBAFFILIATE1", "payout": "TOTAL_INCL_TAX", "txid": "NUMBER", "ct": "sale"} with the same fields mapped. Either form works. Keep the order number in txid: it is what keeps retries from double counting. See Postback parameters.Route 2: checkout_completed event tracker
Event trackers are JavaScript that runs in the buyer’s browser and subscribes to storefront events. No Zapier or Make needed, but ad blockers can stop it, and it only covers storefront checkouts. Go to Settings → Tracking Events → Add Event Tracker and paste:trk.yourdomain.com with your tracking domain, and remove &ct=sale if you skipped the custom conversion. Event trackers are pure JavaScript, so don’t wrap the code in <script> tags.
Attribution behavior
How Next Commerce keeps the click ID decides which click gets the order:- Last click by default. A returning visitor’s new link overwrites the earlier values. To keep the first click instead, add
clear_attribution=falseto the offer URL. New values are then added next to the old ones, and a repeated key such assub1still takes the newest value. - One-day cookie.
sub1is kept in theAffiliateDatacookie, which expires after one day. A buyer who comes back later without a new click loses it. - Saved on the cart. Attribution moves from the cookie to the store’s database when a cart is created and linked to a customer, and from there onto the order.
sub2 to sub5 for other values, for example sub2={campaign_id}. If you use a different sub for the click ID, change subaffiliate1 to match in the postback.
Upsells and test orders
- Upsells: order lines carry an
is_upsellflag. If your funnel adds post-purchase upsells to the order afterorder.createdfires, they won’t be in that first payload. Test one upsell order and check whether it arrives as anorder.updatedevent before you build on it. Send upsells with their ownct=upselland atxidsuch asNUMBER-upsell. - Test orders: Next Commerce’s sample order data includes an
is_testflag. If your payload has it, add a filter on it in Zapier or Make so test orders stay out of ClickFlare. - Currency:
total_incl_taxis in the order’s currency. Theorder.createdpayload also has areporting_valuesobject with totals for reporting. If you sell in several currencies, check which one fits your ClickFlare offer currency.
Verify the setup
Click through the campaign
sub1= followed by a long ID, not the text {cf_click_id}.Place a test order
/cf/cv.Check ClickFlare
txid is the order number.Troubleshooting
subaffiliate1 is empty on the order
subaffiliate1 is empty on the order
- The offer URL is missing
sub1={cf_click_id}, or the lander CTA links straight to the store instead of the ClickFlare click URL. - More than a day passed between the click and the order, and the
AffiliateDatacookie expired. - A later visit through another link replaced the value (last click). Use
clear_attribution=falseif you want the first click kept.
Webhook deliveries fail
Webhook deliveries fail
Orders are counted twice
Orders are counted twice
txid. Keep one route and send the order number as txid.Conversions arrive without a campaign
Conversions arrive without a campaign
subaffiliate1, not another sub field, and see Troubleshooting S2S postbacks.FAQ
Does ClickFlare integrate with Next Commerce?
Does ClickFlare integrate with Next Commerce?
Can I use direct tracking for Google Ads?
Can I use direct tracking for Google Ads?
sub1 on the way to the store. See Direct tracking.Are refunds reported?
Are refunds reported?
Can I send the order back to my traffic source?
Can I send the order back to my traffic source?