Shopify orders,traced back to the ad click

A ClickFlare script in your Shopify theme tracks product views and add-to-carts. Two Shopify webhooks report checkout creation and order creation. Each event lands on the original click, with revenue and product-level sales next to your ad cost.

SH
Shopify
E-commerce platform
At a glance
How it connects
theme.liquid script + 2 Shopify webhooks
What syncs
Product views, add to cart, checkout, sale, product sale
Sync schedule
Real time, per event
Key parameters
click_id={cf_click_id}, cpid={campaign_id}
Works with
Redirect and direct tracking, paid and organic traffic
Good to know
Both the script and the webhooks are required.
E-commerce platform
Theme script + webhooks
Product-level sales

See the whole Shopify funnel per ad

The full Shopify funnel

See view_content, add_to_cart, checkout and sale per campaign, so you know where shoppers drop off before they buy.

Revenue by product

The product_sale event reports item-level sales, so you see which products each campaign actually sells.

Organic sales attributed too

A dedicated organic campaign with the direct tracking script catches SEO, email and direct orders that would otherwise go untracked.
How it works

From ad click to profit per campaignattributed revenueattributed salesa matched conversion

01
Your ad
Visitor clicks
Ad on Shopify
02
ClickFlare
Click recorded
A unique cf_click_id is created
03
Your offer
Conversion
Lead, sale or custom event
04
ClickFlare
Sent back to Shopify
Through the Conversion API or postback
05
Cost API
Spend pulled in
Shopify cost matched to each campaign
01
Your ad
Shopify click
Macros fill the tracking URL
02
ClickFlare
Click recorded
Zone, site and device data stored
03
Offer or lander
Visitor converts
On your page or the offer
04
ClickFlare
Conversion logged
With payout and event type
05
Postback
Reported to Shopify
So its optimization sees the result
01
Your ad
Visitor clicks
Any traffic source
02
ClickFlare
Click recorded
A unique cf_click_id is created
03
Your article
Keyword block
Click ID passed to the feed
04
Results page
Paid click
Conversion fired to ClickFlare
05
Shopify API
Revenue matched
Pulled on a schedule and reconciled
01
Your ad
Visitor clicks
Any traffic source
02
ClickFlare
Click recorded
cf_click_id passed to the offer
03
Shopify
Offer or call
The network tracks the action
04
Shopify
Conversion
Lead, sale, call or rebill
05
Postback
Payout in ClickFlare
Matched to the original click
01
Your ad
Visitor clicks
Any traffic source
02
ClickFlare
Click recorded
A unique cf_click_id is created
03
Shopify
Store or funnel
Click ID kept through checkout
04
Events
View, cart, checkout
Each step tracked
05
ClickFlare
Purchase recorded
Order value matched to the ad
E-commerce platform

Script for browsing, webhooks for buying

The ClickFlare script, placed before the closing body tag in theme.liquid, tracks on-site actions like product views and add-to-carts. Shopify webhooks on checkout creation and order creation send checkout and purchase events to ClickFlare.
  • Script tracks product views and add-to-carts
  • Webhook on checkout creation
  • Webhook on order creation for sales
Today, one campaign
example
Spend pulled from Shopify
cost
$412.30
Conversions recorded
today
38
Sent back to Shopify
per event
38/38
Profit
campaign
$227.70
Example numbers. Cost and conversions sit in the same report row.
Captured on every Shopify click
key macros
click_id={cf_click_id}, cpid={campaign_id}
captured
From the Shopify template in ClickFlare. Use them as report columns and rules.
Revenue for one click
example
Paid click
day 0
$0.00
First revenue pull
+1h
$0.41
Scheduled updates
next days
$0.58
Final pull
last sync
$0.62
Example amounts. Sync timing for Shopify is in the facts above.
Events for one click
example
Lead
day 0
$0.00
Sale
day 0
+$40.00
Upsell
day 1
+$15.00
Refund
day 9
−$15.00
Example events. Each one arrives by postback and is matched to the click.
One visitor's path
example
Product view
step 1
—
Add to cart
step 2
—
Checkout
step 3
—
Purchase
step 4
$68.00
Example order. Each event is tied to the ad that brought the visitor.
5
Custom conversion events
2
Shopify webhooks
3
Landers before the store
2.3B
Events tracked
Setup

