Skip to main content
SamCart and ClickFlare Integration SamCart is a checkout and sales page platform. It hosts your checkout pages, order bumps, one-click upsells and the order summary page. ClickFlare tracks the ad click. This guide connects the two so every SamCart sale is attributed to the campaign, traffic source and ad that brought the buyer. Data moves from SamCart to ClickFlare, in one of two ways:
  • Server-side (recommended): SamCart’s webhook sends each order to Zapier or Make, which reads the click ID SamCart saved with the order and calls your ClickFlare postback.
  • Browser: an order script in each SamCart product fires a conversion to ClickFlare when the buyer reaches the order summary page.
The server-side route is more reliable. It runs on SamCart’s servers, so ad blockers, cookie limits and buyers who close the tab before the order summary loads don’t lose the sale. It is also the only route that can report refunds.

At a glance

To set up SamCart with ClickFlare:
  1. Add a tracking domain and conversions.
  2. Create the campaign and SamCart offer.
  3. Install Webhooks in SamCart.
  4. Add the webhook rules.
  5. Send the postback to ClickFlare.
Each step is explained in Setup.

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 your SamCart marketplace settings, products and Apps.
  • For the server-side route: a Zapier or Make account. See the Zapier and Make guides.

Setup

1

Set up your own tracking domain

Add a custom tracking domain such as trk.yourdomain.com before anything else. The postback and the scripts are built on it. See Tracking domains.
2

Create the custom conversions

Go to Settings → Custom Conversions and click Add for each event you want as its own column. The parameter is the value you send in ct, and the two must match exactly.See Custom conversions.
3

Create the campaign and the SamCart offer

Go to Campaigns → New Campaign, pick your traffic source and tracking domain, and choose Redirect tracking. In the path, create the offer inline with your SamCart checkout link and the click ID:
SamCart captures any parameter on the checkout link, not only UTM tags, and shows it on the order under Show all parameters. You don’t need to set anything up in SamCart for this.
Keep the braces: {cf_click_id}. Without them SamCart saves the literal text cf_click_id and nothing can be matched.
If you run a lander first, its CTA must link to the ClickFlare click URL. If your checkout is embedded on your own site or opens as a slide-in, add SamCart’s landing page script to the page your ads link to, so the parameters carry into the checkout. Save the campaign and use its URL in your ads. See Creating a campaign.
4

Choose how SamCart reports the sale

Set up one of the two routes below. Don’t run both for the same product, or each sale is reported twice.

Route 1: Webhook through Zapier or Make

SamCart’s webhook sends a fixed JSON body with its own field names, so it can’t post to ClickFlare directly. Zapier or Make sits in between and turns it into a ClickFlare postback.
1

Create the catch URL

In Zapier, start a Zap with Webhooks by Zapier → Catch Hook. In Make, start a scenario with a Custom webhook. Copy the URL it gives you.
2

Install Webhooks in SamCart

In SamCart, click Apps in the left navigation, search for Webhooks and click Install. Paste the catch URL as the Notify URL, including https://, and click Connect.
3

Add the rules

On the Webhooks page, click + Add New Rule. Choose Global Rule for all products or Product Specific Rule, then pick the action and trigger:Order completed sends the whole order once, with every product in it. Its order.total is the full basket. If you also send upsells separately, report the sale with the front-end value instead, or the upsell revenue counts twice.
4

Place a test order and find the click ID

Click through your ClickFlare campaign URL and buy in Test Mode. Open the received request in Zapier or Make. SamCart sends attribution data in an attribution_enhanced object. Find your click_id value in it and note the field path. SamCart doesn’t document the exact layout of that object, so map it from a real sample.
5

Send the postback to ClickFlare

Add an action that calls your postback with a GET request (Webhooks by Zapier → GET, or Make’s HTTP → Make a request):
Map CLICK_ID to the field you found, ORDER_TOTAL to order.total and ORDER_ID to order.id. For upsells use ct=upsell, the product’s price as payout and ORDER_ID-PRODUCT_ID as txid, so each upsell on the same order stays a separate conversion. Turn the Zap or scenario on.
ClickFlare also accepts a JSON POST to /cf/cv with cf_click_id, payout, txid, ct and param1 to param20, for example {"cf_click_id": "CLICK_ID", "payout": "ORDER_TOTAL", "txid": "ORDER_ID", "ct": "sale"} with the same fields mapped. Either form works. Keep the order ID in txid: it keeps repeated deliveries from counting twice. See Postback parameters.

