> ## Documentation Index
> Fetch the complete documentation index at: https://clickflare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Track Your Shopify Store with ClickFlare: From Product Views to Final Sale

> Step-by-step guide to tracking Shopify events like product views, add-to-carts, and purchases using ClickFlare’s click-level tracking and webhooks.

<img src="https://mintcdn.com/clickflare/KMcStLNr08QQtIjN/images/help-center/05-integrations/08-e-commerce-and-funnel-systems-tracking/01-how-to-track-your-shopify-store-with-clickflare-from-product-views-to--01.png?fit=max&auto=format&n=KMcStLNr08QQtIjN&q=85&s=e72e24d208fa25ae0239f45659418fe5" alt="How to Track Your Shopify Store with ClickFlare: From Product Views to Final Sale" width="800" height="300" data-path="images/help-center/05-integrations/08-e-commerce-and-funnel-systems-tracking/01-how-to-track-your-shopify-store-with-clickflare-from-product-views-to--01.png" />

This guide explains how to track conversions from your Shopify store using ClickFlare. It covers the full setup process from defining custom conversion events to configuring the Shopify theme to fire those conversions.

***

## 🚀 Why Use ClickFlare to Track Your Shopify Store

ClickFlare gives you full-funnel, click-level tracking — something traditional Shopify apps can’t do.

With ClickFlare, you can:

* **Easily set it up in minutes** — no complex development required
* **Track each user’s journey** from ad click to final purchase
* **Rotate and test landers** before sending traffic to your Shopify store
* **Attribute conversions** from both paid and organic channels
* **Send 100% of conversions** back to ad platforms server-side
* **See all key metrics** (costs, conversions, upsells, ROAS) in one dashboard

> 🧠 Whether you're running ads, SEO, or email flows — ClickFlare gives you the data and attribution accuracy you need to scale.

***

## 🧭 Overview

This guide walks you through tracking the following Shopify events using ClickFlare:

* **View Content** → view\_content
* **Add to Cart** → add\_to\_cart
* **Checkout Initiated** → checkout\_initiated
* **Checkout Completed** → sale and product\_sale (for item-level tracking)

The setup is split into two parts:

1. **ClickFlare Setup** – define events, landers (optional), and campaigns
2. **Shopify Setup** – add tracking scripts and configure webhooks

***

## I. 🔧 ClickFlare Setup

### 1. Create Custom Conversion Events

You’ll need to create a custom conversion in ClickFlare for each Shopify event we are going to track.

**Steps:**

1. Go to **Settings > Custom Conversions**
2. Click **Add**
3. Create a separate custom event for each of the following:

   * `view_content`
   * `add_to_cart`
   * `checkout_created`
   * `sale`
   * `product_sale`

<Info>
  **Important:** Use these exact event identifiers as shown above.
</Info>

You can refer to the image below for an example configuration.

<img src="https://mintcdn.com/clickflare/KMcStLNr08QQtIjN/images/help-center/05-integrations/08-e-commerce-and-funnel-systems-tracking/01-how-to-track-your-shopify-store-with-clickflare-from-product-views-to--02.png?fit=max&auto=format&n=KMcStLNr08QQtIjN&q=85&s=c5e819f31fc70f1544c724eb0c1988eb" alt="You can refer to the image below for an example configuration" width="1282" height="385" data-path="images/help-center/05-integrations/08-e-commerce-and-funnel-systems-tracking/01-how-to-track-your-shopify-store-with-clickflare-from-product-views-to--02.png" />

***

### 2. Create a Traffic Source

1. From the left menu, go to **Traffic Sources**
2. Click the **+ New** button to add a new traffic source
3. Choose a template from the list (e.g., **Meta**, **Google Ads**, **TikTok**)
4. Fill in the following:

   * **Traffic Source Name**
   * **Workspace**
   * **Currency** used for cost reporting
   * **Cost Integration** — connect to pull ad spend automatically

> 💡 ClickFlare templates will auto-fill most parameters (like click ID macros). You can always adjust them if needed.

***

### 3. (Optional) Add a Lander Before Shopify