Connected in four steps

You need a Shopify store with admin access, a ClickFlare account and a ClickFlare tracking domain.
  1. Create the custom conversions In Settings, Custom Conversions, create view_content, add_to_cart, checkout_created, sale and product_sale. Use these exact identifiers.
  2. Add your store as an offer Create an offer with your Shopify store URL and append click_id={cf_click_id}&cpid={campaign_id}. Then create one campaign per traffic source with that offer.
  3. Add the script to theme.liquid In Shopify, open Online Store, Themes, Edit Code, and paste the ClickFlare Shopify script just before the closing body tag in theme.liquid. Use your own tracking domain.
  4. Create two webhooks In Settings, Notifications, Webhooks, create one webhook for Checkout creation and one for Order creation. Use JSON, the latest API version and your ClickFlare webhook URL.
Script for your Shopify theme.liquid
<script async defer src="https://tracking_domain.com/cf/scripts/shopify"></script>
app.clickflare.com/integrations
SH
Shopify
E-commerce platform
Connected
Shopify account connected
Signed in from ClickFlare
Cost syncing
Spend matched to campaigns
Conversions sent back
Your chosen events
Shopify template selected
Macros pre-filled
Tracking URL in Shopify
Click ID captured
Conversions reported
Payout included where supported
Shopify connected
Credentials saved in ClickFlare
Conversion event set
Click ID passed to the feed
Revenue syncing
On the feed's schedule
Shopify added
Offer URL carries the click ID
Postback set in Shopify
Payout and event included
Conversions arriving
Matched to the click
Shopify connected
Click ID kept to checkout
Events mapped
View, cart, checkout, purchase
Purchases tracked
Order value in reports
Ready to track
Use direct tracking when the traffic source doesn't allow redirects, as with Google Ads. Use redirect tracking where you can: it adds lander rotation and A/B testing.
Shopify setup guide
Open the guide
In your reports

What you see once it's connected

  • Product views per campaign
  • Add-to-carts by traffic source
  • Checkouts created
  • Sales and revenue per ad
  • Product-level sales
  • ROAS by campaign
  • Organic vs. paid orders
Use cases

How media buyers run it

Meta → Shopify

Send Meta traffic straight to the store and see which ads produce add-to-carts, checkouts and sales.

Quiz → product page

Run up to 3 landers before the store with the Advanced Flow builder. Rotate quizzes or presells and keep the one that sells.

Several stores, one funnel

Rotate different Shopify stores at a funnel step and compare revenue per store from the same traffic.
Frequently asked questions

Questions about Shopify

No items found.
Setup guides
Shopify setup guide
{"@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{"@type": "Question", "name": "Does ClickFlare integrate with Shopify?", "acceptedAnswer": {"@type": "Answer", "text": "Yes. A ClickFlare script in your theme tracks on-site events, and Shopify webhooks report checkouts and orders. ClickFlare attributes each one to the original ad click."}}, {"@type": "Question", "name": "Which Shopify events can ClickFlare track?", "acceptedAnswer": {"@type": "Answer", "text": "Product views (view_content), add-to-carts (add_to_cart), checkouts (checkout_created), sales (sale) and item-level sales (product_sale). Create each as a custom conversion."}}, {"@type": "Question", "name": "Do I need both the script and the webhooks?", "acceptedAnswer": {"@type": "Answer", "text": "Yes. The script tracks actions on the site, like product views and add-to-carts. The webhooks report checkout and order events. Without the webhooks, no conversion data arrives."}}, {"@type": "Question", "name": "Why append the click ID to my Shopify store URL?", "acceptedAnswer": {"@type": "Answer", "text": "It lets ClickFlare tie conversions to the original click. That matters most for redirect campaigns, where the direct tracking script isn't installed on the store."}}, {"@type": "Question", "name": "Can I track Shopify sales from Google Ads?", "acceptedAnswer": {"@type": "Answer", "text": "Yes. Use a direct tracking campaign. It works when you send traffic straight to Shopify or when the source doesn't allow redirects, as with Google Ads."}}, {"@type": "Question", "name": "How many landers can I put before my Shopify store?", "acceptedAnswer": {"@type": "Answer", "text": "Up to 3 lander steps, built in the visual Advanced Flow editor. You can rotate landers, or even several Shopify stores, at each step."}}]}