Refunds

Send refunds as their own conversion with ct=refund and a negative payout, for example payout=-47.00. A different ct adds a new row instead of replacing the sale, so the refund stays visible in its own column and net revenue drops. SamCart sends partial refunds as a separate trigger, Product partially refunded. SamCart notes that refund events carry less data than orders. Check a real refund in your Zap: if it has no attribution data, the Zap has to find the click ID another way, for example by looking up the original order.

Route 2: Order script in SamCart

1

Add the ClickFlare script to every checkout

Copy the tracking script from the campaign’s Tracking tab. In SamCart, click the person icon (or your logo) at the top right, choose Settings, open Tracking and Pixels and paste it in Embed HTML/Scripts in Header on its own line. Click Save Changes. SamCart adds it to the header of every checkout.
2

Add the conversion script to each product

In ClickFlare, go to Settings → Tracking URLs and copy the JavaScript conversion script. Remove the click_id=OPTIONAL placeholder and put SamCart short codes in the URL:
In SamCart, open the product, go to its Advanced tab and paste the script in Fire Pixels/Scripts After An Order is Completed. SamCart renders it whenever that product is part of a purchase. See Conversion tracking pixel.
3

Add scripts to bump and upsell products

An order with a bump or upsell fires the script of every product in it. Give the main product the ##total_amount## script above, and give bump and upsell products their own script with their price and a unique transaction ID:
If the main product reports ##total_amount##, the bump and upsell value is already in it. Pick one approach per funnel so revenue isn’t counted twice.
4

Using your own thank-you page

If buyers go to an external thank-you page instead of SamCart’s order summary, open your marketplace settings and turn on Fire Pixels Before Redirect. Otherwise the order scripts don’t render.
The order script reads the click ID from a cookie. SamCart’s order summary can live on a different subdomain from the checkout (MARKETPLACENAME.samcart.com/order_summary), and the script then can’t see the cookie. Test with a real click before you rely on this route. If the conversion arrives without a campaign, use Route 1.

SamCart short codes

Short codes don’t include URL parameters, so the click ID can’t come from a short code.

Verify the setup

1

Click through the campaign

Open the ClickFlare campaign URL. The SamCart checkout URL should show click_id= followed by a long ID.
2

Place a test order

Switch the product to Test Mode and buy. No money is charged, and SamCart fires webhooks and scripts as it would for a real buyer.
3

Check SamCart

Go to Sell → Orders, open the order and scroll to Attribution. Show all parameters should list your click_id. The Events section shows whether the webhook was delivered.
4

Check ClickFlare

The sale should appear on the campaign with its revenue. In Logs → Event Logs, check the txid and ct.

Troubleshooting

Open the order’s Events section, or Apps → Installed Apps → Webhooks and its Logs (the last 1,000 events). Check that a rule exists for the trigger and, for a product-specific rule, for that product.
The click ID was missing or wrong. Check that the offer URL has click_id={cf_click_id} with braces, that the lander CTA uses the ClickFlare click URL, and that the Zap maps the click ID field from the attribution data, not a UTM field.
Both routes are active, or the main product reports the order total while the upsell is reported again. Use one route, and one revenue approach.
Save your changes, disable ad blockers while testing, and turn on Fire Pixels Before Redirect if you use an external thank-you page.

FAQ

Yes. SamCart saves the ClickFlare click ID from the checkout link with each order. A SamCart webhook through Zapier or Make, or an order script in each product, reports the sale to ClickFlare.
SamCart says its attribution data is also sent to Zapier, so a Zap triggered by SamCart’s own app can work the same way. Check that the click ID is in the trigger sample before you build on it.
The setups above report the first order. SamCart has a Subscription charged trigger for recurring charges; you can send it as its own ct if it carries the attribution data. Test with one renewal first.
Yes. Once ClickFlare records the sale, it can pass it to the traffic source through that source’s postback or conversion API integration.

Zapier

Map webhooks to postbacks

Postback parameters

click_id, txid, ct

Custom conversions

Sale, upsell and refund columns