If you're sending traffic to a quiz, article, or presell page before Shopify:

1. Go to **Landers > New Lander**
2. Enter your lander URL and **give it a name**
3. Save the lander to generate your ClickFlare **click URL**

<Info>
  **Advanced Funnels:** With ClickFlare’s **visual Advanced Flow builder**, you can set up multi-step funnels with up to **3 landers before the Shopify store**, and rotate different landers or even multiple Shopify stores at each step.
</Info>

> **Note:** Be sure to update the CTA buttons or links on your lander to use the **ClickFlare click URL**. This ensures tracking continuity when users are redirected to Shopify.

***

### 4. Create an Offer (Your Shopify Store)

1. Go to **Offers > New** Offer
2. Paste your Shopify store URL (e.g., [https://yourstore.myshopify.com](https://yourstore.myshopify.com))

<Warning>
  **Important:** Always append the **ClickFlare click and campaign ID** to your offer URL (your Shopify store link), so the click can be tracked through to the conversion.

  The final URL should look like this:

  ```
  https://yourstore.myshopify.com?click_id={cf_click_id}&cpid={campaign_id}
  ```
</Warning>

***

### 5. Create a Tracking Campaign (Per Traffic Source)\*\*\*

1. Go to **Campaigns > New Campaign**
2. Choose:

   * **Redirect Tracking** — use this if your traffic source allows redirects. This method enables **lander rotation and A/B testing**.
   * **Direct Tracking** — use this if you're sending traffic **directly to your Lander or Shopify**, or if your traffic source doesn’t allow redirects (e.g., Google Ads).
3. Configure:

   * **Campaign Name:** e.g., *Shopify – Meta*
   * **Traffic Source:** select the one created in step 2
   * **Lander (optional):** select your lander from step 3
   * **Offer:** select your Shopify store offer
4. In the **Tracking tab**, copy the **ClickFlare Campaign URL** - this is the link you'll use in your traffic source when setting up your ads

> 📌 Create one campaign per traffic source to ensure clean attribution.

***

### 6. Create a Campaign for Organic Traffic

While not mandatory, we recommend setting up a dedicated campaign for **organic traffic** (e.g., SEO, direct visits, email, influencers). This helps you attribute conversions that didn’t come from paid traffic sources — and otherwise may go untracked.

**Steps:**

1. **Duplicate an existing campaign**
2. **Create a new traffic source** called **Organic** and assign it to this campaign
3. **Keep using the same offer** from step 4 (your Shopify store)

For a direct campaign, make sure to inject the ClickFlare direct tracking script in the page inside the theme.liquid:

`https://trackin_domain.com/cf/scripts/direct?cpid=CLICKFLARE_ORGANIC_CAMPIGN_ID`

<img src="https://mintcdn.com/clickflare/KMcStLNr08QQtIjN/images/help-center/05-integrations/08-e-commerce-and-funnel-systems-tracking/01-how-to-track-your-shopify-store-with-clickflare-from-product-views-to--03.png?fit=max&auto=format&n=KMcStLNr08QQtIjN&q=85&s=2e9d0ac8bf08ba7f556f247ecba96755" alt="https://trackindomain.com/cf/scripts/direct?cpid=CLICKFLAREORGANICCAMPIGNID" width="1293" height="347" data-path="images/help-center/05-integrations/08-e-commerce-and-funnel-systems-tracking/01-how-to-track-your-shopify-store-with-clickflare-from-product-views-to--03.png" />

***

## II. 🛒 Shopify Setup

Now that your ClickFlare setup is complete, log in to your Shopify admin to complete the final steps.

***

### 1. Add the ClickFlare Script to Your Shopify Theme

<Warning>
  **Required Step — Do not skip.** This script is essential for tracking visitor sessions and on-site events like product views and add-to-carts.
  Without this script, **tracking will not work**.
</Warning>

**Steps:**

1. \*\*Go to \*\*Online Store > Themes in your Shopify admin

   **<img src="https://mintcdn.com/clickflare/KMcStLNr08QQtIjN/images/help-center/05-integrations/08-e-commerce-and-funnel-systems-tracking/01-how-to-track-your-shopify-store-with-clickflare-from-product-views-to--04.png?fit=max&auto=format&n=KMcStLNr08QQtIjN&q=85&s=649e04bcf75286b99c81b190f905c2b5" alt="Go to Online Store Themes in your Shopify admin" width="239" height="307" data-path="images/help-center/05-integrations/08-e-commerce-and-funnel-systems-tracking/01-how-to-track-your-shopify-store-with-clickflare-from-product-views-to--04.png" />**
2. Click the **three-dot menu** next to your active theme and select Edit Code

   **<img src="https://mintcdn.com/clickflare/KMcStLNr08QQtIjN/images/help-center/05-integrations/08-e-commerce-and-funnel-systems-tracking/01-how-to-track-your-shopify-store-with-clickflare-from-product-views-to--05.png?fit=max&auto=format&n=KMcStLNr08QQtIjN&q=85&s=ebb4f4fa0fb1485a28362ee6f300c686" alt="Click the three-dot menu next to your active theme and select Edit Code" width="738" height="437" data-path="images/help-center/05-integrations/08-e-commerce-and-funnel-systems-tracking/01-how-to-track-your-shopify-store-with-clickflare-from-product-views-to--05.png" />**
3. Under the **Layout** folder, open `theme.liquid`
4. Scroll to the bottom of the file and paste the following script **just before the closing \</body> tag**:

   <img src="https://mintcdn.com/clickflare/KMcStLNr08QQtIjN/images/help-center/05-integrations/08-e-commerce-and-funnel-systems-tracking/01-how-to-track-your-shopify-store-with-clickflare-from-product-views-to--06.png?fit=max&auto=format&n=KMcStLNr08QQtIjN&q=85&s=7fbd5b297fcde7934a433e1bfa373f7c" alt="Scroll to the bottom of the file and paste the following script just before the closing tag" width="1203" height="452" data-path="images/help-center/05-integrations/08-e-commerce-and-funnel-systems-tracking/01-how-to-track-your-shopify-store-with-clickflare-from-product-views-to--06.png" />

   ```
   <script async defer src="https://tracking_domain.com/cf/scripts/shopify"></script>
   ```

   <Warning>
     **Important:** Replace tracking\_domain.com with your actual ClickFlare tracking domain (e.g., track.yourbrand.com).
   </Warning>

***

### 2. Add Webhooks to Track Shopify Events

<Warning>
  **Required Step — Do not skip.** These webhooks notify ClickFlare when events like checkout initiation and purchases occur.
  Without them, **no conversion data will be received**.
</Warning>

ClickFlare uses webhooks to track checkout and order events triggered from Shopify.

**Steps:**

1. In Shopify admin, go to **Settings > Notifications**
2. Scroll to the **Webhooks** section and click **Create Webhook**
3. Add the following webhooks:

   #### ✅ Webhook: Checkout Initiated

   * **Event:** Checkout creation

   * **Format:** JSON

   * **URL:**

     ```
     https://tracking_domain.com/cf/shopify/webhook
     ```

   * **API Version:** Use the latest (e.g., 2025-07)

     <img src="https://mintcdn.com/clickflare/KMcStLNr08QQtIjN/images/help-center/05-integrations/08-e-commerce-and-funnel-systems-tracking/01-how-to-track-your-shopify-store-with-clickflare-from-product-views-to--07.png?fit=max&auto=format&n=KMcStLNr08QQtIjN&q=85&s=26b4783920c9d309357277f6dba433e1" alt="API Version: Use the latest (e.g., 2025-07)" width="629" height="356" data-path="images/help-center/05-integrations/08-e-commerce-and-funnel-systems-tracking/01-how-to-track-your-shopify-store-with-clickflare-from-product-views-to--07.png" />

   #### ✅ Webhook: Order Completed (Sale)

   * **Event:** Order creation
   * **Format:** JSON
   * **URL:**

     ```
     https://tracking_domain.com/cf/shopify/webhook
     ```
   * **API Version:** Use the latest (e.g., 2025-07)

     <img src="https://mintcdn.com/clickflare/KMcStLNr08QQtIjN/images/help-center/05-integrations/08-e-commerce-and-funnel-systems-tracking/01-how-to-track-your-shopify-store-with-clickflare-from-product-views-to--08.png?fit=max&auto=format&n=KMcStLNr08QQtIjN&q=85&s=f76758cd0e437928dff56b17544a24c1" alt="API Version: Use the latest (e.g., 2025-07) (2)" width="629" height="354" data-path="images/help-center/05-integrations/08-e-commerce-and-funnel-systems-tracking/01-how-to-track-your-shopify-store-with-clickflare-from-product-views-to--08.png" />

After you add both webhooks, they will appear in your **Webhook list** like this:

<img src="https://mintcdn.com/clickflare/KMcStLNr08QQtIjN/images/help-center/05-integrations/08-e-commerce-and-funnel-systems-tracking/01-how-to-track-your-shopify-store-with-clickflare-from-product-views-to--09.png?fit=max&auto=format&n=KMcStLNr08QQtIjN&q=85&s=1061eb214d464dd88bafc4007532df78" alt="After you add both webhooks, they will appear in your Webhook list like this" width="790" height="308" data-path="images/help-center/05-integrations/08-e-commerce-and-funnel-systems-tracking/01-how-to-track-your-shopify-store-with-clickflare-from-product-views-to--09.png" />

***

## ✅ Verifying Your Setup

1. Click through a campaign URL
2. Complete a test checkout using a coupon or test gateway
3. Go to **Reports > Conversions** in ClickFlare
4. Filter by:

   * Event: sale, checkout\_initiated
   * Campaign: the one you used

You should now see event data and revenue properly attributed.

***

**FREQUENTLY ASKED QUESTIONS**

Got questions? Find the answers below:

> **Q1:** Do I need to use a lander before sending users to my Shopify store?

**A1**: No, it's optional. You can send traffic directly to Shopify. However, using a lander allows you to test different angles, presell pages, or quizzes, and rotate them using ClickFlare’s built-in funnel features.

> **Q2:** What’s the difference between Redirect and Direct Tracking?

**A2**: Redirect Tracking allows you to rotate landers, apply conditional routing, and capture click data via redirect URLs. Direct Tracking is used when sending traffic straight to Shopify, especially when redirects are not allowed (e.g., Google Ads).

Whenever possible, use Redirect Tracking; it gives you more control, better flexibility, and access to advanced funnel features.

> **Q3:** Why do I need to append the click ID to my Shopify store URL?

**A3:** Appending `cf_click_id={cf_click_id}` ensures that ClickFlare can associate conversions back to the original click. This is especially important for **Redirect Tracking campaigns**, where the ClickFlare **direct tracking script** is not installed on Shopify. Without this, ClickFlare won’t be able to attribute conversions accurately.

> **Q4:** Is it necessary to set up a separate campaign for organic traffic?

**A4**: Not mandatory, but highly recommended. Without a campaign for organic traffic, conversions from unpaid sources (SEO, email, etc.) may go unattributed.

> **Q5:** How many landers or steps can I use before the Shopify store?

**A5**: ClickFlare allows up to **3 lander steps** before the Shopify offer. You can build multi-step funnels visually using the Advanced Flow editor.

> **Q6:** Do I need to use both webhooks and scripts in Shopify?

**A6**: Yes. The **ClickFlare script** tracks actions that happen on the website, like when a visitor views a product or adds it to the cart. The **webhooks** are used to report key events that happen during and after the checkout process, like when a checkout is started or an order is completed. Using both ensures accurate tracking across the full customer journey.

### Related Resources:

* [Create Custom Conversion Events](/docs/en/settings/custom-conversions)
* [Direct Tracking Setup Guide](/docs/en/tracking/direct-tracking-clickflare)
* [How Information is Passed Between Systems](/docs/en/tracking/click-conversion-data-transfer-clickflare)
* [Meta/Facebook Conversion API Integration](/docs/en/integrations/facebook)
