# Welcome to Littledata

Littledata is the data layer for Shopify. It connects first-party customer and revenue data to your marketing and analytics destinations so you can reliably attribute revenue to the channels driving it. Setup takes minutes, with no custom code or Google Tag Manager required.

<h2 align="center">How can we help?</h2>

<p align="center">Guides, tutorials, and troubleshooting for Littledata's server-side tracking platform on Shopify. Learn how to connect your store, set up destinations, and get the most out of your data.</p>

<button type="button" class="button primary" data-action="search" data-icon="magnifying-glass">Search…</button>

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><strong>Getting started</strong></td><td>Connect your Shopify store and start sending data to your marketing destinations in minutes.</td><td><a href="https://help.littledata.io/get-started">https://help.littledata.io/get-started</a></td><td><a href="/files/gjhYUnhNrw0ZuYvhN4NJ">/files/gjhYUnhNrw0ZuYvhN4NJ</a></td></tr><tr><td><strong>Destinations</strong></td><td>Set up and manage data destinations between your Shopify store and marketing platforms.</td><td><a href="https://help.littledata.io/integrations">https://help.littledata.io/integrations</a></td><td><a href="/files/BsjpNkT7jgeL7dCPZRrb">/files/BsjpNkT7jgeL7dCPZRrb</a></td></tr><tr><td><strong>Event Editor</strong></td><td>Control what each destination receives: enable or disable events, edit mappings, add trigger conditions, and create custom events.</td><td><a href="https://help.littledata.io/event-editor/overview">https://help.littledata.io/event-editor/overview</a></td><td><a href="/files/4INIZpi4PxaSnbcT5mO7">/files/4INIZpi4PxaSnbcT5mO7</a></td></tr><tr><td><strong>Sources</strong></td><td>Connect Shopify, subscription platforms, and the other sources that feed your tracking data.</td><td><a href="https://help.littledata.io/sources">https://help.littledata.io/sources</a></td><td><a href="/files/eyvO49nKnF7F236ElIiL">/files/eyvO49nKnF7F236ElIiL</a></td></tr><tr><td><strong>Using Google Analytics</strong></td><td>Set up GA4, build reports, explorations, and fix attribution models.</td><td><a href="https://help.littledata.io/google-analytics">https://help.littledata.io/google-analytics</a></td><td><a href="/files/TaJZ7VjZtO4Ox2u779NU">/files/TaJZ7VjZtO4Ox2u779NU</a></td></tr><tr><td><strong>Partner recipes</strong></td><td>Using Littledata with Recharge, Klaviyo, and other popular Shopify apps.</td><td><a href="https://help.littledata.io/partner-recipes">https://help.littledata.io/partner-recipes</a></td><td><a href="/files/byafBbHyFAjt8tFW6xcW">/files/byafBbHyFAjt8tFW6xcW</a></td></tr><tr><td><strong>Accounts and billing</strong></td><td>Plans, usage limits, billing cycles, and account permissions.</td><td><a href="https://help.littledata.io/accounts-and-billing">https://help.littledata.io/accounts-and-billing</a></td><td><a href="/files/1rGNspR1c6AszDtdtw9j">/files/1rGNspR1c6AszDtdtw9j</a></td></tr><tr><td><strong>Advanced use</strong></td><td>API references, ecommerce schemas, data layer, and pipeline settings.</td><td><a href="https://help.littledata.io/advanced">https://help.littledata.io/advanced</a></td><td><a href="/files/Kp9O3mvUhRnhR3Ani210">/files/Kp9O3mvUhRnhR3Ani210</a></td></tr></tbody></table>

***

Can't find what you're looking for? Reach out at <help@littledata.io> or chat with us inside the app.


# Install Littledata on your Shopify store

This guide covers how to install Littledata on your Shopify store and enable the tracking script. Once set up, Littledata automatically captures storefront activity and sends it to your connected destinations.

{% stepper %}
{% step %}
**Install from the Shopify App Store**

Visit the [Littledata listing on the Shopify App Store](https://apps.shopify.com/littledata) and click **Install**.

<div data-with-frame="true"><figure><img src="/files/KJsPJ3LbNqmwMH5sUJoL" alt=""><figcaption></figcaption></figure></div>

You will be redirected to the app install page in your Shopify admin. Review the permissions and click **Install**.
{% endstep %}

{% step %}
**Choose a pricing plan**

After installing, you'll be prompted to select a pricing plan. Pick the plan that best fits your store's needs.

{% hint style="info" %}
Need help deciding? See our guide on [choosing a plan](/accounts-and-billing/choosing-a-plan) for a detailed comparison of available plans.
{% endhint %}
{% endstep %}

{% step %}
**Connect your store**

After selecting your plan, you will be prompted to connect your Shopify store. Click **Connect now** to get started.

<div data-with-frame="true"><figure><img src="/files/gh1iuxmbhcYvEV1gRf5m" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Enable the Littledata tracking script**

This is a critical step. On the **Set up your source: Shopify** screen, you will see that the tracking script status is **Not detected**. Click **Enable app embed** to proceed.

<div data-with-frame="true"><figure><img src="/files/cAsOcXbpRptMcgqrkrTS" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Save the app embed in Shopify**

You will be redirected to the Shopify Theme editor. The **Littledata Tracker** app embed will already be enabled in the left sidebar. All you need to do is click **Save** in the upper right corner of your screen.

<div data-with-frame="true"><figure><img src="/files/JwHpolYnLjqH1GiFOzgX" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Go back to Littledata**

Head back to the Littledata app. The tracking script will now show a **Detected** status. Click **Continue to dashboard** to move on.

<div data-with-frame="true"><figure><img src="/files/CEFPvl8E3cAJfYQHBC81" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**You're all set!**

You will land on the Littledata dashboard where your Shopify store is connected and ready to go. From here you can set up your desired data destinations (Google Analytics, Meta Ads, Klaviyo, and more) by clicking **Add destination**.

<div data-with-frame="true"><figure><img src="/files/kVadWAvLUgJX2bFRAVb0" alt=""><figcaption></figcaption></figure></div>
{% endstep %}
{% endstepper %}

{% columns %}
{% column %}
**Next steps**

Now that your Shopify store is connected, set up your first data destination.

Connect your store to Google Analytics, Meta Ads, Klaviyo, and more. Most destinations take under 10 minutes to set up.
{% endcolumn %}

{% column %}

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><strong>Explore destinations</strong></td><td></td><td><a href="/pages/3fae79394ec1bcd92336002b2906125cf9bffa90">/pages/3fae79394ec1bcd92336002b2906125cf9bffa90</a></td><td><a href="/files/BsjpNkT7jgeL7dCPZRrb">/files/BsjpNkT7jgeL7dCPZRrb</a></td></tr></tbody></table>
{% endcolumn %}
{% endcolumns %}


# How server-side tracking works

## Client-side (browser) tracking

During the automatic [installation process](/integrations/shopify-to-google-analytics/littledata-shopify-install-guide), Littledata adds a data layer and tracking script to all the store pages.

* A `LittledataLayer` window-scope Javascript object is added on all pages, which you can also use with [Google Tag Manager (GTM)](/integrations/shopify-to-google-analytics/google-tag-manager-faq).
* A minified tracking script, loaded via Littledata's [app embed](/advanced/developer/littledata-app-embed-how-it-works) in your Shopify theme
* The marketing platform's own tracking library is then loaded on each page
* Cookie identifiers are passed to Littledata's servers to ensure consistent user journey tracking
* Fully compatible with Online Store 2.0

## Server-side tracking

During the setup, Littledata also adds a set of webhooks to your Shopify store. This means that each time a user takes action our servers can relay that event to the marketing platform, ensuring 100% accuracy. There are many advantages to this approach:

* Smaller script in the browser = faster page load
* No scripts are loaded on the sensitive and secure checkout pages
* Complete event capture for checkout flow, including sales, post-purchase upsells and refunds/returns
* Avoids missed tracking or double tracking of the order status page
* Accurate marketing attribution (sessions stitched together) across all checkout types
* Persistent identity for users
* Data security and spam reduction: only authorized servers can feed into your data stream

## Why server-side tracking

1. In situations where the native tracking script might be blocked by ad blockers or iOS / Safari restrictions, Littledata can still pass through events to the marketing platform's server.
2. Events can be enriched with extra product and customer data we sync with Shopify
3. Events can be customized before being relayed to the marketing platform

## Destinations that support server-side tracking

All our major destinations support server-side tracking, including:

* [Google Analytics](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4)
* [Google Ads](/integrations/google-ads/google-ads-how-it-works)
* [Meta Ads](/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api)
* [TikTok Ads](/integrations/tiktok/how-it-works)
* [Pinterest](/integrations/shopify-to-pinterest/how-it-works)
* [Klaviyo](/integrations/shopify-klaviyo/how-it-works-shopify-to-klaviyo)
* [Attentive](/integrations/attentive/how-it-works-shopify-to-attentive)

## Supported identifiers

Our advanced tracking script automatically fetches and passes to Littledata servers the following identifiers:

| Identifier              | Description                 |
| ----------------------- | --------------------------- |
| \_ga                    | Google Analytics client ID  |
| \_ga\_\<Measurement ID> | Google Analytics session ID |
| \_gcl\_aw               | Google Ads click identifier |
| \_gcl\_ag               | Google Ads gbraid           |
| \_gcl\_gb               | Google Ads wbraid           |
| \_epik                  | Pinterest click ID          |
| \_ttp                   | Tiktok client ID            |
| ttclid                  | TikTok click ID             |
| fbp                     | Meta client ID              |
| fbc                     | Meta click ID               |
| ajs\_anonymous\_id      | Segment anonymous ID        |


# Shopify


# Littledata Pixel

Ensure seamless and accurate data collection across your Shopify store and across headless storefronts with the **Littledata Pixel**.

Installed as a custom web pixel directly from your Shopify admin, this powerful solution works alongside Littledata's server-side tracking to fill gaps and improve reliability - so you never miss a critical conversion or customer journey.

### Key Benefits

* **Shopify Hydrogen and headless support** – Get consistent tracking across a headless storefront
* **Fully redundant tracking** – Safeguard your marketing data with both client-side and server-side tracking for key destinations
* **Custom landing page support** – Track customers across non-Shopify pages with ease
* **Accelerated checkout compatibility** – Track conversions seamlessly across Shop Pay and other accelerated checkout options

### How to add the Littledata Pixel

1. In the Littledata dashboard, you will see the **Littledata Pixel** widget.
   1. Click **Continue** to enter the setup.

      ![Add Advanced tracking script](/files/iQYsFaL1FS7S5TTBeM9o)
2. From your Shopify store admin, go to **Settings**, then **Customer events**

   ![Customer Events](/files/rcJmr70EdtpIb4FLxQxT)
3. Click **Add custom pixel**

   You will need to create a custom pixel called ***Littledata - Advanced Tracking***\
   Make sure the name is correctly spelled so we can detect it on your store.

   ![Create custom web pixel](/files/fFlucmUpkL4AXdMhH9bA)
4. **Configure the customer privacy settings**.

   Please select "*Not required"* and "*Data collected does not qualify as sale*" so that the Littledata pixel is able to load.\
   We manually handle consent according to the Customer Privacy API.

   For headless setups using cookie banners that are not automatically integrated with the Customer Privacy API, please refer to your cookie banner’s documentation on how to connect it manually.\
   If you’re on a custom storefront instead of Hydrogen, you’ll also need to include the Customer Privacy API asset. [Learn more](https://shopify.dev/docs/api/customer-privacy#installation-on-a-custom-storefront)

   ![Consent for web pixel](/files/cnI09kGXoSsyKAaKmjH4)
5. Please return to the Littledata app, copy the custom pixel code, and paste it into your newly created pixel under the **Code** section.
6. After that, click **Save** and then **Connect**.

   ![](/files/OQh4N2C1QpxsR2HcUBMM)

Once the **setup is complete**, you will be redirected to the Littledata dashboard, where the **Advanced tracking** "Connected" state will indicate that the pixel has been detected on the store.

### Redundant tracking setups

When added in addition to Littledata's server-side tracking, they allow for fully redundant tracking in destinations that support client and server-side events. Supported destinations include:

* [Meta Pixel](/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api)
* [TikTok](/integrations/tiktok/how-it-works)
* [Pinterest](/integrations/shopify-to-pinterest/how-it-works)

Adding the Littledata Pixel gives you another reliable way to track events that might otherwise be lost, and follows the best practice for a [Redundant Setup](https://developers.facebook.com/docs/marketing-api/conversions-api/guides/end-to-end-implementation/).

#### What events are collected by the web pixel?

Littledata's custom web pixel improves tracking of checkout and post-purchase events across Social bundle integrations (Meta Conversions API or Mea CAPI for short, TikTok and Pinterest).

| Data destinations            | Web pixel event          | Meta event          | Description                                |
| ---------------------------- | ------------------------ | ------------------- | ------------------------------------------ |
| Meta CAPI, TikTok, Pinterest | product\_added\_to\_cart | AddToCart           | The addition of an item to a shopping cart |
| Meta CAPI, TikTok            | checkout\_started        | InitiateCheckout \* | The start of a checkout process            |
| Meta CAPI, TikTok            | payment\_info\_submited  | AddPaymentInfo \*   | Customer payment info submitted            |
| Meta CAPI, TikTok, Pinterest | checkout\_completed      | Purchase \*         | Completing the checkout / thank you page   |

\* An additional PageView will be sent with the event

### Troubleshooting

#### Littledata Pixel states

We run periodic checks to ensure that both the tracking script (via the app embed) and the custom web pixel are detected on your store.

1. Connected
   1. This means that the pixel is detected on your store; no action required on your end.
2. Not detected
   1. This means that our check failed to detect the pixel on your store.
   2. Click "Fix now" and follow the setup process.

{% hint style="info" %}
Make sure the pixel is correctly named "Littledata - Advanced Tracking".
{% endhint %}

#### How to check if the web pixel has loaded

Go to your newly created pixel — **Littledata - Advanced tracking** — in the Customer events tab and click on test to open the custom pixel on your website.

![](/files/nEufSXYBXA1jLXo8QXme)

To view which events are loading, visit each page that you want to test the pixel for, and review the Pixel helper dialog to ensure that the event was successfully subscribed to and that the callback function was successful.

![](/files/NIeSnkOmB2lIDAzG2616)

#### How to reconnect the pixel

If you don't see the pixel firing, one of your colleagues may have disconnected the pixel. You need to go to your Shopify Customer events, check for the **Littledata - Advanced Tracking**, click on the three dots on the right, and click **Connect**. That's it!

![reconnect pixel](/files/23KD5ra7gVMJQySlFRTB)


# Headless Shopify


# Headless or Shopify Hydrogen store installation

If you're running a **headless Shopify storefront**, ensuring accurate data collection can be challenging. Littledata’s Shopify app, including the **Littledata Pixel**, provides seamless, server-side tracking that works alongside your existing setup—so you get reliable analytics and marketing data, no matter how your store is built.

{% hint style="info" %}
This feature is available only for **Pro, Plus and Enterprise** customers. You also need your headless store and Shopify checkout to share the same domain.
{% endhint %}

## How it works

Littledata's Pixel ensures seamless and accurate tracking for headless Shopify stores by capturing key marketing and analytics identifiers and securely passing them to our server-to-server data pipeline. This allows us to correctly attribute customer actions across sessions and devices, ensuring reliable server-side tracking.

## Compatibility

This solution can work with *any* [headless Shopify setup](https://shopify.dev/docs/storefronts/headless/getting-started/build-options), including:

* Shopify Hydrogen
* Headless channel using Storefront API and Next.js, Remix, Gatsby etc
* Landing pages with a Buy Now button
* Native mobile app using Shopify checkout
* Shopify Buy SDK

Since Littledata also tracks the Shopify storefront, the complete customer journey can be tracked across your whole online store.

The only limitation is that for cookies to be passed to the checkout, the **checkout must be on same root domain** – e.g., `store.domain.com` and `checkout.domain.com`.

{% hint style="warning" %}
If the checkout remains on myshopify.com domain, our tracking script will not function.
{% endhint %}

## Supported data destinations

Littledata supports a no-code, server-side integration for:

* [Google Analytics (GA4)](/integrations/shopify-to-google-analytics/littledata-shopify-install-guide)
* [Segment](/integrations/shopify-to-segment/installation)
* [Google Ads](/integrations/google-ads/google-ads-install-guide)
* [Meta Conversions API (CAPI)](/integrations/facebook-capi/how-to-install-shopify-to-conversions-api)
* [TikTok Events API](/integrations/tiktok/installation)
* [Pinterest Conversions API](/integrations/shopify-to-pinterest/installation)

{% hint style="info" %}
Littledata complements your storefront tracking, and assumes you already have the marketing pixels or tags set up on the parts of your store not using a Shopify theme. By capturing all relevant marketing identifiers, we ensure complete and consistent data across the storefront and the Shopify checkout.
{% endhint %}

### Automatically tracked events

All the events below are tracked **automatically server-side**, to ensure a complete and more accurate funnel.

| Connection                | Event names                                                                                                        |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| Google Analytics 4        | `begin_checkout`, `add_shipping_info`, `add_payment_info`, `purchase`\* , `refund`, `upsell`                       |
| Google Ads                | `Conversion`                                                                                                       |
| Segment                   | `Checkout Started`, `Checkout Step Viewed`, `Checkout Step Completed`, `Payment Info Entered`, `Order Completed`\* |
| Meta Conversions API      | `Initiate Checkout`, `Add Payment Info`, `Purchase`\*                                                              |
| Tiktok Events API         | `Initiate Checkout`, `Add Payment Info`, `Complete Payment`                                                        |
| Pinterest Conversions API | `Checkout`                                                                                                         |

\*Includes **subscriptions, upsells, drafts** and **orders from other sales channels**

You can track further events on the storefront using Google Tag Manager or similar.

## Getting started

To ensure accuracy tracking across your store and checkout you will need to:

1. Add the marketing tags in your usual way (e.g. using Google Tag Manager) to the pre-checkout pages
2. Install Littledata's [Customer Tracking app](/integrations/shopify-to-google-analytics/littledata-shopify-install-guide)
3. Add the [Littledata Pixel](/sources/shopify/littledata-pixel) as part of the app setup
4. Add your chosen data destinations in a few clicks

That's it! No code, no infrastructure to maintain and no broken marketing attribution.

## Limitations

Currently the following events are *not tracked* by Littledata on a headless storefront, and you would need to implement them manually:

* Page Views
* Product Detail Views
* Add to Cart
* Remove from Cart

This means that the following Littledata's integrations will not yet work for a headless store:

* Klaviyo
* Attentive

We intend to reduce these limitations over the coming months.


# Upgrading to the Littledata Pixel

The **Littledata Pixel** is our recommended approach for headless Shopify setups and replaces our [previous headless SDK](https://www.npmjs.com/package/@littledata/headless-shopify-sdk), bringing you several new benefits:

* Robust event tracking for headless stores to Google Analytics, Google Ads, Meta Conversions API, TikTok Events API, and Pinterest Conversions API
* [Tracking redundancy](/sources/shopify/littledata-pixel#redundant-tracking-setups) for Meta, TikTok, and Pinterest, offering better event reliability
* Supports the latest Shopify features, such as accelerated checkouts

{% hint style="warning" %}
**Deprecation notice**

Support for the previous headless SDK is being phased out. Starting **January 2026**, Littledata will no longer process tracking calls via the headless SDK.
{% endhint %}

## **Upgrading to the Littledata Pixel**

Upgrading is made easily via the instructions in our in-app dashboard.\
For a complete installation guide and information about the Littledata Pixel, please refer to our [documentation](/sources/shopify/littledata-pixel).

{% hint style="info" %}
The checkout must be on the same root domain — e.g. [store.domain.com](https://store.domain.com) and [checkout.domain.com](https://checkout.domain.com)
{% endhint %}

## Compatibility with the previous headless SDK

### Can both solutions run at the same time?

Yes. The Littledata Pixel and the headless SDK can coexist on your store without causing any conflicts; however, we recommend the pixel as the single headless solution.

### Will this result in duplicate event tracking?

No, duplicate event tracking will not occur. The Littledata Pixel loads only on Shopify checkout and thank you pages, while the headless SDK is not loaded on the Shopify checkout.


# Multi-currency support

How to automatically track payments in multiple currencies via Shopify Payments

Littledata is designed to work with any multi-currency ecommerce setup. For Shopify merchants (including headless setups), we support tracking for multiple country stores as well as stores that use Shopify Markets.

Littledata's connections automatically track multi-currency Shopify setups, and send the correct product and order currencies through from [Shopify to Segment](/integrations/shopify-to-segment/how-it-works) or from [Shopify to Google Analytics](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4).

Many Shopify Plus merchants rely on Shopify Payments to [manage multi-currency sales](https://help.shopify.com/en/manual/payments/shopify-payments/multi-currency). If your Shopify store uses Shopify Payments to present prices in multiple currencies, our multi-currency tracking is an out-of-the-box solution to get accurate sales and marketing data.

Here's how Littledata's multi-currency tracking works for Shopify and Shopify Plus stores using storefront pricing (display currencies) and for multi-currency sales from different 'country stores'.

### Storefront pricing

If your storefront allows users to select a display currency, all the products in events will be priced in the **user's** currency. If this is different from the store currency, Google Analytics will convert this local currency to the GA view's currency at the [previous day's exchange rate](https://support.google.com/analytics/answer/9796179?hl=en\&sjid=9440565049142162940-EU#zippy=%2Cin-this-article).

e.g. If your store currency is in USD, but the user opts to display prices in AUD then the Product Detail / Product Viewed event will include the `price` in AUD and Google Analytics will convert this to USD.

In other Segment destinations you will see a `currency` field which specifies one of Shopify's [supported currencies](https://help.shopify.com/en/manual/payments/shopify-payments/selling-and-getting-paid-in-different-currencies).

### Server-side events (carts, checkouts and orders)

All server-side events have products and orders priced in the **store** currency. This removes any risk of exchange rate fluctuations from affecting revenue reporting.

In Segment events you will see additional `presentment_currency` and `presentment_amount` fields from Shopify's [checkout or order objects](https://shopify.dev/api/admin-rest/2021-10/resources/order#resource_object), which can be used if you want to display values to the customer in the same way as they are displayed in Shopify's checkout.

e.g. If your store currency is in USD, but the user opts to pay in AUD then the Checkout Step event will include the `price` in USD, and additionally `presentment_amount` in AUD.

### Multiple country stores sending to one web property

If you have multiple country stores with different store currencies, all sending data to a single web property in Google Analytics, then all the events will be converted to the Google Analytics view currency at the currency exchange rate.

Littledata Plus plans include a number of 'country stores' (Shopify stores localized in a particular currency). See our [pricing plans](https://www.littledata.io/pricing) for more information.


# Tracking the Shopify Checkout

A guide to Littledata's Shopify checkout funnel events -- what we call them, when they're triggered, and how they work.

### Server-side checkout tracking

After Shopify moved stores onto Checkout Extensibility it became harder for stores to track the checkout steps and purchases.

One solution is to use Customer Events (Web Pixels) to insert tracking code from the checkout pages themselves, but this is messy to maintain and has [technical limitations](https://blog.littledata.io/2023/06/05/shopify-web-pixel-why-how-tracking/).

Littledata has a better solution, which works seamlessly for all types of checkout - **automatically tracking the checkout updates** from Shopify's servers, and inferring the customer behavior.

Littledata supports checkout funnel event tracking for:

* Shopify checkout (including Checkout Extensions) \*
* Accelerated checkouts (Shop Pay, Amazon etc)

\* This includes the same events for both the [one-page checkout](https://help.shopify.com/en/manual/checkout-settings/customize-checkout-configurations/one-page-checkout) and the original three-step checkout.

Where the Shopify checkout includes checkout apps handling subscriptions or upsells. the checkout steps are the same for these customer journeys, but the [resulting order is differentiated](/sources/shopify/tracking-subscription-orders-in-the-shopify-checkout).

### Littledata advantages

These are the advantages of using Littledata to track the Shopify Checkout:

1. No code setup - automatically installed
2. No maintanance required as Shopify, Google, Meta etc change their APIs
3. Tracks users with adblockers or network limitations
4. Works for headless sites with a Shopify checkout - please follow the [headless setup guide](/sources/shopify/headless-shopify/working-with-a-headless-shopify-setup) first.

### Default checkout steps

When the customer starts and progresses through the checkout on your Shopify site, Littledata triggers the following checkout step events:

* Step 1: Contact information
* Step 2: Shipping information
* Step 3: Payment method
* Purchase (Order complete)

### Checkout step triggers

Let's take a closer look at the structure of these events, what we call them when they're triggered, and how they work.

| Step     | GA4 Event Name      | User action                  | Technical trigger                          |
| -------- | ------------------- | ---------------------------- | ------------------------------------------ |
| 1        | begin\_checkout     | Contact info section viewed  | Checkout created in Shopify for that cart  |
| 2        | add\_shipping\_info | Shipping info section viewed | Customer property added to checkout        |
| 3        | add\_payment\_info  | Payment section viewed       | Shipping lines property addded to checkout |
| Purchase | purchase            | Order completed              | Order is created and marked as PAID        |

You can see how this works for tracking the [Google Analytics checkout funnel](/integrations/shopify-to-google-analytics/checkout-funnel-steps)

### Accelerated checkouts

Littledata works seamlessly with one-click checkouts (like Shop Pay), tracking the purchase and sending it over to the desired destination, as well as attributing it to the original source.

But these accelerated checkouts may lack Checkout Steps - because the nature of the one-click checkout is to bypass the Shopify checkout entirely.

### How sever-side tracking works

For security reasons, third-party apps such as Littledata don’t have access to load third-party JavaScript libraries (e.g. gtag or Meta Pixel) onto Shopify's checkout. We depend on Shopify's webhooks to infer the checkout pages viewed by a particular user.

When a user zips through the checkout pages in quick succession (specifically under 10 seconds), Shopify only informs us of the last page viewed by the user, and passing through these raw updates would result in a nonsense checkout funnel:

![](https://res.cloudinary.com/littledata/w_1564,h_866,c_fit/littledata-blog-images/2019/11/1ad578ac-d22a-4d1a-9c20-291f19c94102.jpeg)

So for every checkout step, Littledata checks back if it has sent events for all previous steps for the same user ID and checkout ID in the last 3 days.

In cases where previous step events were NOT sent in the last 3 days, Littledata retroactively adds checkout steps to make sure the user’s journey looks complete in the checkout funnel.

For example, let’s say a user is already logged in and gets through to the payment page within 10 seconds. For this user, even if Shopify only communicated the final end-state (i.e. payment page), Littledata will assume that they went through all steps of the funnel as expected and send 3 separate steps:

1. **Contact Information** (retroactively added)
2. **Shipping Information** (retroactively added)
3. **Payment Method** (webhook end-state)

#### Trade-offs

Although retroactively adding steps makes the funnel a lot more meaningful, there are a couple of trade-offs that should be kept in mind while analyzing the data:

1. This method could misrepresent the cases where the users *actually* started the session in the middle of the funnel by retroactively sending step hits to GA.
2. Events on the same user checkout beyond the 3-days cut-off will be resent, which could lead to duplicate events sent to GA. However, we believe a 3-days will cover the vast majority of cases for most e-commerce stores.

### Segment destination

We send the following checkout step events.

|                        | Step 1                                               | Step 2                                           | Step 3                                                 | Step 4                                             | Complete                                         |
| ---------------------- | ---------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------ | -------------------------------------------------- | ------------------------------------------------ |
| User journey           | Contact info page viewed                             | Shipping info page viewed                        | Payment page viewed                                    | Bank / payment verification                        | Transaction completed                            |
| Actual trigger         | Checkout created in Shopify's database for that cart | `customer` property added to the checkout object | `shipping_lines` property added to the checkout object | `gateway` property is added to the checkout object | Order is created and marked as `Paid` in Shopify |
| Segment - Event name 1 | Checkout Step Viewed                                 | Checkout Step Viewed (step 2)                    | Checkout Step Viewed (step 3)                          | Payment Info Entered                               | Order Completed                                  |
| Segment - Event name 2 | Checkout Started                                     | Checkout Step Completed (step 1)                 | Checkout Step Completed (step 2)                       | Checkout Step Completed (step 3)                   | Thank you Page Viewed\*                          |

\* The Thank you Page Viewed event was deprecated due to Shopify's new checkout as `scriptTags` can't be loaded anymore on the checkout.

{% hint style="success" %}
Check out a detailed list of [all events tracked by our Segment connection](/integrations/shopify-to-segment/how-it-works).
{% endhint %}


# Tracking post-purchase upsells on Shopify

Littledata tracks post-purchase upsells for Shopify stores and sends the data to destinations such as [Google Analytics (GA4)](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4), Segment and Facebook Conversions API (CAPI). This automatic integration extends our [Shopify checkout tracking](/sources/shopify/shopify-checkout-extensibility) to include upsell events for more accurate reporting and better retargeting.

### Tracking Shopify upsells

#### What are post-purchase upsells?

A post-purchase upsell happens when the customer adds an additional product after completing the checkout. Typically this happens on an upsell page after the checkout. If the upsell offer is accepted, then the original order is updated to include the additional product.

Post-purchase upsells can be a great way to increase Average Order Value (AOV), but they can also cause a lot of data headaches. Littledata automatically fixes issues with tracking post-purchase upsells and unifies the data.

#### Which upsell apps does Littledata track?

Littledata tracks post-purchase upsells generated by any Shopify app. We have tested the upsell tracking with these apps:

* [Rebuy](https://www.littledata.io/shopify/rebuy)
* Zipify
* CartHook
* ReConvert
* Bold
* Honeycomb
* [Nosto](https://help.nosto.com/en/articles/11530626-what-is-post-purchase-upsell-and-how-does-it-work#h_a632f42b38)

#### How do upsells work in the Shopify checkout?

A post-purchase upsell happens when the customer accepts an additional product immediately after completing the checkout. If the upsell offer is accepted, then the same Shopify order is updated to include the additional product.

#### A typical upsell journey

![](/files/7Mdm9dkJIvkhQzTM9OlG)

Immediately after a customer pays for their order, they'll see the upsell page. If the customer accepts the upsell, Littledata’s servers will receive a ping from Shopify notifying us about an update to the order. The upsell event will then be sent to the connected destinations.

Any update of the order **within 3 days** of the order being created, and where the line items increase, is processed as a post-purchase upsell.

{% hint style="success" %}
Littledata also tracks the whole [Shopify checkout funnel](/integrations/shopify-to-google-analytics/checkout-funnel-steps)
{% endhint %}

#### What triggers an upsell event?

The main trigger for this event is the order/updated webhook that comes from Shopify.

An upsell is tracked when the updated order contains more line items than the original order - i.e. one or more products have been added.

#### How are upsell event metrics calculated?

All the ecommerce metrics, such as total revenue, tax, shipping etc. , are calculated as:

```
(updated order value - previous order value)
```

This way, only incremental shipping costs etc are included with the upsell event.

### Viewing upsell events

#### How to see Shopify upsells in Google Analytics

Merchants using Littledata’s Shopify to Google Analytics connection can see upsells directly in Google Analytics.

* When the order is first processed, before the upsell, a \`purchase event is sent to Google Analytics.
* After the upsell is accepted, we send another `purchase` event with the same transaction ID and including the additional product.

This will **not** double the number of Purchases (Transactions); Google Analytics will append new products to that first purchase.

| Event name             | Trigger                                               | Transaction ID |
| ---------------------- | ----------------------------------------------------- | -------------- |
| **add\_payment\_info** | User adds payment information (3rd step of checkout). | -              |
| **Purchase**           | Order is created and marked as paid in Shopify.       | #1234          |
| **Purchase**           | User accepts the upsell.                              | #1234          |

{% hint style="success" %}
Read more about [how the Shopify to GA4 connection works.](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4)
{% endhint %}

In the real-time reporting view, you will see two purchases with the same transaction ID: one being the original order and the other one being the upsell.

![](/files/nU0aq3wANhsqHXE8igx6)

#### How to see Shopify upsells in Segment

Merchants using Littledata’s [Shopify to Segment connection](/integrations/shopify-to-segment/how-it-works) can see upsell events in a variety of Segment destinations.

* When the order is first processed an **Order Completed** event is sent to Segment.
* Once an upsell is accepted, Littledata sends a separate event called **Post Purchase Upsell** (server-side) containing only the newly added products.

| Event name               | Trigger                                               | `order_id` |
| ------------------------ | ----------------------------------------------------- | ---------- |
| **Payment Info Entered** | User adds payment information (3rd step of checkout). | -          |
| **Order Completed**      | Order is created and marked as paid in Shopify.       | #1234      |
| **Post Purchase Upsell** | User accepts the upsell.                              | #1234      |

{% hint style="success" %}
View our full [Segment tracking plan & event schema.](https://docs.google.com/spreadsheets/d/1aljowRhMU9_7uGXmcipbP1Y14S4cOSdXGQA2Vx7BHko/edit#gid=737675841)
{% endhint %}

Here is how the checkout and upsell events should appear in the Segment debugger:

![](/files/1V6n2oTA4c6wkuVI7a0p)

#### How to see Shopify upsells in Meta Ads

Merchants using Littledata’s [Shopify to Meta Conversions API connection](/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api#server-side-events) can use the data directly in Meta (Facebook) Ads. This enables more accurate reporting on conversions and can also help to improve ROI on audience building and retargeting campaigns.

* When the order is first processed, before the upsell, a Purchase event is sent to Facebook.
* Once an upsell is accepted, Littledata sends a separate event called **Post purchase upsell** (server-side) containing only the newly added products.

| Meta Event Name          | Actual trigger                                  |
| ------------------------ | ----------------------------------------------- |
| **AddPaymentInfo**       | User has accepted the charge.                   |
| **Purchase**             | Order is created and marked as paid in Shopify. |
| **Post purchase upsell** | User accepts the upsell.                        |

Here is how it should appear in the Events Manager:

![](/files/5QsBMl2BTMtpHDF54M79)

For example, you could build a lookalike audience from customers who had accepted an upsell, or analyze which campaigns had led to more upsells.

{% hint style="success" %}
See Littledata's [Meta CAPI Tracking Schema](https://docs.google.com/spreadsheets/d/1jHJo6hcAYSdYpL0SLRXqtbyDtOmApoF2vn8AQyQ9rgU/edit#gid=1443141432).
{% endhint %}

### Edge cases

If the order is manually edited in the Shopify Admin, or via an order editing app we will handle this as an upsell.

If a product is added to the order, the upsell is triggered. If a product is removed from the order, the upsell will not trigger.


# Tracking subscription orders in the Shopify checkout

How to track subscriptions in the Shopify checkout in GA4 (Google Analytics), Meta Ads, Google Ads and Segment.

Littledata automatically tracks all major subscription apps on Shopify, making it easy to differentiate one-off purchases from recurring orders and first-time subscription purchases in destinations such as Google Analytics, Google Ads and Meta Ads. Benefits include:

* Marketing attribution for recurring orders
* Enable reporting on [subscriber lifetime value (LTV) by channel](/google-analytics/subscriptions/subscription-revenue-by-channel-in-google-analytics-4)
* Build lookalike audiences for high LTV subscribers
* Block or target current subscribers from marketing campaigns
* Optimize Meta Ads campaigns for new subscription customers by triggering a [First Recurring Purchase](/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api#new-customer-vs-returning-customer-conversions) conversion
* Checkout funnel tracking, including [checkout extensibility](/sources/shopify/shopify-checkout-extensibility)
* Send the data back to [Google Analytics (GA4)](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4), [Google Ads](/integrations/google-ads/shopify-to-google-ads), [Meta Ads,](/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api) [Segment](/integrations/shopify-to-segment/how-it-works) and more

## Supported Shopify subscription apps

Littledata's automated server-side tracking works with all subscription apps in the Shopify checkout. We can support stores using the following apps to power subscriptions:

* [Recharge](/sources/recharge/how-it-works-recharge-to-google-analytics-connection)
* [Stay Ai](https://www.littledata.io/shopify/stayai)
* [Ordergroove](https://www.littledata.io/shopify/ordergroove)
* [Smartrr](https://www.littledata.io/shopify/smartrr)
* [Loop Subscriptions](https://www.littledata.io/shopify/loop)
* [Awtomic](https://www.littledata.io/shopify/awtomic)
* Skio
* Bold Subscriptions
* Appstle Subscriptions
* Casa Subscriptions
* PayWhirl
* Prive
* Recurpay
* Upscribe

## Which subscription events do you track?

For subscriptions in the Shopify checkout, Littledata tracks:

* **The checkout funnel**: how users and products progress through the [Shopify checkout steps](/sources/shopify/shopify-checkout-extensibility)
* **First-time subscription orders** which are tagged by the checkout app \*
* **Recurring orders** generated by the terms of the subscription contract

Our app stitches sessions together for unbiased marketing attribution, user path analysis, LTV analysis, CRO and conversion tracking in Google Analytics and other tools. Learn more about how [Littledata works behind the scenes](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4) to ensure 100% accurate conversion tracking and robust marketing attribution without the need for Google Tag Manager (GTM).

For Recharge, we also track [subscription lifecycle events](/sources/recharge/how-it-works-recharge-to-google-analytics-connection) including subscription skipped, charge failed and subscription updated.

\* Littledata picks up these order tags added up to 20 seconds after the order is created

## Where can I send the data?

### Google Ads and Analytics

Littledata's [GA4 connection](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4) sends browsing behavior, marketing, order, payment, refund and subscription data directly to Google Analytics. You can see complete subscription data directly in GA4 as well as any connected reporting tool (eg. Tydo, Sweet Analytics, Daasity, Looker Studio, Tableau, PowerBI) or Google BigQuery.

Littledata's robust [Google Ads](https://www.littledata.io/shopify/google-ads) integration also enables subscription audience building and retargeting across Google Ads networks, including with [enhanced conversions](/integrations/google-ads/google-ads-how-it-works).

### Meta Ads (Facebook and Instagram)

Littledata's [Meta Conversions API connection](/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api) (Meta API) sends checkout steps, LTV, order and subscription data back to Meta for audience building and remarketing in Facebook Ads and Instagram Ads.

### Twilio Segment

Littledata's [Segment connection](/integrations/shopify-to-segment/how-it-works) sends complete subscription data back to your Segment workspace. From there you can connect to data destinations like Mixpanel and Amplitude, engagement platforms like Klaviyo and Braze, and data warehouses like Snowflake.

## How can I see the orders in Google Analytics?

You can see the different order types in Google Analytics 4 by first [creating the Affiliation custom dimension](/integrations/shopify-to-google-analytics/create-affiliation-custom-dimension-ga4) and then using it to create an Exploration report with Affiliation as the main dimension and any combination of metrics (Purchase revenue, Conversions or Sessions).

{% hint style="success" %}
You can use this Affiliation dimension to create a segment of subscription customers. [See our video guide](https://blog.littledata.io/2023/03/15/how-to-create-segments-for-subscription-orders-in-google-analytics-4)
{% endhint %}

The main order types that are included in the Affiliation dimension are:

* **Shopify** - one time purchases
* **Subscription First Order** - the first order that starts a subscription
* **Subscription Recurring Order** - recurring orders

![](/files/rVZjISpTsk6QEJYm60wE)

The affiliation dimension is a comma-seperated list of order tags passed from the Shopify order. For example, to create a filter for only first orders you would filter by Affiliation **includes** `Subscription First Order`.

## Using Recurring Purchase in Meta Ads

For Meta Conversions API we [send the recurring orders](/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api#server-side-events) as a seperate `Recurring Purchase` event, which can be used to retarget only subscription customers - or build lookalike audiences from them.

* **One-time purchase & Subscription First Order** will register as a `Purchase`
* **Subscription Recurring Order** will register as a `Recurring Purchase`
* **Subscription First Order** will register as a `First Recurring Purchase`

## Compatibility with subscription apps

We've tested with all of the apps above, and the tracking of recurring orders works for all apps using the Shopify checkout. Please contact Littledata to check if the app you use is not on that list.

The affiliation dimension depends on order tags set by the checkout app:

* **Subscription First Order** - if an order tag contains the word `First Order`
* **Subscription Recurring Order** - if an order tag contains the word `Recurring Order`

We additionally pass through further tags set by the subscription app - see these app support docs for more order tags:

* [Recharge order tags](https://support.rechargepayments.com/hc/en-us/articles/360008829873-Using-Shopify-order-and-customer-tags#h_bfcabe5d-db08-4f97-bd59-097281451216)
* [Skio order tags](https://integrate.skio.com/skio/extras/subscription-tags)
* [Loop subscription tags](https://help.loopwork.co/article/150-subscription-tags) (you need to opt in to the tags)
* [Prive order tags](https://help.tryprive.com/prive-functionality-in-shopify-admin/order-tagging)


# How we track refunds in Segment and Google Analytics

Littledata integrates marketing channel data with browsing and purchase events for Shopify sites. To ensure complete, accurate data, we track [post-purchase upsells](/sources/shopify/tracking-post-purchase-upsells-in-the-shopify-checkout) in the Shopify checkout, as well as additional post-purchase events such as [recurring orders (subscriptions)](/sources/shopify/tracking-subscription-orders-in-the-shopify-checkout), cancellations and refunds.

This article explains what we do - and do not - track in terms of refunds and returns. It also explains how to view refund data in Segment and Google Analytics4.

## What is a refund event?

The refund event triggers when a customer is unhappy with what they have ordered and wants a refund. After you confirm and accept the refund, clicking the *Refund* button in the Shopify Admin triggers a Refund event in the destinations that you have connected.

Once you hit the *Refund* button, our app fetches the information we need to build the Refund event.

H﻿ere is how the order information is fetched so that the refund event includes the matching order information:

![Tracking Shopify refunds in Google Analytics](/files/jurG7Bs8A7KSn5vLUYIC)

## Returns vs Refunds

If you are using an app that has access to refunds, be aware that it may be not be triggering Littledata’s refund logic. Example return apps are:

* Returnly
* AfterShip
* Refund Logic

These apps allow customers to exchange products for store credit or other products. Shopify sees this as an order edit not a refund (i.e. product A is swapped for product B). Therefore, no refund event is sent to any destination.

Only if the value or partial value is refunded to the customer will a return result in a refund.

## Refunds in Google Analytics 4

In ***GA4,*** you can create an exploration with the `refunds` metric and you will have an overview of your refund orders.

{% hint style="info" %}
[See how you can build a Sales Performance report in GA4.](/google-analytics/conversions/how-to-build-a-sales-performance-report-in-ga4)
{% endhint %}

![How to see refunds in GA4](/files/v6jYoz60VDmG6n35yKN6)

## Refunds in Segment

In **Segment**, refunds will be found in your connected *source* debugger, by clicking the "Order Refunded" event.

![How to see refunds in Segment](/files/LkAHCZfjkwhutp2d1zDh)

## Attribution for refund orders

***Source/Medium*****&#x20;may change:** the *Source* and *Medium* dimensions of the refund data will reflect the campaign attribution and date used in the customer's last session. These may be different than the original transaction data.

***Example***: you have a transaction attributed to `google/cpc` from customer A on date 1. That customer then has a later session on date 2, attributed to `google/organic`. If you refund the original transaction, the refund data will be attributed to the most recent *Source/Medium,* which would be, `google/organic`, and the date will be set to the day the refund is uploaded.

## Why net revenue might be different in Google Analytics 4 vs Shopify

Google Analytics 4 adds the refund to the date of the order, while Shopify will add it to the date of the refund. This will cause expected discrepancies between the ***Net Revenue*** reported by the two tools.

## Supported refund types

Littledata supports all refund types that happen on your Shopify store:

**Full Refunds**

A full refund happens when you refund an entire order.

Littledata will send a *refund event* containing all the products the customer wanted to refund, with all the correct information and parameters (clientIDs, shipping cost, etc.).

**Partial Refunds**

A partial refund happens when a customer wants to refund only one or two items from the order (e.g. 3 out of 5).

Littledata will send a *refund event* containing only the products the customer wanted to refund, with all the correct information and parameters (clientIDs, shipping cost, etc.).

**Custom Refunds**

A custom refund happens when you refund the customer for a specific amount.

Littledata will send a Refund event containing NO products, but only the amount refunded to your customer.

| **Destination**              | F﻿ull refund | P﻿artial refund | C﻿ustom refund |
| ---------------------------- | ------------ | --------------- | -------------- |
| **Google Analytics 4**       | ✔            | ✔               | ✔              |
| **Segment**                  | ✔            | ✔               | ✔              |
| **Facebook Conversions API** | ❌            | ❌               | ❌              |

\* *Facebook does not have a predefined event for refunds*

## Refunds with multi-currency

If your store supports [multi-currency](https://www.littledata.io/multi-currency-for-shopify), then the refunds will be send in the currency presented to the customers.

What this means is that when you refund an order, the refund event sent by Littledata will have its values updated to match the store currency AND the presentment amount.

![Multi-currency refunds in Google Analytics](/files/25DmAQZpRKRDuCPvyXn1)

Above you can see how the Shopify shows the order before it is refunded, and below the order refunded, with the **presentment money** value.

![How it looks in Shopify](/files/rhw2sN6DeYhGRqtybzej)

## Edge cases

Littledata stores the orders for seven days, as a cache for refund information and parameters.

If a refund is placed and we do not have the order in the database, we'll get the order information through an API call to Shopify. (***If the order is not older than 60 days***)

If the refund takes place more than 60 days after the original order was placed, we'd have no way of collecting the order information and passing that through to Google Analytics.

## Opting out of refund events

With Littledata, you have the ability to customize your events and this also applies to refund events. If you wish to not track refunds, you can do so by going to your litteldata app, choose your desired connection and untick the event.

![](/files/MKODjFZH0sa0zJjYT2jl)

## L﻿earn more

* Learn [how Littledata sends the events](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4) from Shopify to Google Analytics
* View our Google Analytics 4 [tracking plan](https://docs.google.com/spreadsheets/d/1Qt9P8RQqfcu8SR07sZByViQrBg8808DGDIXpIjR9Wxo/edit#gid=277331750)
* See [how the Shopify to Segment connection works](/integrations/shopify-to-segment/how-it-works)
* View our Segment [tracking plan & event schema](https://docs.google.com/spreadsheets/d/1aljowRhMU9_7uGXmcipbP1Y14S4cOSdXGQA2Vx7BHko)


# Bot filtering

Filter fake cart and checkout events from bots before they reach GA4, Meta CAPI, Google Ads, and Klaviyo.

Bot protection automatically filters out fake cart and checkout events generated by bots before they reach destinations like GA4 or Meta. The result: cleaner funnel data, more reliable attribution, and ad platforms that optimize on real users instead of headless traffic.

{% hint style="info" %}
Bot protection is event-level data quality filtering. It doesn't block bots from reaching your store, and it doesn't replace Shopify's storefront-level bot mitigation. The two complement each other.
{% endhint %}

## When to enable it

Turn this on if you're seeing:

* Sudden or unexplained spikes in Add to Cart or Checkout events
* GA4 metrics that look noisy or don't match what your store is actually doing
* Conversion patterns that don't line up with campaigns, merchandising, or site changes
* Evidence of headless or scripted traffic in your destination reports

If your reporting feels untrustworthy and the noise can't be explained by traffic sources, product launches, or paid spend, bots are a likely culprit.

## How to enable bot protection

{% stepper %}
{% step %}

#### Open Littledata

Open the Littledata dashboard from your Shopify admin.
{% endstep %}

{% step %}

#### Open a destination

Go to **Settings** for a connected integration, such as GA4 or Klaviyo.

<div align="left" data-with-frame="true"><figure><img src="/files/RWRCPCPsrNFfLmWPZmH5" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

#### Open General

Open the **General** tab.
{% endstep %}

{% step %}

#### Turn Bot filtering on

Set **Bot filtering** to **ON**.

<div data-with-frame="true"><figure><img src="/files/HoQEnGiJ5GxvW98ksbgS" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

#### Save

Click **Save** to apply the change.
{% endstep %}
{% endstepper %}

## How it works

### Event-level filtering

Detection happens at the individual event level rather than at the page or session level. This means it also catches direct spam calls to data destinations: bots that bypass your store entirely and fire events straight at a public GA4 measurement ID, Meta pixel, or similar endpoint are filtered just like bots that hit your storefront.

### Deterministic signals, minimal false positives

Classification is based on deterministic checks rather than probabilistic scoring or thresholds. An event is only flagged when a clear, reproducible set of conditions is met. This keeps false positives close to zero and avoids the unpredictability of rate-based or score-based bot detection.

### Flagged events are dropped, not forwarded

When an event is classified as bot traffic, Littledata drops it before forwarding. It does not reach GA4, Meta, Klaviyo, Google Ads, or any other connected destination, keeping your reporting and ad optimization signals clean.

## What gets caught

* Headless bots that hit your store and fire fake Cart or Checkout activity
* Direct attacks against your destination endpoints, for example bots posting events straight to a public GA4 measurement ID without ever visiting the store
* Consistent volume attacks with a steady cadence
* Randomized or low-frequency, high-quantity attacks where timing alone wouldn't flag them

## What's out of scope

* Bots that fully simulate a real browser session
* Auto-checkout bots that complete real purchases (this is what Shopify's built-in bot protection covers)
* Event types other than Cart and Checkout

## FAQ

* **Will this drop events from real customers?**\
  The classification logic is deterministic and built around signals that real browser sessions almost always produce. Real shoppers, even those on strict privacy settings or with ad blockers, will not be filtered.
* **Does this affect events other than Cart and Checkout?**\
  No. Other events flow through unchanged.
* **Where can I see which events were filtered?**\
  Dropped bot events are not forwarded to destinations and won't appear in your GA4, Meta, or other reports. During the beta we monitor aggregate filter activity internally to validate accuracy.
* **Does this replace Shopify's bot protection?**\
  No. Shopify's bot protection prevents auto-checkout bots from completing purchases at the storefront. Littledata's bot protection prevents bot-generated events from contaminating your analytics and ad platform data. Most stores benefit from running both.
* **Can I disable it later?**\
  Yes. Turn **Bot filtering** off in that destination's **General** tab and save. Events then resume forwarding to that destination as normal.


# Shopify Markets


# Setup & sync flow for Shopify Markets

Littledata integrates with **Shopify Markets** so you can configure tracking and integrations **per market** across supported destinations like **GA4, Klaviyo** and **Meta**.

{% embed url="<https://www.youtube.com/watch?v=ADEZROCd0ec>" %}

Once enabled, Littledata automatically stays in sync with your Shopify Markets setup — so when markets change in Shopify, your Littledata configuration updates automatically.

## How Shopify Markets syncing works

Littledata continuously syncs your Shopify Markets using:

1. **Shopify Admin API** – to fetch the current list of markets
2. **Shopify webhooks** – to detect changes as they happen

This allows Littledata to track when markets are active, draft or deleted. The list of active markets in your Shopify Admin will always match what you see in Littledata.

## Enabling Shopify Markets in Littledata

When you enable the **Markets module** during setup:

1. Littledata fetches and displays all currently active Shopify Markets
2. Enabling the module Makes all supported destinations market-aware and allows you to configure events and integrations **per market**, rather than globally:

![](/files/E0M7SkWOOwmm55fM0T3p)

At this stage, each market is initialized using **default (factory) settings**, which you can customize later.

## Managing markets after setup

Once the Markets module is enabled:

* Any activated destination will show a **Markets table**
* Each row represents **one active Shopify market**
* From this table, you can view all active markets and adjust tracking or integration settings **per market**:

![](/files/lUZCE8cVyG8rVEspoXY6)

This makes it easy to tailor your setup for different regions, currencies, or storefront strategies without duplicating connections.

## What happens when markets change in Shopify?

Shopify remains the **source of truth** for market state. Littledata does not create or manage markets directly.

Here’s how changes are handled:

1. **Market added in Shopify**\
   → Automatically appears in Littledata
2. **Market disabled in Shopify**\
   → Removed from active configuration
3. **Market deleted in Shopify**\
   → Removed from active configuration

All updates are propagated automatically via **webhooks and API syncing**, usually in near-real time.

## Market parameters in Littledata events

All Littledata events are market-aware by default, regardless of whether the markets module is enabled. This means **every event includes market identification parameters**, allowing downstream tools (such as GA4 and ad platforms) to segment, filter, and report based on market context. This behavior is always on and does **not** depend on per-market configuration.

Each event includes the following parameters. Both are always sent together. For events attributed to [**Unassigned markets**](/sources/shopify-markets/unnasigned-markets), Littledata uses fixed system values (market\_id = 0, market\_handle = unassigned\_market) that do not correspond to any Shopify market.

| Parameter      | Description                                                                                                           |
| -------------- | --------------------------------------------------------------------------------------------------------------------- |
| market\_handle | The handle of the Shopify Market for this event. Fixed as `unassigned\_market` for orders not attributed to a market. |
| market\_id     | The internal Shopify Market ID for this event. Fixed as `0` for orders not attributed to a market.                    |

### When to use market\_handle vs market\_id

Use **market\_handle** when building reports or audiences that need to be human-readable — for example, filtering a GA4 report by "eu-french-speaking" or creating a Klaviyo segment labeled by region. The handle makes it easy to understand at a glance which market data belongs to, and it matches the name you've set in Shopify.

Use **market\_id** when joining market data across systems or building automated logic that needs a stable, unchanging reference. Unlike the handle, the market ID is assigned by Shopify and never changes — even if you rename the market. This makes it the safer choice for data warehouse joins, API integrations, or any workflow where a renamed market would otherwise break your logic.

## How destinations handle market parameters

1. **Analytics & Ads platforms** (GA4, Meta, TikTok, Pinterest, Google Ads, Microsoft Ads):\
   All supported events include market\_handle and market\_id as event parameters.
2. **Klaviyo**:\
   Events include market\_handle and market\_id, along with customer\_locale for backward compatibility. Market parameters are also synced as **customer profile attributes**.

Exact parameter naming and placement can vary by destination, so destination-specific schemas should be used as the source of truth.


# How markets are detected

How markets are detected in Shopify

## How Shopify determines a visitor’s market

Shopify assigns each visitor to a market experience using signals like IP address (approximate location), browser and device information, and the merchant’s Shopify Markets configuration and rules.

Based on these signals, Shopify selects the most relevant market (for example US, UK, EU) and serves the matching storefront experience such as currency, language, pricing, and domain.

## Why we don’t rely on Shopify webhooks for market detection

Shopify webhooks are not market-aware. For example, the order webhook doesn’t include which market the order belongs to. The same limitation applies to other webhook events (checkout, customer, etc.).

Because webhooks don’t tell us the market, we determine market context from the storefront session, where Shopify has already selected the market for the visitor. This is why market detection depends on our **tracking script**, not backend events.

## How Littledata detects the market

1. On the storefront, Shopify exposes the **currently selected market** in its storefront context.
2. Littledata tracker reads that value directly from the storefront.
3. Littledata tracker sets the market in the Littledata data layer, for example:

`LittledataLayer.market = { id: 886112389, handle: "us" }`

This represents the market Shopify has assigned to the visitor’s current session.

## How market data flows through our system

After we detect the market, we add it to the visitor’s journey together with key identifiers (such as the cart token) and standard attribution data. We then include the market in the event payload that gets sent to our servers. In addition, we persist the market on the Shopify order as a `note_attribute` under `ld_attr`.

This setup allows us to connect the full customer journey to a specific market and to attribute downstream events (such as checkout and purchase) to the correct market.

## How we use market data internally

When we process events, we first determine which Shopify Markets are currently active, in draft, or disabled based on our Shopify sync. We then apply the customer’s Littledata configuration, including any per-market settings and destination-specific rules for tools like GA4 and Meta. Using those rules, we decide whether the event should be sent at all and, if it is sent, which destinations should receive it.

This allows customers to run different tracking behavior per market while keeping a single Shopify store.


# How destination settings behave with Shopify Markets

This article explains how Littledata destination settings behave before, during, and after enabling the Shopify Markets module.

| **Markets Module** | **Settings Applied**     | **Destination ID**              | **Per-market settings**    |
| ------------------ | ------------------------ | ------------------------------- | -------------------------- |
| Disabled           | One global configuration | Current (unique) destination ID | No market settings         |
| Enabled            | Market configuration     | Per market destination ID       | Per market settings active |

## Before enabling Markets

Before you enable Shopify Markets, each destination has a global configuration. That configuration includes things like the destination ID, which events you’re sending, and any filters you’ve set up. You can think of this as one default market: whatever you configure for that destination applies everywhere your store sells, because there’s only one set of settings to use.

## After enabling Markets

Once you enable Markets, that changes. Instead of one global setup per destination, Littledata treats each market as its own configuration. That means destination settings become **per-market**, so you can choose different destination IDs, event selections, or filters for different markets when you need to.

In other words, enabling Markets moves you from one configuration used globally to configurations managed market by market.

What happens with your previous settings once markets is enabled:

* Only **market-aware** destinations are affected
* Each market has its own configuration
* **Factory settings** are applied: all default event toggles ON, and previous filters or customizations are not carried over.
* Destination IDs are preserved.
* **Default destination ID** is used for new or re-enabled markets, and changing it only affects future markets, not existing ones\\

## Market lifecycle

* When you create a new market in Shopify, Littledata sets it up using factory settings and your default destination ID.
* If a market is deleted or moved to Draft in Shopify, it’s removed from Littledata.
* If you re-enable a market later, Littledata treats it like a brand-new market: factory settings and the default destination ID are applied again, and any previous customizations aren’t restored.

{% hint style="info" %}
**Example**

If the UK market is drafted in Shopify, it disappears from Littledata. If the UK market is re-enabled, it returns as a new market with factory settings and the default destination ID.
{% endhint %}

## Disabling Markets

When you disable Markets, destinations stop being market-aware and revert to the pre-Markets configuration snapshot, restoring your previous event toggles and filters. Your current default destination ID is preserved and becomes the global destination ID again, helping ensure you don’t accidentally send data to an outdated ID.

{% hint style="info" %}
**Example**

In pre-market settings for GA4, the **page\_view** event was disabled. Once Markets was enabled, **page\_view** became enabled.

When Markets was disabled again, **page\_view** returned to being disabled.
{% endhint %}

## Re-enabling Markets

When you re-enable Markets, Littledata applies a fresh configuration layer: all markets are initialized with factory settings and the default destination ID, and any previous per-market customizations aren’t restored.\\

**Key takeaway**

Markets create a clean per-market configuration layer while preserving destination IDs. Disabling Markets restores your previous global setup, letting you experiment safely without losing historical settings.


# Shopify Markets FAQ

Frequently asked questions about Shopify Markets

## Settings

1. **What happens when the Markets module is enabled?**\
   When you enable the Markets module, Littledata fetches all active Shopify markets, enables per-market configuration for market-aware destinations (such as GA4 and Meta), and seeds each active market with factory-default settings. At the same time, Littledata creates a special internal market called **Unassigned markets**.
2. **What happens when the Markets module is disabled?**\
   When you disable the Markets module, per-market settings stop being used and each destination reverts to its initial settings snapshot (the configuration it had before Markets was enabled). The destination continues to use whatever is currently set as the default destination ID. Any market-specific settings (including **Unassigned markets**) are not applied and are effectively forgotten.
3. **What happens when Markets is re-enabled?**\
   Re-enabling Markets resets per-market configuration. All markets are seeded again using factory-default settings, including previously existing Shopify markets, newly discovered Shopify markets, and **Unassigned markets**. Any prior per-market configuration is not restored. Destinations switch back into market-aware mode using these newly seeded settings.
4. **Are per-market settings copied from global settings when Markets is enabled?**\
   No. Markets are seeded using factory defaults rather than being cloned from global settings.
5. **Can customers change market\_handle?**\
   Yes. It is derived from the Shopify market name by default, but it can be customized by the user in Littledata.

## How Markets work

1. **Where does Littledata get market information from?**\
   Littledata reads market data directly from Shopify using the Shopify Admin API and Shopify webhooks. Shopify remains the source of truth for which markets exist and whether each market is active, draft, or deleted.
2. **Does Littledata create or manage Shopify markets?**\
   No. Littledata only reads market data from Shopify and never creates, edits, or deletes Shopify markets. Alongside your Shopify Markets, Littledata also creates a special internal market called **Unassigned markets.** This market lives only within Littledata - it is an internal market and is not reflected in your Shopify markets list.
3. **How are new markets handled?**\
   When Shopify adds a new active market, Littledata detects it automatically via the Shopify Admin API and webhooks, seeds it with factory-default settings, and seeds it with the currently set default ID. Draft or disabled markets are stored but are not shown as active.
4. **What if the tracking script fails to fetch markets?**\
   In that case, events are routed to **Unassigned markets**. This prevents event loss during temporary failures. However, this is an unlikely scenario.
5. **Why does Littledata send both market\_handle and market\_id?**\
   market\_handle is human-readable and useful for reporting and filtering, while market\_id is the canonical Shopify identifier and is stable over time. They serve different purposes, so they should be sent together.

## Unassigned Markets

1. **What is Unassigned markets?**\
   **Unassigned markets** is an internal Littledata-only market used as a fallback when a Shopify market cannot be determined for an event. **It does not exist in Shopify**, it appears under every market-aware destination, and it has its own settings like any other market.
2. **Why does Unassigned markets exist?**\
   It exists to prevent data loss when market attribution is not possible and to provide explicit routing rules for events where the market is unknown.
3. **When do events become unassigned?**\
   Events can become unassigned whenever Littledata cannot resolve a Shopify market. Common examples include draft orders, POS orders, orders created in Shopify Admin, third-party channel orders (such as Amazon), imported data, tracking script failures, or situations where Shopify context is missing.
4. **What happens to unassigned events?**\
   Unassigned events are routed using the Unassigned markets configuration and are still sent to destinations. They are not dropped and they are not silently assigned to another market.
5. **Does Unassigned markets follow the same lifecycle as other markets?**\
   Yes. It is created when Markets is enabled and reactivated when Markets is re-enabled.
6. **What values are used for Unassigned markets?**\
   For unassigned events, Littledata uses fixed system values: `market_id = 0` and `market_handle = unassigned_market`.
7. **Can unassigned events be disabled separately?**\
   Yes. Because **Unassigned markets** behaves like a normal market, it has its own per-destination configuration and can be disabled independently per destination.
8. **Can Unassigned markets be removed?**\
   No. It is system-defined and is always present when Markets is enabled.


# Unassigned Markets

When the **Markets module** is enabled, Littledata fetches all active Shopify Markets and makes them available for **per-market configuration** for all destinations.

Alongside your Shopify Markets, Littledata also creates a special internal market called **Unassigned markets,** which exists to ensure events are still processed and sent downstream when a Shopify market cannot be reliably identified.

## What are unassigned markets?

Unassigned markets are a Littledata-only fallback market that:

1. Exists **only inside Littledata**
2. Is **not created in Shopify**
3. Appears under **every market-aware destination**
4. Is used when a Shopify market **cannot be determined for an event**

Rather than dropping events or assigning them incorrectly, Littledata routes them to **Unassigned markets** so your data remains complete and predictable.

## Why unassigned markets exist

Shopify does not always provide enough context to reliably identify a market for every event.

Without a fallback market:

* Events could be dropped entirely
* Events could be misattributed to the wrong market
* Reporting and optimization would become unreliable

By routing these events explicitly, Littledata avoids silent data loss and makes edge cases visible and manageable.

## When events are assigned to unassigned markets

An event is routed to **Unassigned markets** when Littledata cannot resolve a valid Shopify market. This typically happens when events originate:

**Outside normal online storefront flows:**

* Draft orders
* POS orders
* Orders created directly in Shopify Admin
* Third-party sales channels (for example, Amazon or marketplace apps)
* Imported or historical data\\

**Or due to tracking limitations:**

* The tracking script cannot fetch market data (for example, network issues or blocked requests)
* Required Shopify context is missing or unavailable at the time the event fires

In these cases, no Shopify market ID can be derived, so the event is assigned to Unassigned markets instead.

## Lifecycle and configuration behavior

When the **markets module** is enabled or disabled, **Unassigned markets** follow the same lifecycle and configuration rules as regular Shopify markets:

1. They appear automatically on all market-aware destinations
2. They can be configured consistently alongside other markets
3. They remain available as a fallback whenever market attribution is not possible

\\


# Recharge


# Overview

Littledata’s [Recharge connection](https://www.littledata.io/shopify/recharge) is an advanced tracking solution for Shopify stores using Recharge to power their subscription ecommerce. Once activated, it unifies events from Shopify and Recharge into one customer journey in your marketing channels.

## Connection benefits

* Accurate sales data, including first-time orders, recurring payments and subscription lifecycle events
* Accurate marketing attribution for first-time orders, recurring payments and subscription lifecycle events
* Custom dimensions for calculating LTV and more
* Optimize Meta Ads campaigns for new subscription customers by triggering a [First Recurring Purchase](/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api#new-customer-vs-returning-customer-conversions) conversion
* Fully compatible with Online Store 2.0 and one-page checkout
* Works with [headless Shopify](/sources/shopify/headless-shopify/working-with-a-headless-shopify-setup) setups

{% hint style="success" %}
The Recharge connection is compatible with all Littledata's marketing destinations. You need to connect those destinations first (e.g. Google Analytics, Segment, Meta Ads)
{% endhint %}

## Connection details

1. **Attribute recurring orders and LTV back to campaigns** The Recharge connection works in tandem with Littledata's connections for [Shopify to Google Analytics](/integrations/shopify-to-google-analytics) and [Shopify to Segment](/integrations/shopify-to-segment/how-it-works). We use a combination of server-side and client-side tracking for complete data, and ensure recurring orders and customer lifetime value (LTV) can be attributed to marketing campaigns.
2. **Track subscriptions in Meta Ads** Littledata can push recurring orders and subscription events into Meta Conversions API, allowing you to build audiences from your highest value customers.
3. **Custom dimensions** Littledata adds [custom dimensions](/google-analytics/conversions/customer-lifetime-value-google-analytics) (also called user properties in GA4) for building cohorts and reporting in Google Analytics and connected data tools. These include:
   * Shopify Customer ID
   * Last Transaction Date
   * Purchase Count
   * Lifetime Revenue
   * App Name

## Learn more

You can install the Recharge connection directly in the Littledata app, or from your Recharge admin.

* See [how the Recharge connection works](/sources/recharge/how-it-works-recharge-to-google-analytics-connection)
* Read the Recharge connection [install guide](/sources/recharge/recharge-integration-setup-guide)
* Learn about [using custom dimensions in Google Analytics](https://blog.littledata.io/2019/09/19/quick-tips-for-subscription-stores-using-custom-dimensions-in-google-analytics) (blog post)


# How it Works: Recharge to Google Analytics connection

Learn how our Recharge Shopify integration audits your Google Analytics setup and applies an improved tracking script to your store.

![shopify to google analytics](/files/yALWPDB639pkiPUzh8Yn)

This is a guide to how Littledata's Recharge connection works with your Google Analytics setup. We look at which subscription events you can track, how to use Littledata's views and filters in your Google Analytics account, and how the integration works behind the scenes.

{% hint style="success" %}
For information on sending Recharge data to your Segment workspace, see the[ Shopify to Segment guide](/integrations/shopify-to-segment/how-it-works) (under "Subscription events").
{% endhint %}

## Tracking subscription orders

In addition to the one-off orders tracked automatically by Littledata's [Shopify connection](/integrations/shopify-to-google-analytics), our [Recharge connection](/sources/recharge) tracks different types of subscription orders, including first-time subscription orders, recurring orders, and prepaid subscriptions. This helps with both marketing analysis (seeing where subscribers come from) and LTV analysis (seeing where your *best* subscribers come from, and how their subscriptions evolve over time).

We automatically sets the **order affiliation** in Google Analytics for all orders coming from Recharge as follows:

1. **First time subscription** orders are tagged as `Subscription First Order` \*
2. **Recurring orders** generated by the terms of the subscription contract are tagged as `Subscription Recurring Order`
3. **Prepaid recurring orders** generated by the terms of the subscription contract are tagged as `Subscription Prepaid Order`

\* For subscriptions in the Shopify checkout, this affiliation is only added once you have authorized Littledata's app to access Recharge.

In Google Analytics you'll need to create an event-scope custom dimension for the `affiliation` property to use this in segments or reports.

![adding affiliation dimension](/files/JurqLUQE6nhVKXrrpew9)

## Subscription lifecycle events

Littledata sends subscription lifecycle events to Google Analytics and [Segment destination](/integrations/shopify-to-segment/how-it-works).

We automatically tie these events back to the original customer web session. This means that you can retarget customers in Google Ads whose payments have reached the maximum number of retries, or see how many cancellations came after users clicked on an Instagram Ad.

![find recharge events in GA](/files/N2zOTLiLNCsHBRkgkIem)

The following events are tracked by default:

| Event                      | Google Analytics event       |
| -------------------------- | ---------------------------- |
| Subscription Created       | subscription\_created        |
| Subscription Cancelled     | subscription\_cancelled      |
| Subscription Updated       | subscription\_updated        |
| Subscription Skipped       | subscription\_skipped        |
| Subscription Charge Failed | subscription\_charge\_failed |

## Where to find subscriptions in Google Analytics

With the Recharge connection, you can distinguish between three types of order:

1. **One-time orders** (affiliate code: `Shopify`) standard one-off orders through your Shopify checkout
2. **First-time subscriptions** (affiliate code: `Subscription, Subscription First Order`): first-time subscription orders made via Recharge
3. **Recurring orders** (affiliate code: `Subscription, Subscription Recurring Order`): recurring subscription orders made via Recharge
4. **Prepaid orders** (affiliate code: `Prepaid, Subscription, Subscription Recurring Order`) recurring subscription orders made via Recharge that are paid in advance for a fixed period of time, usually 6 or 12 months.

Learn more about how to [segment orders using the 'Affiliation' dimension](/sources/recharge/how-to-check-if-the-littledata-recharge-integration-is-working) in Google Analytics.


# Getting started: Recharge connection

Learn how Littledata's Recharge integration automatically tracks first-time and recurring orders from checkout and then sends that data to Google Analytics.

Littledata's Recharge source plugin automatically tracks first-time and recurring orders from the Recharge checkout and sends that data to your connected destinations.

Follow these steps to install the plugin.

#### Connecting Recharge via Recharge Admin

In Recharge Admin, under **Marketplace,** search for **Littledata** and click **Get**:

![](/files/PAmkcSq5FlqcQKeD8sAZ)

#### Connecting Recharge via the Littledata dashboard

In the Littledata dashboard, you will find the Recharge source plugin.

Access it and follow the setup process to authorize Recharge with Littledata.

![](/files/Y5Tmf6snv2lDHcexE1RP)


# How to check if the Recharge connection is working

The Littledata Recharge connection automatically tracks Recharge orders and sends subscription data to Google Analytics. Here's how to ensure it's working.

Littledata's Recharge source plugin automatically tracks Recharge orders and sends that subscription data to your connected destinations.

This is a quick guide to check if the plugin is correctly set up.

{% hint style="info" %}
Before using this guide, check Google Analytics to make sure you've had some orders, and that some of those are recurring orders. Otherwise, there's nothing to validate!
{% endhint %}

## Marketing attribution problems

Please see our separate article on [marketing attribution for Shopify](/advanced/troubleshooting/troubleshooting-marketing-attribution-for-shopify).

## First-time payments vs Recurring payments

As you know, a recurring payment does not require another user interaction with your website once the First-time payment has been successfully processed. This is why we split the subscription types (First-time or Recurring) in order to keep the accurate conversion rate for your marketing efforts.

In Google Analytics 4, it's a very straightforward thing to check. The easiest way to do it is to go to your **Property,** check **Real Time View,** and then scroll down until you see the **Conversions** Section. There, you will see your Recharge conversions are marked as *subscriptions.*

Next to the **Conversions** section, you can see **Events.** There you have an overview of all events in the past 30 minutes. If you scroll through the pages, you can see all types of subscription events made on your store recently.

![](/files/354LREUxUzXS7W1mcSED)

Additionally, you can create a custom report that filters only subscription events.

For all subscriptions that started *after* you installed the Littledata app, you will be able to group those payments by subscriber, and group by the marketing channel or campaign that caused them to start subscribing.

If you have any issues, please [contact our support team](https://www.littledata.io/contact-us)!


# Recharge Uninstall Guide

Learn how to disable the Recharge connection and make sure that the original settings are put back into place.

If you have the Littledata Recharge connection enabled, follow the below steps to disable the connection and restore your original Recharge settings:

**Step 1.** In the Littledata app\*\*,\*\* go to the **Connections** panel, then click on the **Recharge** connection:

**Step 2.** Click on **Disconnect**:

![Uninstall Recharge](/files/1El5PwrIj3cyxYEqgFpr)

The Littledata Recharge connection is now disabled!


# FAQ: Recharge connection

Get answers to frequently asked questions regarding our Recharge integration for Shopify merchants.

Littledata's Recharge connection is an advanced Google Analytics integration for tracking subscription ecommerce behavior. Here are Frequently Asked Questions to help you understand and get started using the integration.

<details>

<summary>What do I get with the Recharge integration?</summary>

* End-to-end [Google Analytics](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4)) tracking for the subscriber journey
* Marketing attribution for subscription revenue
* [Custom dimensions](/google-analytics/conversions/customer-lifetime-value-google-analytics) to calculate lifetime value and create custom audiences for retargeting
* Ability to segment performance in Google Analytics by payment source, subscription plan type, and product category
* Recharge susbcription [lifecycle events](/sources/recharge/how-it-works-recharge-to-google-analytics-connection)

</details>

<details>

<summary>How does this improve on Shopify’s native reporting?</summary>

* Fix your ecommerce tracking in Google Analytics
* Send data to Google Analytics 4 (GA4) and Facebook Conversions API (CAPI)
* Attribute recurring payments to marketing campaigns

Check out the [complete list of what you can track](/integrations/shopify-to-google-analytics) to see the full scope of reporting.

</details>

<details>

<summary>Can’t I just use Recharge’s basic Google Analytics integration?</summary>

As the name states, that's just a basic [integration](https://support.getrecharge.com/hc/en-us/articles/360008683194-Google-Analytics). That means your data collection will be limited and have incomplete marketing attribution for subscription sales, plus there is no tracking for GA4 or Facebook CAPI.

Littledata's Recharge connection is an advanced Google Analytics integration for Recharge stores. We've worked closely with the Recharge team to make Littledata the most powerful and flexible analytics integration for Recharge — and we continue to update the connection based on the latest product updates from both Shopify and Recharge.

</details>

<details>

<summary>I get UTM parameters from the Recharge Subscription API. Do I still need Littledata?</summary>

Since the release of Recharge v3.2, the UTM parameters as captured by Shopify on the store landing page are passed to the checkout then [stored on the subscription or customer record](https://support.rechargepayments.com/hc/en-us/articles/360041127093-Using-cart-attributes-and-UTM-parameters-in-URLs). They are available in the `analytics_data.utm_params` field.

This is helpful, but it misses a few key parts of what Littledata does:

1. Shopify's own UTM tracking is [far from perfect on most stores](https://blog.littledata.io/2019/02/04/shopifys-sales-by-traffic-source-report-is-broken), and the same mistakes get copied into Recharge's UTM params.
2. The UTM parameters only capture the 'last click' attribution of the subscription; with Littledata + Google Analytics you can look at the contribution from all marketing channels.
3. If you also have one-time orders processed through Shopify's checkout, you need Littledata's [Shopify tracking](/integrations/shopify-to-google-analytics) to compare like-for-like attribution across the two checkouts.
4. In Google Analytics you can look at the interaction between the campaign and other user attributes. For example, you can ask "Do Facebook ads perform especially well in the US, or globally?" Or "are affiliates driving more subscriptions on mobile only?"
5. Tracking Recharge customer [lifecycle events](/sources/recharge/how-it-works-recharge-to-google-analytics-connection) allows you to split post-purchase behavior like cancellations and payment failures as well as edit customer details by the marketing channel that brought them to subscribe.

</details>

<details>

<summary>What's the difference between Recharge Analytics and Littledata's integration?</summary>

Recharge's [Analytics](https://support.getrecharge.com/hc/en-us/articles/360044363954-Recharge-Analytics) offers easy ways to visualize your Recharge data in the app, while Littledata fixes sales and marketing tracking and sends that data to Segment or Google Analytics.

The chart below breaks down the differences between what Recharge Enhanced Analytics offers and what Littledata's Plus offerings for Google Analytics and Segment offer.

| **What you can do**                                                                   | **Recharge Enhanced Analytics** | **Littledata + Google Analytics** | **Littledata + Segment** |
| ------------------------------------------------------------------------------------- | ------------------------------- | --------------------------------- | ------------------------ |
| Look at trends in subscription signups and cancellations                              | ✔                               | ✔                                 | ✔                        |
| Analyze churn rate by cohort or product                                               | ✔                               | ✔ \*                              | ✔ \*                     |
| Visualize cohort retention                                                            | ✔                               |                                   |                          |
| Analyze multichannel marketing contributions to subscription sales                    | ✔                               | ✔                                 | ✔                        |
| Attribute recurring orders back to marketing campaigns                                | ✔                               | ✔                                 | ✔                        |
| Analyze Customer Lifetime Value including non-Recharge spend                          |                                 | ✔                                 | ✔                        |
| Track charge failures by any customer attribute                                       |                                 | ✔                                 | ✔                        |
| Track subscription cancellations or upgrades by any customer attribute                |                                 | ✔                                 | ✔                        |
| Track customer updates by any customer attribute                                      |                                 | ✔                                 | ✔                        |
| Track usage of the customer portal on your site by any customer attribute             |                                 | ✔                                 | ✔                        |
| See how any Recharge customer event connects to the pre-checkout behavior of the user |                                 | ✔                                 | ✔                        |
| Look at cancellation rate by marketing channel                                        | ✔                               | ✔                                 | ✔                        |
| Trigger transactional emails based on changes to subscriptions \*\*                   |                                 |                                   | ✔                        |
| Retarget segments of your Recharge audience in common marketing destinations          |                                 |                                   | ✔                        |

\* Requires additional analysis in a spreadsheet\
\*\* In Segment destinations such as [Iterable](https://segment.com/docs/connections/destinations/catalog/iterable)

</details>

<details>

<summary>How do I know if the integration is working?</summary>

* Check out [this guide](/sources/recharge/how-to-check-if-the-littledata-recharge-integration-is-working) to see if the Recharge connection is functioning properly.
* [Contact](https://www.littledata.io/contact-us) our team if you have additional questions.

</details>

<details>

<summary>Do you alter my historic data?</summary>

* No, it's not possible for our app to mess with your historic data (nor would we want it to).
* Littledata's improved tracking script only helps with data from the time you install it going forward.

</details>

<details>

<summary>How do I uninstall the Recharge connection?</summary>

If you need to uninstall the Recharge connection, follow the steps in the Recharge [uninstall guide](/sources/recharge/how-to-disable-the-recharge-connection). But don't forget that you can always [contact support](https://www.littledata.io/contact-us) if you have any questions!

</details>


# Profit Signal


# How to use Profit Signal

Profit Signal sends the contribution margin of each order to your marketing destinations, so your ad platforms can optimize toward profit instead of revenue.

* For **Google Ads**, it changes the conversion value from revenue to profit.
* For **Meta Conversions API**, it adds the profit to each purchase event as `net_revenue` and leaves the order value as revenue.
* For **Google Analytics 4** and **Segment**, it adds a `profit` parameter without changing the reported revenue value.

This guide explains how to enable Profit Signal, how profit values are calculated, and how to use those values to optimize your ads.

## How to enable Profit Signal

{% stepper %}
{% step %}

### Select Profit Signal source

Within the Littledata app, find the Profit Signal source and click **Enable**.

<figure><img src="https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-852935c2b44875384c44dba3298d33089cda84e9%2Fimage%20(8).png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Configure global margin

After the basic setup, you will be prompted to set your global margin. This is applied to every product on your store and is used to calculate the profit.

<figure><img src="https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-753b514e978ad8fe8c98b06487dfcdf0168f3560%2Fimage%20(140).png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Product specific margin

Configure margin based on **Product Type**, **Vendor**, or product **Tag**. A product specific margin overwrites the global margin and only the **first match** found on the product is applied.

<figure><img src="https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-d61e3fb5286f1cba36d1cef8583a2b992033c84f%2Fimage%20(141).png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Turn on for destinations

Pick the connections you want Profit Signal to apply to, then enable it. Only the destinations you select here receive profit values, so you can start with one platform and leave the rest reporting on revenue.

The destination has to be connected first. For Meta, that means an active Meta Conversions API connection.

<figure><img src="https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-97dfd87ddff36dcde7b6957315a060930c08f301%2Fimage%20(142).png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

## How profit values are calculated

Littledata uses the gross margin you set to calculate the value sent with each order.

The calculation is product-based: Littledata starts from the order's gross revenue, removes shipping, tax, and discounts, and then applies your product margin to what remains to arrive at the profit value.

Where that profit ends up depends on the destination. For Google Ads it replaces the conversion value. For Meta, Google Analytics, and Segment it is sent alongside the untouched revenue value, as `net_revenue` for Meta and as a `profit` parameter for Google Analytics and Segment. For Google Analytics you will need to enable this as a custom metric.

You can change your margin settings at any time. Any orders processed after the change will use the updated configuration for profit-based values.

### Global margin vs per-product margin

You can set a global margin that applies across your catalog, and add category margins for more precise control. Per-product margins override the global margin: if more than one per-product margin could apply, Littledata uses the first matching rule it finds.

## Optimizing ads using gross profit

Once Profit Signal is feeding profit values to your ad platforms, you can let their bidding algorithms optimize toward gross profit rather than top-line revenue. This shifts spend toward orders that are genuinely profitable, instead of high-revenue orders that may carry thin margins.

### Destination comparison

| Destination name   | How profit is sent                           | Revenue still reported |
| ------------------ | -------------------------------------------- | ---------------------- |
| Google Ads         | Replaces the conversion value                | ❌                      |
| Meta Ads           | Added as `net_revenue` on the purchase event | ✅                      |
| Google Analytics 4 | Added as a `profit` parameter                | ✅                      |
| Segment            | Added as a `profit` parameter                | ✅                      |

### Meta Ads

For Meta Conversions API, Profit Signal adds the calculated profit to each purchase event as `net_revenue`. The `value` parameter is left alone and still carries the order revenue, so Meta receives both numbers and you decide which one to bid on.

In Ads Manager, pick **Profit** as your value optimization option and Meta bids on the `net_revenue` we send instead of order revenue. Budget then moves toward the orders that leave the most margin rather than the biggest baskets.

Because revenue keeps flowing in the `value` parameter, turning Profit Signal on does not disturb your existing reporting or your value-based campaigns. You can leave campaigns on standard value optimization, compare the two over a few weeks, and switch when the numbers make the case.

For more on how Littledata sends data to Meta, see How it works: Shopify to Meta Conversions API.

### Google Ads

For Google Ads, Profit Signal switches the reported conversion value from revenue to profit. Pair this with a value-based Smart Bidding strategy such as **Maximize conversion value** or **Target ROAS** so the algorithm optimizes against profit.

With profit as the conversion value, your reported ROAS becomes a return on profit. Campaigns that drive high revenue but low margin will look less attractive, and budget naturally moves toward the products and audiences that generate the most profit.

For more on how Littledata sends data to Google Ads, see How it works: Google Ads.


# How to check Profit Signal in Meta

Once Profit Signal is enabled on your Meta connection, Littledata adds the profit of each order to the purchase event as `net_revenue`. This guide shows you how to confirm Meta is receiving it, and what else Meta needs before you can optimize on profit.

## Confirm Meta is receiving profit

{% stepper %}
{% step %}

### Open your dataset

In Meta Events Manager, open the dataset connected to Littledata.
{% endstep %}

{% step %}

### Switch the columns view

From the dropdown, select **Columns: Value and currency metrics**.

<figure><img src="/files/l5knVNjBcpdlvk4xXymr" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Open the Purchase event

Click into the **Purchase** event.
{% endstep %}

{% step %}

### Check the Profit card

If the Profit card says **Available**, Meta is receiving the profit values Littledata sends as `net_revenue`. You can now base your campaigns on profit.

<figure><img src="/files/ZuC91h0SfJdHLzzSbFpC" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="info" %}
Only orders processed after you enabled Profit Signal carry `net_revenue`. If you have just turned it on, you will need to wait up to 7 days before checking
{% endhint %}

## Why Profit can still be greyed out in Ads Manager

Receiving `net_revenue` is the first requirement, not the only one. Before the Profit option becomes selectable, Meta also wants:

* At least 3 distinct profit values across your purchase events
* At least 200 conversions in the last 28 days
* Up to 7 days to activate once the data is flowing

Until all of those are met, Profit stays greyed out in Ads Manager with a warning icon, even if your purchase volume looks healthy.

## If the Profit card is not showing as available

Work through these in order:

1. **Check the connection.** Profit Signal is enabled per destination. Confirm Meta is one of the destinations you selected in the Littledata app.
2. **Check for new orders.** Historical orders are not backfilled. You need purchases that happened after Profit Signal was switched on.
3. **Check your margins.** If no margin is configured, there is no profit to send.
4. **Give it time.** Meta can take up to 7 days to light the option up after the data starts arriving.

Still stuck? Reach out to <help@littledata.io> and we can check what we are sending on your purchase events.

## Related

* [How to use Profit Signal](/sources/profit-signal/how-to-use-profit-signal) for how profit is calculated and how to enable it
* [How it works: Shopify to Meta Conversions API](/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api) for everything else we send to Meta


# Overview

Littledata connects your Shopify store to analytics, advertising, and email/SMS platforms using server-side tracking. Select a destination below to find setup guides, how-it-works docs, and FAQs.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="image">Cover image</th></tr></thead><tbody><tr><td><strong>Google Analytics 4</strong></td><td>Server-side event tracking, checkout steps, and marketing attribution in GA4.</td><td><a href="/pages/8XHXYvZ63FFayBNpeCZg">/pages/8XHXYvZ63FFayBNpeCZg</a></td><td><a href="/files/TaJZ7VjZtO4Ox2u779NU">/files/TaJZ7VjZtO4Ox2u779NU</a></td></tr><tr><td><strong>Google Ads</strong></td><td>Server-side conversions with Enhanced Conversions for better ROAS.</td><td><a href="/pages/NXST3zVRm3JJxIUOgRZl">/pages/NXST3zVRm3JJxIUOgRZl</a></td><td><a href="/files/TkBCOntgeBWZ9EEmewBq">/files/TkBCOntgeBWZ9EEmewBq</a></td></tr><tr><td><strong>Meta Conversions API</strong></td><td>Improve match quality and attribution in Meta Ads via CAPI.</td><td><a href="/pages/oOqYAY9O429odGWt2xVH">/pages/oOqYAY9O429odGWt2xVH</a></td><td><a href="/files/GptKp0uC3pW8411YNgMe">/files/GptKp0uC3pW8411YNgMe</a></td></tr><tr><td><strong>Klaviyo</strong></td><td>Enhanced identity resolution for abandoned cart and browse flows.</td><td><a href="/pages/M5wDjwMmzicjdMZeNCyg">/pages/M5wDjwMmzicjdMZeNCyg</a></td><td><a href="/files/MH0K6LH3ySzIAWglTcd8">/files/MH0K6LH3ySzIAWglTcd8</a></td></tr><tr><td><strong>Attentive</strong></td><td>Expand SMS audiences with cross-channel data stitching.</td><td><a href="/pages/gSGbV4i4dy3Bpslyh0St">/pages/gSGbV4i4dy3Bpslyh0St</a></td><td><a href="/files/febrydgZp1FthDzGGE1s">/files/febrydgZp1FthDzGGE1s</a></td></tr><tr><td><strong>Microsoft Ads</strong></td><td>Server-side Shopify conversion tracking in Microsoft Ads.</td><td><a href="/pages/14ekrn8iMKJ4gJqV33qs">/pages/14ekrn8iMKJ4gJqV33qs</a></td><td><a href="/files/3GGVA29fXowgLYppMuTf">/files/3GGVA29fXowgLYppMuTf</a></td></tr><tr><td><strong>TikTok</strong></td><td>Improve match rates and ROAS via the TikTok Events API.</td><td><a href="/pages/rT76WJ0tNHGuE2qRxaHB">/pages/rT76WJ0tNHGuE2qRxaHB</a></td><td><a href="/files/FJkTQbsK9e0xNXolyQDV">/files/FJkTQbsK9e0xNXolyQDV</a></td></tr><tr><td><strong>Pinterest</strong></td><td>Better retargeting and audiences via the Pinterest API for Conversions.</td><td><a href="/pages/wVgxiRaaIgjLwtXn4xOn">/pages/wVgxiRaaIgjLwtXn4xOn</a></td><td><a href="/files/QvBYybriUcFyDkmL62HL">/files/QvBYybriUcFyDkmL62HL</a></td></tr><tr><td><strong>Segment</strong></td><td>Use Shopify as a Segment source for warehouses, Mixpanel, Braze, and more.</td><td><a href="/pages/tWBXpRRpcynQpybinQFt">/pages/tWBXpRRpcynQpybinQFt</a></td><td><a href="/files/1BYagT58DS0nrSeoGOLX">/files/1BYagT58DS0nrSeoGOLX</a></td></tr></tbody></table>

## More destinations

* [Shopify](/sources/shopify) -- Server-side tracking architecture, the Littledata Pixel, multi-currency, checkout tracking, and refunds.
* [Headless Shopify](/sources/shopify/headless-shopify) -- Installation and setup for headless or Shopify Hydrogen storefronts.
* [Recharge](/sources/recharge) -- Subscription lifecycle events, recurring payments, and first-time orders across all destinations.
* [Dotdigital](/integrations/dotdigital) -- Abandonment program audiences with server-side browse and cart tracking.
* [Shopify Markets](/sources/shopify-markets) -- Multi-market and multi-currency tracking for Shopify Markets expansion stores.

{% hint style="info" %}
All destinations require the Littledata app installed on your Shopify store. Most can be activated in under 10 minutes with no code changes. See [How server-side tracking works](/get-started/how-server-side-tracking-works) for details on our tracking architecture.
{% endhint %}


# Attentive

![Shopify to Attentive connection](/files/hG6ZWGxUVYL9tkddH1G5)

Littledata's Attentive integration helps your brand track more pre-purchase customer behavior on your website, tracking product views and add to cart events with greater accuracy. Our integration improves:

* **Browse Abandonment**: Re-engage users who explored products but left without adding items to their cart.
* **Cart Abandonment**: Remind users of saved items with incentives like discounts or urgency cues.

## Improved Identity Resolution

Let's take a common pre-checkout user scenario:

1. The user arrives on the website via a paid Facebook / Google ad.
2. The user signs up for a discount coupon but leaves without purchasing.
3. 24 hours later, the user returns, adds items to their cart, but exits again without completing the purchase.

If the user employs an ad blocker, uses Safari, or has opted out of being tracked, then Attentive cannot send cart abandonment flows. Attentive has lost visibility into the user's identity after their initial session, and cannot trigger targeted follow-ups as part of an abandonment flow.

Littledata fills this gap by building a unified user profile through cross-channel data stitching. Our servers aggregate identifiers such as:

* Interactions with pop-up modals or forms (e.g. coupon sign-ups)
* Newsletter subscriptions or Shopify account logins
* Anonymous identifiers like the Shopify or Google cookies
* Device/browser fingerprints (e.g. user agent, IP address)

By aggregating these signals, Littledata enables brands to recognize returning users - even before the checkout or without an explicit email submission. This ensures continuity in engagement strategies (e.g. cart recovery SMS) and higher audiences for personalized marketing.

### Working with Attentive Email and SMS

Littledata's Attentive integration is optimized for Attentive's AI-powered, 1:1 personalization. Whether you're using Attentive's email or SMS products – or both – Littledata will automatically identify more shoppers that visit your site, making it possible to link anonymous sessions with profiles in Shopify and Attentive.

### Working with Klaviyo

For brands using Littledata's [Klaviyo integration](/integrations/shopify-klaviyo) for email, alongside Attentive for SMS, this identity resolution receives a further boost.

Where we can identify visitors based on an email click or signup we can pass this identified event back into Attentive for retargeting using SMS. This ensures your abandonment audiences in Klaviyo and Attentive stay in-sync and purchasers get consistent messaging across platforms.


# Shopify to Attentive installation guide

In this guide, we'll explain how to connect your Shopify store to the Attentive destination.

## Quick install guide

{% stepper %}
{% step %}
**Add the destination**

From the Littledata dashboard, click **Add destination**.

![](/files/XBN8On4yFnPOYxcRIb5O)
{% endstep %}

{% step %}
**Connect Attentive**

Find the Attentive destination and click **Connect**.

![](/files/nNLRgIcevbR75tsBkxSH)
{% endstep %}

{% step %}
**Authorize Attentive**

Click **Connect** to open Attentive.

Sign in to your Attentive account and authorize the Littledata app.

![](/files/bpxPyXYr6ysEFKwWQx5H)
{% endstep %}

{% step %}
**Verify the connection**

After the account connects, click **Continue** and verify the connection.

During setup, Attentive receives test events:

* to confirm the connection works correctly
* to make the events available as flow triggers

![](/files/PPV7v3jEpo9BYZGuclt8)

{% hint style="info" %}
Test events won't affect your current campaigns.
{% endhint %}
{% endstep %}

{% step %}
**Finish the connection**

The Attentive connection is now live on your store.
{% endstep %}
{% endstepper %}


# How it works: Shopify to Attentive

## What you can track

All events below are being sent [server-side](/get-started/how-server-side-tracking-works) and are tracked by default. You can choose to disable tracking for one or multiple events within the app settings.

| **Event name** | **Description**                        |
| -------------- | -------------------------------------- |
| Add to Cart    | When a user adds a product to the cart |
| Product Viewed | When a user views a product            |

## Event properties

Our schema is designed to be backwards compatible with the standard Add to Cart and Product Viewed events from Shopify

In addition to this, Littledata adds `externalIdentifiers` to improve the linking of on-site behavior to an Attentive profile.

| **Parameter name**                               | **Description**                              | **Type** |
| ------------------------------------------------ | -------------------------------------------- | -------- |
| items                                            | Array of items in the event                  | array    |
| items.productId                                  | Id of the product                            | string   |
| items.productVariantId                           | Id of the product variant                    | string   |
| items.productImage                               | Link for the image of the product            | string   |
| items.productURL                                 | URL of the product                           | string   |
| items.name                                       | Name of the product                          | string   |
| items.price                                      | Array that contains details about price      | array    |
| items.price.value                                | Value of the product                         | int      |
| items.price.currency                             | Currency of the product                      | string   |
| items.quantity                                   | Quantity of items in the event               | int      |
| occuredAt                                        | Time when the event was triggered            | date     |
| user                                             | Array of user details                        | array    |
| user.email                                       | Email of the user                            | string   |
| user.phone                                       | Phone number of the user                     | string   |
| user.externalIdentifiers                         | Array of additional identifiers for the suer | array    |
| user.externalIdentifiers.customIdentifiers       | Array of custom identifiers for the user     | array    |
| user.externalIdentifiers.customIdentifiers.name  | Name of the custom identifier                | string   |
| user.externalIdentifiers.customIdentifiers.value | Value of the custom identifier               | string   |


# Track Attentive SMS campaigns in Google Analytics

{% hint style="info" %}
This article is about tracking Attentive campaigns in Google Analytics. See here for Littledata's [Shopify to Attentive integration](/integrations/attentive/how-it-works-shopify-to-attentive)
{% endhint %}

Littledata's Google Analytics destination helps attribute Attentive campaigns to revenue. Benefits include:

* **Single source of truth in Google Analytics.** See which SMS campaigns are driving sales and exactly when and where customers are converting.
* **Better marketing attribution.** Littledata’s app magically stitches sessions together so you can understand performance across paid and organic channels, and build better audiences in Meta Ads, Google Ads and more.
* **Audience building.** Littledata captures complete data about browsing behavior, checkout steps and purchasing behavior (orders, refunds, repeat purchases) for more accurate retargeting campaigns and audience building.
* **Complete subscription tracking.** Many subscription merchants use Attentive to power their SMS/text marketing, and Littledata integrates with most [subscription apps](/sources/shopify/tracking-subscription-orders-in-the-shopify-checkout) to track recurring orders directly in Google Analytics and tie them back to customer touch points like email, SMS and Facebook Ads.

### How campaign tracking works

Littledata's Attentive integration works alongside our [Shopify to Google Analytics](https://www.littledata.io/shopify/google-analytics) connection to provide granular marketing attribution for conversions that come from Attentive SMS campaigns. The integration sends complete data to Google Analytics without the need for Google Tag Manager (GTM).

Littledata’s integration relies on the UTM parameters you set up in Attentive, so it's important to follow this guide closely!

{% hint style="success" %}
Read more about [how Littledata connects to Google Analytics](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4)
{% endhint %}

### Setting up UTMs for Attentive SMS Campaigns

We recommend including UTMs in all of your Attentive message links if you're interested in seeing Attentive metrics within Google Analytics. This simple step is important to get right.

When you create a message, Attentive’s link shortener pulls in a pre-arranged `utm_source` and `utm_medium` by default. To update these values, go to **Settings** > **Google Analytics**.

Whichever naming convention you choose, consistency is essential. Many Littledata customers create internal spreadsheets to manage UTM naming conventions and channel groupings in Google Analytics, and run regular QA checks to ensure consistency.

Here you can see Attentive's recommended naming schema:

![attentive utm tracking](/files/r0753YnGI6ODGtGYuL2p)

When you create a campaign in Attentive, in the Design your campaign page, you will want to make sure the links you add have UTMs on them so Littledata and Google Analytics can track the campaign properly.

To do so, in the Design your campaign screen, when you are ready to insert your link, click on the "+"

![adding utm tracking](/files/aGIQCw1buZVZIXkCve9H)

In the new popup window, choose Short link:

![adding a short link](/files/0kCwdC9WzldVy0u099tR)

In the next popup window, add the URL with your UTMs. You can type it in or use [Google's Campaign URL](https://ga-dev-tools.web.app/campaign-url-builder) builder.

You can set campaign defaults in your Settings under **GA Link Tracking**. This will auto populate the URL.

| **Parameter** | **Value** |
| ------------- | --------- |
| utm\_source   | attentive |
| utm\_medium   | sms       |

Once finished, click the **Shorten & insert URL**, review your campaign and send it.

### Reporting on Attentive flows in Google Analytics

Google Analytics is a powerful reporting tool once you get to know how channel groupings and custom dimensions work. You can analyze your Attentive data in Google Analytics by looking at campaign conversions in Google Analytics.

After you have enabled our recommended settings for UTM tags, you will have access to Attentive flow and campaign data in Google Analytics. You can look at this on its own, but also compare it against other channels for engagement and acquisition.

Here's a real life example where Attentive campaigns dominate in metrics like Revenue per session and Conversion rate:

![](/files/ZBaKYb4TEP6qYMiQ9tNo)

{% hint style="success" %}
If you're curious how did we come up with these - read our comprehensive [guide on GA4 calculated metrics](/google-analytics/behavior/ga4-calculated-metrics-that-improve-understanding-of-ecommerce-performance)
{% endhint %}

To see revenue and orders attributed to Attentive campaigns, drill into the Attentive source and add `campaign` as a secondary dimension.

#### Will Google Analytics match Attentive?

Google Analytics tracks sessions and does attribution differently from Attentive. Some notable differences include the following:

* **Quick browse sessions are counted by Attentive but not always by GA.** If Attentive logs a session and GA doesn't, this is probably because the browser did not enage for long enough.
* **GA can't capture cross-device behavior.** This includes a user initiating a checkout session from their iPhone on Safari and completing it on their laptop with Google Chrome.
* **Last-click attribution in Google Analytics.** Attentive has a more generous way of attributing clicks to purchases, and doesn't have the concept of multi-channel attibution.

If you want Attentive’s attributed revenue to match most closely with GA, you can request a change in the attribution window to a zero-day click window, and to exclude view-through purchases.


# Dotdigital

![Shopify to Dotdigital connection](/files/toPt2rLkS52gNKLKvcAP)

{% hint style="info" %}
Note: This integration is in private beta. Please reach out if you'd like to be a beta tester
{% endhint %}

Littledata provides an improved data connection for Shopify stores using Dotdigital, building on our other Shopify data connectors to enhance the audience for abandonment programs:

* **Browse Abandonment**: Re-engage users who explored products but left without adding items to their cart.
* **Cart Abandonment**: Remind users of saved items with incentives like discounts or urgency cues.

A similar integration for Klaviyo has seen stores [increase revenue from abandoned carts attributed to email by up to 600%](https://www.littledata.io/case-studies/wildgrain).

Littledata's integration is plug-and-play, requiring no code or implementation costs. It is included as part of Littledata's [email & SMS marketing plans](https://littledata.io/plans).

## Improved identity resolution

Let's take a common pre-checkout user scenario:

1. The user arrives on the website via a paid Facebook / Google ad.
2. The user signs up for a discount coupon but leaves without purchasing.
3. 24 hours later, the user returns, adds items to their cart, but exits again without completing the purchase.

If the user employs an ad blocker, uses Safari, or has opted out of being tracked, then Dotdigital cannot send cart abandonment emails. Dotdigital has lost visibility into the user's identity after their initial session, and cannot trigger targeted follow-ups as part of an abandonment program.

Littledata fills this gap by building a unified user profile through cross-channel data stitching. Our servers aggregate identifiers such as:

* Interactions with pop-up modals or forms (e.g. coupon sign-ups)
* Newsletter subscriptions or Shopify account logins
* Anonymous identifiers like the Shopify or Google cookies
* Device/browser fingerprints (e.g. user agent, IP address)

By aggregating these signals, Littledata enables brands to recognize returning users - even before the checkout or without an explicit email submission. This ensures continuity in engagement strategies (e.g. cart recovery emails) and higher audiences for personalized marketing.

## Connection benefits

* Larger audiences for Viewed Product and Added to Cart events
* Increases revenue from abandonment programs
* Reuse the same programs: backwards-compatible with Dotdigital abandoned cart program
* Reduce unsubscribe rate by increasing email personalization and relevance
* Enhanced customer identification, especially on iOS / Safari
* GDPR / CCPA compliant


# How it works: Shopify to Dotdigital

## What you can track

| Event name                  | Description                      |
| --------------------------- | -------------------------------- |
| Product Viewed (WebInsight) | When a user views a product page |
| Added to Cart (CartInsight) | When a user adds an item to cart |

## Extended data schema

On the roadmap we are planning to support an extended data schema to power additional programs than those included in Dotdigital's standard Shopify app.

This would also support Shopify stores that can't use Dotdigital's Shopify app, such as headless stores.

### Setup process

During setup, Littledata automatically deploys the necessary scripts to power Dotdigital's core features, including:

* Site and ROI Tracking
* Chat Widgets
* User Identification

### Use cases for extended schema

By utilizing Dotdigital's Insight API, Littledata can send enriched events back to Dotdigital to power abandonment programs not able to use the schemas currently available.

Some common use cases include:

* Email content including the whole cart contents rather than just the last item added to cart
* Split the flows based on product category, cart value (above or below free shipping threshold) or browsing behavior
* Pass custom product properties or product metafields to email content
* Link emails directly to the checkout URL rather than cart for higher conversion

### Supported events via CartInsight Custom API

| Event name       | Description                      |
| ---------------- | -------------------------------- |
| Product Viewed   | When a user views a product page |
| Added to Cart    | When a user adds an item to cart |
| Checkout Started | When a user starts the checkout  |

Littledata's proprietary technology enables brands to activate multi-stage abandonment campaigns across the entire customer journey - from initial browse abandonment, to cart abandonment, and finally checkout exit.


# Meta Conversions API

![Shopify to Meta Conversions API](/files/FSvxXJrP1b5CWYWl2dE1)

Littledata's [Shopify to Meta Conversions API](https://www.littledata.io/shopify/meta-conversions-api) connection uses a combination of client-side and server-side tracking to increase Event Match Quality Score and improve attribution of sales to Meta Ads.

{% embed url="<https://www.youtube.com/watch?v=mOKQF3LnN00>" %}

The Conversions API (CAPI) lets Littledata share customer actions from Shopify's servers directly to Meta. CAPI works alongside the Meta Pixel to help you improve the performance, measurement and data collection of your Meta campaigns, including Facebook Ads and Instagram Ads.

Meta CAPI is [not a replacement for Meta Pixel](/integrations/facebook-capi/meta-pixel-vs-meta-conversions-api) -- instead, it is an *enhancement* that enables deeper, first-party data to help you understand performance in more detail and run more effective ads.

## Benefits

Littledata makes this data more accurate and reliable, so that your campaigns reach the right shoppers at the right time. Benefits include:

* Make revenue data in Shopify match revenue data in Meta
* [Target New Customers](/integrations/facebook-capi/meta-ads-custom-events-verifying-new-and-returning-customer-purchase) or New Subscription Customers
* Automatically improve Event Match Quality Score
* Run dynamic product ads based on accurate shopping data
* Fully redundant client and server-side tracking using [web pixels](/sources/shopify/littledata-pixel)

## Improved event match quality

Event Match Quality (EMQ) scores how effectively Meta matches your server events to Facebook user accounts, on a scale of 0–10. A high score means better ad targeting and lower cost per acquisition. See our [full guide on EMQ scores](/integrations/facebook-capi/meta-event-match-quality) to understand what drives it and how Littledata's Meta CAPI destination helps to improve your scores.


# Shopify to Meta Conversions API installation guide

In this guide, we'll explain how to connect your Shopify store to the Meta destination.

{% hint style="info" %}
Our Meta CAPI connection is not compatible with server-side Google Tag Manager. We advise disabling sGTM to have optimal tracking.
{% endhint %}

## Quick install guide

{% stepper %}
{% step %}
**Add the destination**

From the Littledata dashboard, click **Add destination**.

![](/files/XBN8On4yFnPOYxcRIb5O)
{% endstep %}

{% step %}
**Connect Meta**

Find the Meta destination and click **Connect**.

![](/files/uzrTyYoemvxoRGmtNTWj)
{% endstep %}

{% step %}
**Choose your tracking preferences**

Select your tracking preferences, then click **Continue**. The recommended settings are already selected.

![](/files/OYZuE0AhvdGeYvlMshmN)
{% endstep %}

{% step %}
**Add your Pixel ID and access token**

Enter your **Pixel ID** and **Access Token**.

![](/files/IgFp7NLsPcEiJeL5bJ0G)
{% endstep %}

{% step %}
**Find your Meta Pixel ID and access token**

In Meta Business Manager, go to **Events Manager → Data sources**.

Select your pixel and open the **Settings** tab.

The **Pixel ID** appears in the pixel settings.

In the same tab, scroll to the **Conversions API** section and generate a new access token.

![](/files/wTE1xfD56w8Xlo59RY9K)

![](/files/G7c0Di1YsyRN55xytIcK)
{% endstep %}

{% step %}
**Set up Data Quality API**

For the connection to work properly, you have to enable **Dataset Quality API**. This is required for Littledata to monitor the Meta Conversions API. After that, click to Generate Access token and paste it into the Littledata app.\
![](/files/7GGriasMfljElefbIHV8)<br>
{% endstep %}

{% step %}
**Disable duplicate tracking**

Turn off other tracking apps that could send duplicate data, such as the Facebook & Instagram sales channel.

After you finish, tick **I've disabled other tracking apps** and click **Connect**.

![](/files/BZwbmGqXdz4zwoaluZXY)

To disable data sharing in the Facebook & Instagram sales channel:

1. Open the **Facebook & Instagram** sales channel.
2. Go to **Settings**.
3. If data sharing is set to **Maximum**, click **Change**, disable data sharing, and save.

![](/files/4i63lWJijeCHIrVzfAYL)
{% endstep %}

{% step %}
**Finish the connection**

The Meta connection is now live on your store.
{% endstep %}
{% endstepper %}


# How it works: Shopify to Meta Conversions API (CAPI)

## What you can track

Here's what you can track with Littledata's Meta connection for Shopify.

All the events below are tracked by default. You can turn events off in the settings.

### Client-side events

| **Event name**      | **Description**                                                            |
| ------------------- | -------------------------------------------------------------------------- |
| ViewContent         | A visit to a web page such as a product page or landing page               |
| InitiateCheckout \* | The start of a checkout process. For example, clicking the Checkout button |
| AddPaymentInfo \*   | The addition of customer payment information during a checkout process     |
| Purchase \*         | Completing the checkout and viewing thank you page                         |

\* Only for stores with the Littledata Pixel connected

### Server-side events

| **Event name**       | **Description**                                                                                                                           |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| AddToCart            | The addition of an item to a shopping cart or basket. For example, clicking an Add to Cart button.                                        |
| InitiateCheckout     | The start of a checkout process. For example, clicking the Checkout button.                                                               |
| AddPaymentInfo       | The addition of customer payment information during a checkout process. For example, a customer clicks to save their billing information. |
| Purchase             | Completing the checkout and receiving an order confirmation                                                                               |
| Post Purchase Upsell | The completion of an upsell purchase, that will contain only the newly added products.                                                    |
| Recurring Purchase   | The completion of an automatic recurring purchase, such as a recurring order from Recharge subscriptions.                                 |

Note: **Remove from cart**, **view item list** and **refund** events are not officially supported by Meta Conversions API. This is a limitation on Meta's side, not Littledata's.

{% embed url="<https://www.youtube.com/watch?v=mOKQF3LnN00>" %}

### Lifetime value

For each Purchase and Recurring Purchase event, Littledata sends a parameter named **`predicted_ltv`**. This parameter contains the lifetime value of the user. We pull this information directly from Shopify and then make sure that it syncs correctly with Meta.

## Profit Signal

If you enable Profit Signal, Littledata adds the estimated profit of each order to the purchase event as `net_revenue`. The `value` parameter is not changed and still carries the order revenue, so Meta receives both numbers and you choose which one to optimize for in Ads Manager.

See How to use Profit Signal for how profit is calculated and how to enable it.

## New customer vs returning customer conversions

We automatically track four types of Meta conversions. Here's a breakdown of each and how they work:

| **Conversion Name**                      | **What it tracks**                                                                                    |
| ---------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| Purchase                                 | Every order from any customer is counted, **except** **recurring orders**.                            |
| New Customer Purchase - Littledata       | Counts only the first time a customer purchases on Shopify                                            |
| Returning Customer Purchase - Littledata | Counts every purchase of a customer, except the first one. This event also includes recurring orders. |
| First Recurring Purchase - Littledata    | Only the first recurring purchase of a subscription customer                                          |

{% hint style="info" %}
The default **Purchase** conversion will count any purchase event (except recurring orders) and should be the sum\* of **New Customer Purchase - Littledata** and **Returning Customer Purchase - Littledata** events.

\*Returning Customer Purchase - Littledata will include **recurring orders** as well, so total Purchase numbers might differ if your store runs subscriptions.
{% endhint %}

## How Littledata improves the event match quality score

Littledata is sending all the parameters needed by Meta to perfectly match the events. Our **Conversions API integration** follows Meta's hashing requirements, ensuring that all parameters are received and processed to increase the event match quality.

The most important parameters are the user parameters. If an event does not have at least one user parameter, Meta will not accept said event.

{% hint style="info" %}
[Here ](https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/customer-information-parameters)are all the customer parameters that Meta uses.
{% endhint %}

Littledata sends all the parameters with the exception of:

* `external_id` (any unique ID from the advertiser)
* `fb_login_id` (the ID issued by Meta when a person first logs into an instance of an app)
* `lead_id` (the ID associated with a lead generated by Meta's Lead Ads)
* `ge` (gender parameter)
* `db` (date of birth)

### Action\_source parameter

The `action_source` parameter is an indicator of where the conversion was made. Knowing this is a great way to ensure your ads are targeted in the right direction.

Littledata can send this parameter with only 3 values:

| **Value**         | **Source**       |
| ----------------- | ---------------- |
| website           | Online Store     |
| system\_generated | Subscription App |
| physical\_store   | POS Order        |

### Fbp and fbc parameters

The most important parameters that we send are **`fbp`** and **`fbc`** cookies, which are the equivalent of the Google client ID. These parameters are vital in the event match quality score. Our server-side tracking technology ensures that these parameters are always available to ensure the highest event match quality.

### User agent and IP address

User agent and IP address are automatically added to the browser events, but we pass them to the server-side events as well so the event match quality can increase.

Besides `fbp`, `fbc`, user agent and IP address, there are other parameters that we send:

* **`em`** - email of the user (hashed)
* **`ph`** - phone number of the user (hashed)
* **`fn`** - first name (hashed)
* **`ln`** - last name (hashed)
* **`ct`** - City (hashed)
* **`st`** - State (hashed)
* **`zp`** - zip code (hashed)
* **`country`** - Country of the user (hashed)
* **`subscription_id`** - sent with a recurring order

All of these parameters are passed from the browser to the server so that the right user is attributed to the event.

For a more detailed schema and parameters, reach out to <help@littledata.io>.

## Custom parameters

The following parameters are included with every event sent to Meta.

| Parameter      | Description                                                                                                           |
| -------------- | --------------------------------------------------------------------------------------------------------------------- |
| market\_handle | The handle of the Shopify Market for this event. Fixed as `unassigned\_market` for orders not attributed to a market. |
| market\_id     | The internal Shopify Market ID for this event. Fixed as `0` for orders not attributed to a market.                    |

## Market parameters in Littledata events

All events sent to Meta include the Shopify Market handle by default. This allows you to break down ad performance by Shopify market in Meta's reporting, build market-specific Custom Audiences for retargeting, and allocate budgets more effectively across regions. For example, you can create separate audiences for customers from different markets, or exclude certain markets from campaigns entirely. This requires Shopify Markets to be active on your store, but does not require any per-market destination configuration within Littledata.


# Meta Event Match Quality (EMQ) scores explained

Understand what Meta EMQ scores are, what drives them, and how Littledata helps Shopify brands reach and sustain high scores.

When you run ads on Meta, the algorithm needs to match events on your store to actual Facebook users — purchases, add-to-carts, page views. The better that match, the more effectively Meta can optimize delivery, build lookalike audiences, and report accurate ROAS.

Meta uses Event Match Quality (EMQ) to score how well your tracking data matches to Facebook users. It runs from 0 to 10. Higher scores mean Meta can identify more of your customers and put your ads in front of the right people.

### Why EMQ matters

EMQ is one of the most direct signals of CAPI implementation quality. A low score means Meta is working with incomplete data.

The performance difference between a mediocre and a strong score often means:

* Lower cost per acquisition
* Higher customer match rates
* Better ROAS

Scores are calculated in real-time and update based on 24–48 hours of Conversions API data.

### Benchmarks by event type

Not all events are held to the same standard. Purchase events matter most, since they drive the optimization signal for your campaigns.

| Event                            | Target score |
| -------------------------------- | ------------ |
| Purchase                         | 8.5+         |
| Add to Cart / Checkout Initiated | 6.5+         |
| Page View                        | 5.5+         |

{% hint style="warning" %}
A purchase EMQ below 8.0 is a sign that your CAPI implementation is missing key identifiers or relying too heavily on browser-side data.
{% endhint %}

You can check your current scores in Meta Events Manager under **Overview → Event Match Quality**.

### What drives EMQ scores

Three factors determine your score.

#### 1. Data completeness

The more customer identifiers you send with each event, the higher the score. Meta weights these differently:

| Priority | Identifiers                                     |
| -------- | ----------------------------------------------- |
| High     | Email, click ID (`fbc`)                         |
| Medium   | Phone, external ID, browser ID (`fbp`), country |
| Low      | First name, last name, city, postal code        |

Email and click ID (`fbc`) have the most impact. If your setup regularly misses email at purchase events, your score won't reach 8.8+.

#### 2. Processing speed

Real-time server-side events score higher than batched data. Meta expects purchase events to arrive shortly after they occur on your store. Delayed or batched submissions reduce match quality.

#### 3. Event accuracy

Duplicate events or missing events reduce scores. If Meta receives the same purchase event from both browser pixel and server without proper deduplication, it inflates event counts and penalizes match quality.

### How Littledata improves EMQ

Browser-only tracking alone is not enough to consistently maintain a high EMQ score:

* Cookies are blocked or expire, losing the `fbp` and `fbc` identifiers
* Express checkout flows (Shop Pay, Apple Pay) don't fire the pixel reliably
* No server-side enrichment means missing device, IP, and location data

Littledata's server-side connection addresses each of these:

**Captures all purchase events** — Littledata tracks orders through Shopify's server-side data, so express checkout and cookie-blocked sessions don't create gaps.

**Enriches events with more identifiers** — Each event is sent with email, phone (where available), IP address, user agent, and location data, covering all of Meta's high and medium priority identifiers.

**Extends cookie lifetime** — Server-side tracking keeps the `fbp` cookie active for up to one year, compared to 7 days in a standard browser setup. This preserves the `fbc` click ID across longer purchase journeys.

**Deduplicates pixel and CAPI** — Littledata sends a consistent `event_id` with both browser and server events that allows Meta to deduplicate correctly.

**Sends events in real-time** — Events are dispatched as they happen on Shopify.

### Learn more

* [Meta Pixel vs Meta Conversions API](/integrations/facebook-capi/meta-pixel-vs-meta-conversions-api) — how the two tracking methods complement each other
* [Why Meta attribution differs from GA4](/integrations/facebook-capi/why-is-meta-attribution-different-from-ga4) — understanding what Meta's numbers actually measure
* [Maximize conversion value based on customer LTV](/integrations/facebook-capi/maximize-conversion-value-based-on-ltv) — take attribution further with new vs returning customer signals


# Turning off Shopify's CAPI integration

{% hint style="info" %}
We recommend you switch off any duplicate Meta Pixel tracking as part of installing Littledata's Meta Conversions API connection
{% endhint %}

Using Shopify's CAPI integration (or any other CAPI implementation) alongside Littledata's connector leads to double tracking of events and purchases. We recommend disabling any additional CAPI integration when you install our [Shopify to Conversions API connection](/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api).

Here is how you can do that:

* Go to your **Shopify admin - Sales channels** and click on **Facebook & Instagram**.

![](/files/nhnaLM5r6Yt3ynAx1spi)

* Click on **Settings**.

![](/files/vpuxJrMm4ldoFo6FxIlo)

* Under **Share Data settings**, click on **Change**.

![](/files/NbxojD62owJiuS4PVsid)

* This will prompt you to manage your **Facebook & Instagram data sharing preferences** by toggling off the **data share** option.

![](/files/5dEZOTWMep5Hb4d7DiDN)

* Finally, check the Page views and View Content events are only triggered **once** on your pages, by using the Meta Pixel Helper [plugin for Chrome](https://chromewebstore.google.com/detail/meta-pixel-helper/fdgfkebogiimcoedlicjlajpkdmockpc?hl=en).

![meta pixel helper](https://res.cloudinary.com/littledata/w_1024,h_621,c_fit/littledata-blog-images/2020/05/Screenshot-2020-05-12-at-21.20.11.png)


# FAQ: Meta Conversions API

Frequently asked questions about Littledata's Meta Conversions API (CAPI) connection for Shopify. Find out what CAPI is and how it works.

#### What is Meta CAPI?

Meta Conversions API ([CAPI](https://www.littledata.io/shopify/meta-conversions-api)) is server-side tracking that works alongside Meta Pixel tracking to help you improve the performance of Facebook and Instagram Ads. Meta developed CAPI in 2021 after finding that they had been "underreporting iOS web conversions [by approximately 15%](https://www.facebook.com/business/news/navigating-change-and-improving-performance-and-measurement)".

#### Why do we need Meta CAPI?

Littledata's [Meta CAPI integration](https://www.littledata.io/shopify/meta-conversions-api) enables Shopify stores to send accurate data to Facebook for better retargeting and audience building. In short, it's a direct connection from [Shopify to Facebook CAPI](https://www.littledata.io/shopify/meta-conversions-api). This removes the need to manually implement CAPI, as **all ecommerce events are automatically captured by Littledata**, including checkout funnel events, purchases, subscriptions and lifetime value (LTV).

Meta Ads, covering both Facebook and Instagram networks, is the largest paid channel for most of Littledata's customer base. Meta has invested heavily in machine learning to help you target the right shoppers, but now more than ever these algorithms need accurate and complete data about the customer journey for them to optimize marketing spend.

Simply put, better conversion data leads to higher return on advertising spend (ROAS) in Facebook Ads, especially dynamic product ads.

#### How is this better than server-side GTM?

Server-side Google Tag Manager (sGTM) requires stores to spin up their own servers on Google Cloud. This is a complex process that requires developers for both initial launch and ongoing maintenance. In contrast, Littledata’s server-side tracking works automatically. We keep it up to date behind the scenes, handle hosting, and kep updating the connection for greater consistency. This is why thousands of top DTC brands trust Littledata as part of their modern data stack.

An added benefit is having a single source of truth with a consistent schema. Customers already using [Littledata for Google Analytics](https://www.littledata.io/shopify/googleanalytics) will see completely consistent data, from a single source, in Meta Ads.

#### How is Littledata's Meta Conversions API connection better than Shopify's Facebook & Instagram channel?

Similar to how Littledata [improves Google Analytics tracking by 20-30%](https://blog.littledata.io/2021/04/08/for-every-100-orders-in-shopify-12-go-missing), our Meta CAPI connection includes more granular detail, more accurate checkout funnel tracking, better subscription tracking, and more complete lifetime value (LTV) tracking. Littledata offers a much more reliable way to sell and market across Facebook and Instagram.

Shopify's Facebook channel works okay for very small brands, but there are many limitations:

* Revenue is Shopify does not match revenue in Meta
* Subscription events and recurring orders are missed completely
* Only the Purchase event is sent via CAPI, not Adds to Cart and Checkout steps
* Customer data, to allow better linking with a Facebook user, is not complete
* Missing custom dimensions including Customer Lifetime Value (LTV)

#### How do I get the Meta CAPI integration?

With Littledata, it's super-easy to add Meta CAPI!

Just install our [Shopify app](https://apps.shopify.com/littledata) and choose Meta as a data destination.

Current users can add the Meta connection from the Littledata app.

#### What exactly can I track? Is there a full schema somewhere?

Yep. See [how our Meta connection works](/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api). For a more detailed schema and parameters, reach out to <help@littledata.io>.

#### Can I use Meta CAPI with Segment?

Yes. If you are using Littledata's Shopify source for Segment you can either send data from Segment to Meta CAPI (using Segment's Meta CAPI destination) or send data directly from Shopify to Meta (using Littledata's Shopify to Meta CAPI connection) *in addition* to the data you send from Shopify to Segment. Read more about [Segment's cloud-mode Meta CAPI destination](/integrations/shopify-to-segment/connect-segment-to-facebook-conversions-api).

#### Does Littledata use the fbp or fbc cookie?

Yes to both! Littledata collects the Facebook Pixel ID (fbp) and Facebook Click ID (fbc) and passes with server-side events to ensure the highest event match quality. *fbp* is only available for sessions where a Pixel cookie was set and *fbc* is only set when the user has clicked on a link from Meta Ads - so not all events will have these identifiers added. Read more about [how it works](/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api).

#### What does the Shopify to Meta CAPI connection cost?

The integration is available as an independent connection, or as an add-on to any Littledata plan. As with all Littledata connections, pricing is based on monthly order volume with no hidden fees or setup costs. Read more about [our pricing](https://www.littledata.io/plans).

#### What's the difference between Meta CAPI and Meta Pixel?

The Meta Pixel and the Meta Conversions API (CAPI) are both designed to help businesses measure the effectiveness of Facebook Ads, but they function differently and offer distinct advantages. Here's more on the [difference between Meta CAPI and Meta Pixel](/integrations/facebook-capi/meta-pixel-vs-meta-conversions-api).

#### Why the revenue metric in Google Analytics does not match Meta?

While purchase events might align somewhat between GA4 and Meta, conversions and total sales will almost always differ due to different attribution methods.

* Purchase events are sent to both GA4 and Meta in a similar way, so their counts may match more closely. However, slight differences can still occur due to timing and data processing nuances.
* Conversions and total sales differ because GA4 and Facebook use different attribution models and windows. GA4 considers multiple touchpoints and uses data-driven attribution, while Meta often focuses on last-click or other specific models within their own ecosystem.


# Meta Pixel vs Meta Conversions API

See a comparison between Meta Pixel and Meta Conversions API

Meta offers marketers two powerful tools for tracking conversions: the Meta Pixel and the Meta Conversions API (CAPI). Both are designed to help businesses measure the effectiveness of Facebook Ads, but they function differently and offer distinct advantages.

This article explains why you need both for the best advertising performance.

## Meta Pixel

The Meta Pixel is a piece of JavaScript code that you embed on your website. It tracks users’ actions on the website, such as views, clicks, and conversions.

This data helps advertisers measure ad performance, optimize ad delivery, and target audiences more effectively. Meta Pixel uses a first-party cookie, storing a user identifier in an `_fbp` cookie on the website domain.

When a user clicks a Facebook Ad, a `fbclid` query parameter is included and, if cookies are enabled, it is stored in an `_fbc` cookie on the site visited.

**Pros:**

* **Easy to Install**: The Pixel is straightforward to set up. You simply copy and paste the code into your website’s header.
* **Real-time Data**: It provides real-time data on how users are interacting with your website.
* **Retargeting**: Enables advertisers to retarget website visitors with customized ads.

**Cons:**

* **Cookie-Dependent**: The Pixel relies on cookies, which can be blocked or deleted by users, leading to data loss.
* **Missing Conversions**: The Pixel may not fire on your store’s thank you page, resulting in campaign mis-firing

## Meta Conversions API

Conversions API (CAPI) is a more recent addition to Meta’s suite of tracking tools. It allows advertisers to send web events from their servers directly to Facebook, bypassing browsers and cookies. This enhances the precision and security of data transmission.

**Pros:**

* **Attribution Accuracy**: Conversions API mitigates campaign attribution loss resulting from cookie blocks and browser privacy settings (e.g. iOS 14).
* **Privacy Compliance**: Helps businesses adhere to privacy regulations like GDPR and CCPA, as it provides more control over data shared with Facebook.
* **Conversion Accuracy**: 100% of your online purchases recorded as transactions in Facebook Ads.

**Cons**:

* **Delayed Data**: There can be a slight delay in data transmission compared to the real-time data provided by the Pixel.
* **Hard to Set Up**: Building a reliable server-to-server integration requires data engineering, and for you to maintain your own server tagging infrastructure (e.g. server-side Google Tag Manager)

## The best of both tools

{% hint style="success" %}
See how [Jaxxon saw a 75% uplift in revenue using Littledata](https://www.littledata.io/case-studies/jaxxon) with Facebook Ads
{% endhint %}

Littledata’s [Shopify to Meta Conversions API connection](https://www.littledata.io/shopify/facebookcapi) uses a combination of client-side (Meta Pixel) and server-side tracking (Conversions API) to increase event match quality and Facebook Ads attribution.

Littledata’s connection makes your Facebook data more accurate and reliable, so that your campaigns reach the right shoppers at the right time. Benefits include:

* Automatically improve Event Match Quality Score
* Run dynamic product ads based on accurate product data
* Make revenue data in Shopify match revenue data in Facebook

## Comparison

**Data Accuracy & Privacy:**

* **Pixel**: Can lose data due to cookie blocks and is vulnerable to evolving privacy regulations.
* **Conversions API**: Ensures data accuracy and privacy, being less affected by browser restrictions on cookies.

**Implementation:**

* **Pixel**: Easier to install, making it user-friendly for businesses with limited technical expertise.
* **Conversions API**: Requires a more complex setup but offers robust, secure data handling.

**Data Handling:**

* **Pixel**: Collects data from the browser, which can be influenced by user settings and restrictions.
* **Conversions API**: Processes data at the server level, ensuring more consistent and reliable data transmission.

## Conclusion

The Meta Pixel is a client-side tracking tool for measuring, optimizing, and building audiences for Facebook and Instagram ad campaigns. It operates through a JavaScript code snippet added to your website, tracking visitor activity and conversions which are reported in the Ads Manager.

Server-side Conversions API, such as Littledata's Facebook Ads connection for Shopify, complements Meta Pixel to provide comprehensive data on online store activities, including checkout funnel activity and purchases.

CAPI ensures accuracy and completeness in data collection, especially in cases where the Meta Pixel might be blocked due to ad blockers or restrictions in iOS 14/15/16. Server-side events, associated with a Meta Pixel ID, are processed similarly to web events sent via the Pixel, contributing to measurement, reporting, and optimization.

Littledata provides detailed information on events, triggers, and parameters tracked through their Facebook CAPI Tracking Schema, offering a robust solution for comprehensive analytics.

If you're ok with relying on a free solution that is blind for the money-making events i.e from add-to-cart onwards, then Pixel may be more appropriate.

However, for businesses looking for enhanced data accuracy and privacy compliance, especially amidst tightening privacy regulations, the Conversions API is worth the investment.

## Learn more

Here are some more relevant resources regarding Meta Conversions API and Meta Pixel

* Learn more about Littledata's [Meta Conversions API connection](/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api)
* The most [frequently asked questions](/integrations/facebook-capi/meta-capi-faq) about Meta CAPI
* Find out about [the truth about cookies and attribution](https://blog.littledata.io/2023/06/28/the-truth-about-cookies-and-attribution)


# Troubleshooting Common Meta Errors

Navigating Meta’s dashboard can sometimes surface confusing errors and warnings. This guide breaks down common alerts - from low EMQ scores and expired fbclid parameters to the impact of switching pixels - explaining what they mean and offering guidance about when you should take action.

## Low EMQ score

Sometimes, you might see lower EMQ scores for top of the funnel events like View Content, Page Viewed, or even and Add To Cart.

This is common and happens because some parameters - like email, name, address - are not yet collected at that point in the user’s journey if, for example, the user is not logged in.

Top of funnel events like Page Viewed and View Content might be missing an EMQ score altogether, usually because of low traffic or if these events are sent only from the browser (pixel).

## Expired fbclid warning in the Meta dashboard

You may occasionally see errors related to expired fbclid parameters. This is usually caused by click IDs older than 90 days, which are treated as expired.\
​This usually happens when the browser autocompletes a full URL it “remembered” long after the Facebook or Instagram ad click, or if users bookmark links or copy URLs containing expired or broken click IDs.\
​Since Meta doesn’t share exactly how click IDs are encoded, we send over everything that is captured, and expired or broken fbc values should be ignored on Meta’s side.

This will not cause any disruptions in your data and can be safely ignored, as the error usually goes away by itself.

## What does the new Meta ad policy mean for health & wellness stores?

Recently, Meta has been tightening ad policies for health and wellness brands, including supplements, skincare, and fitness products. These restrictions can disrupt event tracking, ad performance, and attribution. If your business is categorized under this sector, you are subject to these changes.

This is part of Meta’s effort to avoid handling sensitive health data. This will affect metrics in your Meta dashboard - but having CAPI (server-side) tracking through Littledata means that the effect of these changes is significantly diminished.

Littledata’s server-side tracking and Meta CAPI integration bypass browser-based restrictions, ensuring accurate purchase tracking. Even if Meta throttles Pixel events, Littledata’s direct server-to-server connection keeps sales data flowing.

### What is the alternative if your Meta dashboard is unreliable because of these changes?

GA4 is a good alternative to understand your marketing performance. Unlike Meta, GA4 isn’t subject to the same restrictions. Here’s how [Littledata’s GA4 connection](/integrations/shopify-to-google-analytics) can help:

We track the entire customer journey - so you can analyze user behavior across all your channels (not just Meta), providing a more holistic view of your data. Using data provided by our GA4 connection you can build custom reports to monitor key metrics like conversion rates and product performance.

Use Littledata’s enriched data to see how your marketing channels are performing, rather than relying on Meta alone.

## FBC parameter missing for some events

This is likely to happen because the user did not click on a Meta Ad. [The fbc parameter](/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api) is specifically for sessions where a user clicked on a link from a Meta Ad. If they didn’t, this parameter won’t be set by default - so it’s expected for it to be missing for events that did not result from an ad click.\
You can see a breakdown of an event's parameters if you go to your Meta dashboard and click on the score for any given event.

![](/files/lfgPjnGFuIk4MaZxQ6CS)

## What happens when you switch to a new Pixel

Switching to a new Meta Pixel will most likely affect your ongoing campaigns’ performance. It will reset the learning phase for any campaign that relies on the pixel for optimization, because you are essentially starting from zero with a new data source.\
Any campaign optimized for an event that was previously tracked by the old pixel will be forced back into the learning phase when you switch to a new pixel. During this new learning phase, performance is typically less stable, because the algorithm needs time and sufficient volume to find the right audience again.

If you need to switch to a new pixel, we recommend doing this gradually by running the pixels in parallel for a while, and migrating campaigns one by one.

## Why is Meta showing an IPv6 warning for some events?

Meta’s CAPI prefers IPv6 because it’s practically unlimited and usually doesn’t change, so it’s a good stable identifier. In reality, not all devices or internet providers support IPv6 yet. Most users are still on classic IPv4, where addresses are limited and often recycled, so their IP can change frequently. We always prioritize IPv6 when sending events to CAPI, but if IPv6 isn’t available, we fall back to IPv4.

When Meta expects IPv6 but only sees IPv4, you may see a warning in Events Manager. This usually just reflects the user’s network setup, not a problem with your integration.

## Littledata Pixel not subscribed to any events

<figure><img src="/files/GMQoPbqhPEn6I9JEkjHX" alt=""><figcaption></figcaption></figure>

This warning appears because Shopify expects event subscriptions to be defined directly in the pixel code, but our advanced tracking pixel loads its events dynamically from an external library. This is expected behavior and can be safely ignored; your pixel is tracking correctly.


# Connect Meta Ads Account With GA4

## Introduction

Meta has recently introduced a native integration with Google Analytics 4 (GA4), allowing advertisers to sync GA4 data with Meta Ads Manager. This integration enhances data quality, providing better attribution and optimization opportunities. This guide walks you through the setup process and highlights key considerations.

## Guide

If you don’t see a pop-up prompting the integration when opening Ads Manager, navigate to **Events Manager > Partner Integrations** and locate Google Analytics under the Analytics category. GA4 is currently the only analytics platform natively supported by Meta.

![](/files/ZtJnPU0zYSM0O2g8ZEjD)

Once selected, the setup takes around 5–10 minutes. Meta claims that correct event and dataset mapping can improve the measured performance of your facebook or Instagram campaigns and make you eligible for future optimizations.

![](/files/0K8gygCrS9YCqvIQvWtM)

One notable step during setup is the automatic selection of “Apply connection to all Meta ad accounts within this Business Manager.” Since not all ad accounts within a Business Manager necessarily need GA4 integration, it's advisable to uncheck this option. Additionally, ensure you agree to the end-user license agreement to proceed.

![](/files/lymwLwxaAenNSRBO8Xio)

Next, Meta will ask you for access to the proper GA4 property. You need to select the GA4 property linked to your Meta Ads account.

![](/files/7oNguPvhKzXoLWtkvWe7)

After that, a dropdown on the right will allow you to choose the correct dataset from your Business Manager.

![](/files/x1DdjszKxVAfsrWSqo9L)

Meta provides an option to import all GA4 key events or limit the import to Meta traffic only. Given Meta’s tracking limitations due to privacy restrictions (e.g. safe browsers, ad blockers, Apple’s ITP and Safari constraints etc), importing all traffic sources is recommended.

![](/files/sPsus5mF6LJVrDi8DnFK)

Many key events that lack direct attribution still occur particularly from Meta campaigns trafic, so broader data import ensures more data to begin with and more accurate insights.

A crucial step in the process is event mapping. Instead of pulling in all GA4 events, Meta asks you to map specific conversions a.k.a key events from GA4 to their corresponding Meta event types.

![](/files/aNKOHIRyvTvyLpsPQCOB)

In this case GA4 has only “Purchase” set as a key event, so only this event will be available for mapping. However, if micro-conversions like “Add to Cart” or “Set Payment Info” are configured in GA4, they can also be mapped to Meta events.

Once the setup is complete, Meta will start receiving event data from GA4. It typically takes **two to seven days** for changes to be validated. Meta assures that event duplication will not occur, and this integration aims to enhance customer data quality, ultimately reducing acquisition costs and improving campaign efficiency.

## Conclusion

Integrating GA4 with Meta Ads Manager allows for better data-driven decision-making. By mapping key events accurately and importing all relevant traffic sources, advertisers can mitigate privacy-related tracking issues and optimize Meta campaigns more effectively. This integration is a step forward in improving data reliability and driving better marketing performance.


# Custom metrics in Meta reporting

When you analyze the efficiency of your advertising efforts sometimes out-of-the-box metrics don't tell the whole story. Creating custom metrics in Meta is done directly in the reporting interface (unlike [GA4 calculated metrics](/google-analytics/behavior/ga4-calculated-metrics-that-improve-understanding-of-ecommerce-performance) which get defined in the admin section). Simply when customizing columns, choose the Custom tab:

![](/files/dJRsWKz3R6L95PPHt7K9)

The important feature of custom metric in Meta is that you can choose whether you'd like them shared with other users or only private to you - in the dropdown at the bottom:

![](/files/bl4axlRi96D152268ZQy)

There's also an interesting choice of proposed metrics on the left menu, depending on which type of campaigns you are running.

In this article we'll show you 6 powerful custom metrics for e-commerce Meta reporting that are not available by default, along with their formulas and specific use cases.

## Cart-to-buy ratio

Of all the missing metrics this one is the most surprisingly not there: a percentage of add to cart events that end up with a purchase.

![](/files/vlHGLfRgbuuZrDKPnm0p)

To be precise, this metric is comparing all the add to carts against all purchases (attributed to an ad, ad set or a campaign) so it should be taken with a grain of salt - e.g if one adds 5 items to cart and ends up buying all of them - we'll see 20% - but if it's safe to assume such behavior across various ads/campaigns (that promote same/similar products), this metric becomes a very useful tool for comparing those ads, ad sets or campaigns against each other:

\<img src={require("../../.gitbook/assets/cart-to-buy-in-action.png").default} style={{width: '350px'}} />

{% hint style="success" %}
**Pro tip:**

Keep your Adds to cart column nearby - as it helps you quickly control the volume i.e. the significance that a particular row of data has in the overall traffic
{% endhint %}

With Littledata CAPI feeding your Meta account you can be sure that 100% of add to cart events are properly logged and surfaced in reports!

Once you create the described Cart-to-buy metric you'll know how easy it is to choose and combine metrics from the dropdown of all available numbers in Meta.

In the next chapters we'll focus on metrics specific to Littledata Meta connector as they carry great value for e-commerce advertisers.

By using these metrics you'll be able to distingush between net-new acquisition and returning loyalists (among other benefits) and solve one of the biggest problems in Meta advertising: **Attribution Theft** (where ads claim credit for customers who would have bought anyway).

Here are 5 advanced custom metrics you can build using Littledata's specific events:

## Customer acquisition cost (CAC)

Calculating this metric is simple, right?

CAC = Amount spent / New Customers acquired

Only problem is that New customers is NOT measured in Meta ads.

Unless you use Littledata connector :)

![](/files/ao7wgKEK1fzrNAykqQV5)

Apart from the standard events we see here - there are 5 more events being sent to your Meta account if you're using Littledata CAPI connector:

* Returning customer purchase
* Recurring purchase
* New customer purchase
* First recurring purchase
* Post purchase upsell

We ordered them just like in the screenshot above, and we're going to use them for calculating eye-opening metrics that help advertisers understand what REALLY performs (and what doesn't!) in Meta.

In order to use these in calculated metrics, you need to [register these events as custom conversions](/integrations/facebook-capi/meta-ads-custom-events-verifying-new-and-returning-customer-purchase#measuring-new-andor-returning-customer-purchases-in-meta-ads-reports).

![](/files/zVt9RWjBb3lx7e07VbJJ)

That step is necessary because the Littledata custom events are not standard in Meta and there are no accompanying metrics for them (e.g just like we have out-of-the-box metric "Purchases').

After registering them you'll be able to see them as column in ANY campaign, ad set or ad, just like this:

![](/files/OcdsAUBvn3ec22dd6qZO)

In the example above we can see how many new customers are coming from each ad set, and you think it looks cool, right?

Wait till we show you the actual calculated metric which everyone understand (C-suite especially!) Customer acquisition cost!

![](/files/8G1Tke7ZnyVKmjDjFEih)

Now given that you're a doer and not only a reader you'll go ahead right now and replicate the steps explained, and if you do you'll be able to surface a report like this and finally give your ads a fair comparison:

![](/files/u7XAYdkzUq43gy4KVFs4)

Kaboom! Now you can see what price do you pay for new customers for each ad set! (Can be applied to campaigns and ads as well)

If you're confused with the front\&center column for new-customer purchases Conversion value - it's available by default based on the real value of the proper purchase events.

## New Customer Index

Before we show you how easy it is to create the super-insightful metric called New Customer Index let's underline that Meta reporting is event-based, NOT user-based!

We mentioned earlier that calculating metrics and different ratios in Meta reports serves the purpose of comparing assets against each other, and shouldn't be mistaken for absolute truths. It's no accident we repeat it now, because in the CAC example above, have in mind that a new customer purchase can happen only ONCE per user - so it doesn't matter whether we talk about user- or event-scope, the numbers match either way.

In this example we'll use the "return-customer-purchases" count which can happen more than once for any single user so the customer index is somewhat skewed (doesn't represent with 100% accuracy ratio of new vs returning customers - which is why we used "index" and not "rate" to define it)

![](/files/hJTi9MJtRYVddR0DjPFc)

Our numbers tell quite an interesting story (and it's the last time we'll screenshot how the custom metric looks in the report itself, this looked too good to be skipped):

![](/files/ZWZfVLwhRVV9G4nSzL40)

Again, we're keeping the Purchase column handy, to quickly understand volume impact.

This metric is the "truth serum" for the **brand-scaling** campaigns. A campaign might show a high ROAS in Meta, but if 80% of those buyers were returning customers, it means you're doing a poor job on acquisition.

It also serves as a diagnostic tool for creative performance. It tells you if a specific creative angle appeals to cold audiences or if it only resonates with people who already know the brand.

## Subscription CVR

If you already registered "First Recurring Purchase - Littledata" as a custom conversion, all you need to do is:

**Sub CVR = first-recurring-orders / clicks**

You can also test Landing page views instead of clicks if you noticed that these two metrics differ significantly. The gap between clicks and LP views happens due to site load speed issues or ad blockers / safe browsers.

{% hint style="info" %}
**Geeks-only DIY**

Can you create a custom metric that will quantify this problem?

HINT: divide LP views by link clicks (remember - All clicks mean ALL clicks!)
{% endhint %}

## Subscription Retention

*This metric is applicable ONLY for long-standing "evergreen" campaigns that promote subscription products.*

The formula is:

SR = recurring-orders / first-subscription-orders

It will help you understand which asset produces long term success and which low value customers.

{% hint style="warning" %}
**Do you understand Meta attribution?**

This metric should be used with caution as [Meta attribution](/integrations/facebook-capi/why-is-meta-attribution-different-from-ga4) i.e the way the platform awards conversion credit can **strongly** affect numbers.
{% endhint %}

## Upsell Rate

Littledata CAPI connector is designed with one thing in mind: to help ecommerce advertisers pull the most out of their dataset.

That's why we made sure to "notify" Meta each time an upsell has happened. Comparing that number against All purchases (or even more specifically new- or returning-customer purchases) can help you better understand how each campaign performs when it comes to upsells!

Uspell rate = upsells-littledata ÷ Total Purchases

## Conclusion

Relying on out-of-the-box reporting often obscures true profitability, masking whether you are fueling actual growth or simply recycling existing customers.

By leveraging Littledata’s granular events to calculate metrics like CAC or Subscription CVR, you help Ads optimize for genuine value instead of vanity metrics (like clicks or impressions).


# Maximize conversion value based on customer LTV

Stop bidding on orders and start bidding on customers. Use Littledata to sync Shopify LTV to Google and Meta Ads for smarter, value-based optimization.

Most e-commerce brands are trapped in a "blind spot" of optimizing their Meta (and/or Google!) campaigns based on the immediate value of a transaction. E.g if a new customer spends $5 and a returning customer spends $20, standard tracking tells the platform that the purchase made by the returning customer is four times more valuable.

In reality, the opposite is often true. This traditional approach ignores the long-term potential of a new acquisition, leading to inefficient bidding and missed growth opportunities.

## The technical bridge: Littledata & server-side tracking

To fix this, you need to provide the advertising platform with better "insider information". Littledata bridges this gap by sending more than just a "vanilla" purchase event. Using Shopify server-side data, it identifies the customer's history and fires two additional events:

New Customer Purchase: fired when a user makes their first-ever purchase.

Returning Customer Purchase: fired for every subsequent order.

Because this happens server-side, it uses Enhanced Conversions (Google) or the Conversions API (Meta) to stitch the hashed email from a Shopify order with the platform-obtained email (hashed, ofcourse). This ensures 100% accuracy in identifying whether that customer interacted with your ads, regardless of cookie restrictions.

This is how these event appear in Meta events manager:

![](/files/KuCv3KADKzo3Q8UbbvuB)

and this is from Google's Goals (aka conversions) section:

![](/files/ptt8sWQER9cBFLLsfNkY)

## Programming the campaigns

Once these events are flowing, you can stop relying on the "raw" order value and start assigning manual value for each new customer based on your brand's actual data.

Example:

You know that a new customer, over their entire lifespan with your brand, is worth $600 (LTV). Meanwhile, a repeat purchase from an existing customer brings in an average of $100.

By [manually assigning these values](/integrations/facebook-capi/meta-ads-custom-events-verifying-new-and-returning-customer-purchase#using-new-or-returning-customer-purchase-events-as-conversions) to the respective events in your account, and using the "Maximize conversion value" strategy - you are explicitly instructing the platform's algorithm on the relative worth of these users.

![](/files/apWicq4r3slbEsORs2Cf)

In the screenshot above we can see that this setup in Meta is chosen on the Ad set level, whereas in Google it's a campaign-level setting:

![](/files/cI8DwemacDaLJNyUX5o7)

By using this setup - you are telling the "Maximize Conversion Value" strategy that each new customer is worth six repeat purchases.

## Training your ads for growth

This setup fundamentally changes how your budget is managed. Instead of the platform hunting for the "cheapest" immediate sale, it uses the 6:1 ratio (from the previous example) to:

* Prioritize [high lifetime-value users](/google-analytics/conversions/lifetime-value-in-ga4) by bidding more aggressively for a user that has never bought before because it sees a $600 opportunity.
* Optimize ads by “seeing” which combination of hooks and creatives is actually driving long-term growth versus one-off discount hunters.
* Balance the budget to find the optimal mix of new acquisitions and repeat sales based on the value you've defined.

## Conclusion: Playing the Long Game

This approach shifts the role of the E-commerce Manager from adjusting manual bids to defining customer worth. Without the specific distinction between new and returning events provided by Littledata, this level of optimization isn't possible.

The bottom line is simple: your campaign is only as smart as the values you feed it. By programming the ratio of new versus returning customer worth, you move past the "one-off" order value race and start playing the long-term game to outsmart your competitors.


# Why is Meta attribution different from GA4

If you’re coming from the GA4 world, you know that the default attribution relies primarily on session context. Session channels are clearly separated from the First-user touchpoints with your website. Together they help you get a more nuanced understanding of [how various traffic sources contribute to conversions](https://support.google.com/analytics/answer/11080067?hl=en#zippy=%2Cin-this-article). Advanced analysts can use GA4’s attribution dimensions to distribute credit for conversions across the entire purchase journey.

And then you open Meta Ads Manager, and the attribution suddenly feels completely different! In this article we’ll explain what the differences are (and mention a couple of similarities).

## What attribution means on Meta platform anyway?

Let’s be clear from the start - the word “attribution” doesn’t refer to the same concept in GA4 and Meta. With Littledata feeding [100% of purchases as optimizing signal to Meta](/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api) it's essential for advertisiers to have trustworthy report covering what drove these purchases in the first place. And while GA4 is a neutral observer of all traffic sources, Meta’s attribution is designed to prove the value of its own ads and optimize delivery based on those rules. GA4 revolves around traffic source(s) which led to conversions. Meta tracks users instead and assigns conversions to different actions they took within the Meta ecosystem.

Let’s go through Meta attribution basics before we dive into key differences.

### Attribution setting for reports

Just by looking at the attribution models offered in Meta you see their only goal is to measure how Meta ads contribute:

![](/files/tVJjnOarV03cAvyzAi3Y)

One, seven or twenty-eight day click models mean that Meta will award full credit for a conversion if it happens in these respective timespans *after* an ad has been clicked - by clicked Meta means *all clicks*!

These are the attribution models for analyzing ads in retrospect.

{% hint style="success" %}
In GA4, the attribution models can be compared in the Advertising section.
{% endhint %}

When analyzing performance of your Meta ads - you have the option to compare various attribution models side-by-side. You can add this to your report at the bottom of "Columns" dropdown.

![](/files/DrwwAAPQMpi5N0ZMJ7d6)

### Attribution setting for ads

There is another context when you think about Attribution in Meta. During the Ad set creation you have the option to choose which attribution should your ad be optimized around.

{% hint style="warning" %}
Meta attribution setting affects delivery also, not just reporting!
{% endhint %}

The choice of models is way more limited when it comes to ad setup:

![](/files/8fSUUUeFEJleCk7UZUm6)

If you already deployed tons of Meta campaigns, but have never seen this option before, don’t worry - this setting is hidden in the ad set “Show more settings” setup:

![](/files/yejCoaAZcVibyHPKOA8e)

Default attribution is 7-day click & 1-day view meaning that Meta will go after users who buy either 7-days after clicking on the ad OR 1-day after seeing it. Dropdowns reveal quite disappointing limited choice of options, as you can only turn each one of them OFF, or reduce click-through to 1-day click:

![](/files/jy4dXbvyqbqNZLDjuM36)

This setting is important as Meta will optimize delivery around this rule, e.g if you reduce click-through to 1 day your ad will be served for quick-pull-trigger customers who buy within a day from clicking the ad (obviously not a good idea unless you have some kind of super hot FOMO promotion to offer!)

Now your GA4-trained brain is ready to understand where Meta’s logic diverges and why your reports almost never match.

In GA4, switching from last-click to data-driven doesn’t change how your campaigns run. It’s just a new lens on historical data. Meta’s attribution setting is different because it is baked directly into delivery optimization.

Example: If you set Meta to 7-day click and 1-day view, the algorithm hunts for users who are likely to convert under that exact rule set. Change the window to 1-day click only, and you are training Meta’s system to ignore people who might convert later.

GA4 mindset shift: In GA4, attribution is a reporting decision. In Meta, it is a strategic campaign lever. Meta attribution setting will affect delivery, unlike in GA4 where attribution is strictly for reporting purposes.

## Click attribution means ANY click

GA4 only credits clicks that generate a session. E.g a click on a Facebook ad that opens your site is credited to session source = Facebook once the GA4 tag fires.

Meta is far more generous with what counts as a click. Any interaction such as liking an ad, expanding its image, or watching part of a video starts the attribution clock. If the person converts later within your set window, Meta gives itself credit, even if there was no tracked site visit.

This is why you will often see Meta reports self-attributing conversions that GA4 does not credit to Meta. GA4 never “saw” the visit because it didn’t happen, and no session was recorded, the click kept the user within Meta boundaries.

## View-through conversions exist in Meta, not in GA4 (by default)

To a GA4 analyst, what you’re about to read often feels like giving credit to a billboard that someone drove past on their way to the store, or even last night while driving back home from work.

GA4 does not give credit to an impression unless you want to do so manually by analyzing Google Ads impression data. Meta, on the other hand, credits view-through conversions by default, if view attribution is on (defalt setup). If someone saw your ad and converted within a day, Meta will attribute that sale to 1-day view attribution.

## No session context in Meta

In GA4, the idea of session-scoped attribution means all activity within a session shares the same attribution source. Meta ignores session boundaries entirely. Its attribution logic is user-based, not session-based. The moment you open the attribution window by clicking or seeing an ad, that ad becomes eligible for credit, regardless of what else happens up to the moment of the conversion.

{% hint style="info" %}
Meta attribution logic is user-based, not session-based!
{% endhint %}

## First conversion reporting ≠ first user dimensions

In [GA4’s Exploration section](/google-analytics/behavior/ga4-explorations-complete-guide-for-ecommerce-growth) you can easily surface which first user source/medium brought any group of users to the website for the very first time. Meta’s “First Conversion” is completely different reporting simply removes repeat conversions from the count within the attribution window.

This means Meta’s First Conversion is more about deduplication than about true first-touch channel attribution. It does not help you understand initial acquisition, but only how many unique conversions happened after an ad touchpoint - think of GA4’s Total Purchasers vs Purchases comparison.

## Incremental attribution is Meta built-in feature (kind of)

From recently, Meta has an “Incremental Attribution” setting that uses internal models to filter out conversions it thinks would have happened anyway, i.e without a Meta ad.

But the details are opaque. In practice, this is still a black box, and the difference between the current “greedy” model and incremental is really subtle. Let’s see a real-world example of “incremental attribution” applied:

![](/files/Bum0gK9Na1ZhOF19dcvl)

## Meta’s scope is self-referential

GA4 attribution spreads credit across all tracked sources in your ecosystem: organic, paid search, email, social, affiliates, referrals, direct, etc. Meta’s scope is entirely self-referential. It only asks “Did Meta help cause this conversion?”

This means Meta’s numbers can never be directly compared to GA4’s total channel mix. They are answering different questions. GA4 is multi-channel. Meta is single-channel but multi-touch within its own channel.

## Why do the numbers rarely match?

If you have ever tried to reconcile Meta and GA4 reports, you know it is frustrating. Meta counts:

* Clicks GA4 never saw as sessions
* Views GA4 cannot track at all
* Conversions outside of session scope
* Different conversion counting rules

GA4 counts:

* Only visits tracked in sessions
* Attribution across all channels
* Conversions based on your chosen model

The result: GA4 is your wide-angle camera. Meta is your zoom lens, focused on one player only. Same scene, completely different framing.

## Final thought

If you understand GA4 attribution, the easiest way to approach Meta’s system is to stop thinking in terms of session context and imagine a sales engineer with only one goal: to persuade you how they contribute to your success. Meta attribution is ad-platform-centric, optimized for its own delivery logic.

Neither is “wrong” but they are designed for different purposes. GA4 gives you the full multi-channel story. Meta tells you the most flattering chapter about its own role.


# New and Returning Customer Purchase in Meta Ads

In this post, we'll cover how to use Littledata's [New vs Returning customer purchases](/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api#new-customer-vs-returning-customer-conversions) and use it to boost Meta campaigns.

As marketers, we know that New Customer purchases and Returning Customer purchases are different in nature and shouldn't be treated equally. It's one thing to try to acquire new customers, while it's completely another to optimize ads around returning buyers.

## Adding the purchase events from Littledata

If you are adding our [Meta Conversions API destination](/integrations/facebook-capi/how-to-install-shopify-to-conversions-api) for the first time, the **New Customer Purchase** and **Returning Customer Purchase** events will be selected by default.

![meta new customer event on first install](/files/CSeCLEwiDc9ByzhystQQ)

If you already have the Meta destination set up, you can enable them from the Events tab located in the Meta destination settings.

## Verifying the new purchase events

New and Returning Customer Purchase events should be immediately flowing into your Meta Events Manager, but at this point they are marked as unverified:

<figure><img src="/files/gYzOCmnvngFyZ3SP3NFI" alt=""><figcaption></figcaption></figure>

You have to manually confirm each one of them:

<figure><img src="/files/0YEWJCCYHWnwnsOF4jmN" alt=""><figcaption></figcaption></figure>

And don't forget to click on the additional acknowledgement popup - sometimes it is NOT appearing right after confirmation, so make sure to refresh the events manager page:

<figure><img src="/files/bhM8s9kFi8cNIYei43N4" alt=""><figcaption></figcaption></figure>

## Using purchase events in audiences

Once all these steps are completed - give your account some time to collect a few verified New and Returning Customer purchase events before going into audiences manager:

<figure><img src="/files/bGSFQ1geB3IwyepzVx2c" alt=""><figcaption></figcaption></figure>

After clicking on Custom audience and choosing your website as source of data, you'll see both New Customer Purchase and Returning Customer Purchase events, ready for you to build audiences around them!

<figure><img src="/files/ULgvlQQ5eDiTf4MfGeh7" alt=""><figcaption></figcaption></figure>

## Using New or Returning Customer Purchase events as conversions

{% hint style="info" %}
You should expect cost per acquisition (CPA) using this New Customer Purchase to go up, since returning customers are inherently easier to convert. As such you should be willing to bid more for new customers.
{% endhint %}

In order to optimize campaigns around these events you need to simply choose the proper one from the Conversion dropdown when setting up the ad set:

![](/files/oi3Vvxyp1GTz9pzXcpun)

A campaign setup like this will try to "find" new customers, proactively targeting more likely to buy for the first time.

## Measuring new and/or returning customer purchases in Meta ads reports

If you setup one of these events as the optimization signal, like in the screenshot above, the Results column would show you how many optimization events were attributed to matching campaign (or ad set or ad, depending on the report you're looking at).

But if you want to surface how many new or returning customer purchases happened for any campaign (even for the ones that are NOT optimized around this specific conversions i.e you want to see how many return customers purchased for a campaign aimed at ANY purchase) like this:

![](/files/JYIyHG8RVpvtShP6ty3F)

\
..you need to create a custom conversion based off of our proprietary custom events. You simply name it accordingly and choose our custom event from the Event dropdown list:

![](/files/nQ5q5URgIhVLFUfsEVuS)

This way you can know if any active campaign is bringing in new customers or sell to the ones that already bought from you in the past.


# Google Ads

![Shopify to Google Ads](/files/QAkIXMYPAYW9BrAeX4Lc)

Our **Enhanced Conversions** tracking for Shopify to Google Ads uses [server-side tracking](/get-started/how-server-side-tracking-works) so that each time a user purchases our servers can relay that event to Google Ads, **ensuring 100% conversion accuracy**.

{% embed url="<https://youtube.com/watch?v=uGjAJxYiQkQ>" %}

Using the Enhanced Conversions for Leads API, rather than relying on a script on the thank you page, improves marketing attribution and retargeting for Google Ads.

## What are Enhanced Conversions?

[Enhanced Conversions](https://support.google.com/google-ads/answer/9888656?hl=en-GB) is a feature of Google Ads that allows Littledata to send **first-party customer data**, securely and privately, directly to Google's servers to enable identification and attribution based on:

* email address
* customer name
* shipping address
* phone number

Enhanced Conversions improves the accuracy of your Google Ads measurement by increasing observable data and improving the overall quality of conversion modeling. Your first-party data from Shopify is **matched with signed-in Google accounts that engage with your ads**. When a match happens, a conversion is attributed based on that customer's interactions with Google Ads, rather than based on the Google cookie alone.

{% hint style="success" %}
Advertisers who implement Enhanced Conversions see a conversion uplift of 17% on YouTube
{% endhint %}

Some of the other benefits of Enhanced Conversions are:

* Recover conversions that otherwise wouldn't have been measured
* Better Ad attribution
* Improve bidding optimization through better data
* Privacy safe with hashing of first-party customer data


# Shopify to Google Ads installation guide

This is a guide that shows you how to install Littledata's Google Ads connection.

In this guide, we'll explain how to connect your Shopify store to the Google Ads destination.

## Quick install guide

{% stepper %}
{% step %}
**Add the destination**

From the Littledata dashboard, click **Add destination**.

![](/files/XBN8On4yFnPOYxcRIb5O)
{% endstep %}

{% step %}
**Connect Google Ads**

Find the Google Ads destination and click **Connect**.

![](/files/MLkiGlGT0PkPWcaU7B15)
{% endstep %}

{% step %}
**Sign in to Google Ads**

Sign in with your Google account and select the Google Ads account you want to connect.

![](/files/OOAUL2CgajYtOzrCo5vt)

{% hint style="warning" %}
**Don't use MCC ID**

Select the individual Google Ads account ID. Don't select an MCC ID, or conversion data will be misrouted.
{% endhint %}
{% endstep %}

{% step %}
**Enable Enhanced Conversions for Leads**

In Google Ads, enable **Enhanced Conversions for Leads** and accept the terms shown in the install flow.

{% hint style="info" %}
You can select either method (Google Tag or Google Tag Manager), it's just a placeholder to enable the setting.
{% endhint %}

After you finish this step in Google Ads, return to Littledata. Littledata will detect the change automatically and move you forward.

![](/files/wcAvvYe0QDcXQnJDIqhB)

{% hint style="info" %}
You need to enable Enhanced Conversions for Leads during setup. For more detail, see [how the Google Ads connection works](/integrations/google-ads/google-ads-how-it-works).
{% endhint %}
{% endstep %}

{% step %}
**Set Purchase - Littledata as your primary conversion**

After the connection finishes, **Purchase – Littledata** will appear as a new conversion in Google Ads.

Set it as your **Primary** action. Then switch your other purchase conversions to **Secondary (observe only)**.

{% hint style="info" %}
Primary actions are used for bidding and optimization. Secondary actions are tracked for reporting only.
{% endhint %}

1. In Google Ads, go to **Tools & settings → Conversions**.
2. Open **Purchase – Littledata** and click **Edit Goal**.
3. Set **Purchase – Littledata** to **Primary action**.
4. Set your other purchase conversions to **Secondary action (observe only)**.
5. Click **Save changes**.

![switch conversions to secondary](/files/dKqdNTWzCG5zHtMDc5oa)
{% endstep %}

{% step %}
**Finish the connection**

The Google Ads connection is now live on your store.
{% endstep %}
{% endstepper %}


# How it works: Shopify to Google Ads

## Client-side events

| **Event Name**   | **Description**                                 |
| ---------------- | ----------------------------------------------- |
| page\_view       | User has viewed any page                        |
| view\_item       | User has viewed an item on your website         |
| view\_item\_list | User has seen a collection page on your website |

Client-side events are tracked via Littledata's app embed directly to Google Ads.

Client-side events respect [Shopify's consent mode](/partner-recipes/cookie-consent-integrations/shopify-customer-consent-api), so if your store has a cookie banner, users can opt out of the tracking of these events.

All events are sent with your chosen Conversion Tag (*e.g., AW-123*). Conversion events include **value** and **currency** of the purchase, along with the Conversion Tag + Conversion Label (*e.g. AW-123/label*).

### How to check that client-side events are being sent

Google Ads does not offer a real-time view of events to verify that your entire setup is functioning correctly. However, for client-side events, you can use [Google Tag Assistant](https://tagassistant.google.com/) to check which events are being sent from your store to your Google destinations. By clicking 'Add Domain', you can verify how your data is being sent to Google.

![Google Tag Assistant](/files/GN9a4IsoJ2AU1rx1XBJx)

## Conversion actions

Littledata's Shopify to Google Ads connection automatically creates three conversion actions. They are automatically assigned a role, and their main purpose is to improve your targeting.

| **Conversion name**                        | **Role**                                                    |
| ------------------------------------------ | ----------------------------------------------------------- |
| `Purchase - Littledata`                    | Primary conversion, including all purchases                 |
| `New Customer Purchase - Littledata`       | Secondary conversion, only first-time customer conversions  |
| `Returning Customer Purchase - Littledata` | Secondary conversion, only returning customers' conversions |

### Using multiple primary conversion actions

If your Google Ads campaign is configured to track multiple primary conversion actions, Google will optimize towards all of them, treating each as a signal for bidding and budget allocation. This may dilute the effectiveness of your bidding strategy.

We recommend keeping our `Purchase - Littledata` conversion action as the only primary conversion action in your campaign. This ensures Google optimizes for the most accurate purchase data captured by our server-side tracking.

If you need to compare or validate Littledata's performance against other sources, you can set our conversion action as secondary temporarily, but keep in mind it won't be used for smart bidding in this case.

## Profit Signal

If you enable [Profit Signal](/sources/profit-signal/how-to-use-profit-signal), Littledata switches the conversion value sent to Google Ads from revenue to the estimated profit of each order. Pair this with a value-based Smart Bidding strategy such as **Maximize conversion value** or **Target ROAS** so the algorithm optimizes against profit. Your reported ROAS then becomes a return on profit, and budget naturally moves toward the products and audiences that generate the most profit rather than the most revenue.

See [How to use Profit Signal](/sources/profit-signal/how-to-use-profit-signal) for how profit is calculated and how to enable it.

## How to enable Enhanced Conversions

You will need to enable **Enhanced Conversions for Leads** and accept **Customer data terms** in your Google Ads account.

You can do this either in the Littledata installation process (where there is a step that will redirect you to the above-mentioned settings) or beforehand.

1. **Accept Customer data terms**

* In your Google Ads account, go to **Goals** > **Conversions** > **Settings**, expand **Customer data terms**, and accept.

After you're done it should look like this:

![Accept Customer data terms](/files/2o56EFEfwuqW1iaRDePd)

The terms may have previously been accepted in Google Ads.

{% hint style="info" %}
If you can't see Customer data terms, it is because the conversions are tracked by a manager account. The customer data terms need to be accepted by the manager's account and any Google Ads manager account that uploads on behalf of the manager account using cross-account tracking.
{% endhint %}

1. **Accept Enhanced conversions for leads**

* In your Google Ads account, go to **Goals** > **Conversions** > **Settings** > expand **Enhanced conversions for leads**, turn on and save
* For Littledata's implementation, it does not matter which method (Google tag / Google Tag Manager) you select before saving.

After you're done it should look like this:

![Accept Enhanced conversions for leads](/files/vNJ7Keb9gpTBs0v7ZNUO)

1. **Creating a conversion action in Google Ads**

A conversion action is created automatically by Littledata during the setup process.

The name of the conversion action will be **Purchase - Littledata** so you can easily identify and measure the performance of our integration.

You can see your conversion action by going to **Goals** > **Summary**

![conversion action in Google ads](/files/FerYZPlxbFQBWsJPgE0R)

The **Inactive** status means that the conversion action is not currently being tracked or used for optimization in your campaigns.

After the conversion action starts receiving data, the **Inactive** status should disappear while the conversion value and the number of conversions should increase.

### Why Enhanced Conversions for leads instead of web?

[Google's documentation](https://support.google.com/google-ads/answer/9888656?hl=en) states that

* **Enhanced Conversions for web** are relevant for advertisers who want to track sales and events that happen on a website.
* **Enhanced Conversions for leads** are relevant for advertisers who want to track sales that happen off a website (for example, phone or email) from website leads.

It may seem counterintuitive that Shopify stores would track leads.

However, where the Google cookie ID (`gclid`) is missing, **Enhanced Conversions for web** will reject events, so **Enhanced Conversions for leads** is the safer option to ensure even conversions without a known cookie will be processed.

### Matching first-party user data

The server-side event payload contains SHA256 hashed (which is the industry standard for one-way hashing) customer data:

* email address
* first name
* last name
* address

And data that can be sent unhashed:

* city
* country
* postal code

Google will try to [match this first-party data with Google accounts](https://support.google.com/google-ads/answer/7474263).

**Email and phone matching**

* Google keeps track of the email addresses and phone numbers for Google accounts and the corresponding hashed strings for those email addresses or phone numbers
* If there's a match with the hashed strings we send, Google associates the account with the data.

**Mailing address matching**

* Google joins hashed name and mailing address data for Google accounts to construct a matching key.
* Google will try to construct a similar key based on the data we send, and if there's a match Google associates the account with the matching key.

## Custom parameters

The following parameters are included with every conversion event sent to Google Ads.

| Parameter      | Description                                                                                                           |
| -------------- | --------------------------------------------------------------------------------------------------------------------- |
| market\_handle | The handle of the Shopify Market for this event. Fixed as `unassigned\_market` for orders not attributed to a market. |
| market\_id     | The internal Shopify Market ID for this event. Fixed as `0` for orders not attributed to a market.                    |

## Market parameters in Littledata events

All conversion events sent to Google Ads include the Shopify Market handle by default. This allows you to analyze purchase performance by Shopify market, build market-specific Customer Match audiences for smart bidding and targeting, and understand which markets are driving the most valuable conversions. For example, you can segment conversion reports by market or adjust bidding strategies for different regions. This requires Shopify Markets to be active on your store, but does not require any per-market destination configuration within Littledata.


# How better attribution increases your Google Ads revenue

Server-side tracking recovers 15–30% of missing conversions, improving Smart Bidding and driving \~10% more revenue. See benchmarks and calculate your ROI.

Littledata's server-side connection sends more complete conversion data to Google Ads than the Google & YouTube app or Google Tag Manager. These additional conversions do two things: it corrects your reported ROAS so you can make better budget decisions, and it gives Google's Smart Bidding algorithms richer signals so they can find more high-value customers. The combined effect is a measurable lift in revenue attributed to Google Ads.

This article explains the mechanism behind that lift and why a 10% revenue improvement is a conservative estimate for most Shopify stores.

## Why conversions go missing

Traditional client-side tracking relies on browser cookies and JavaScript tags to report conversions back to Google Ads. Several factors cause conversions to be lost before they reach Google:

* **Ad blockers** prevent the Google Ads tag from firing
* **iOS Intelligent Tracking Prevention (ITP)** restricts cookie lifetimes to 7 days and strips identifiers from URLs
* **Cross-device journeys** where a customer clicks an ad on mobile but purchases on desktop
* **Consent denied** where users do not consent to send Google events

Google's own research with the Boston Consulting Group found that [roughly 70% of cross-device conversions go untracked](https://yeezypay.io/blog/google-ads-enhanced-conversions-setup-guide) without solutions like Enhanced Conversions. Even on a single device, browser restrictions mean that many stores are only reporting 60% of their actual Google Ads conversions.

Littledata bypasses these issues by sending conversion data directly from Shopify's server to Google Ads via the [Conversions API](https://help.littledata.io/integrations/google-ads/google-ads-how-it-works), enriched with hashed first-party customer data for Enhanced Conversions matching.

## How more conversions improve campaign performance

Recovering missing conversions does not just fix your reports. It directly improves how Google spends your budget, through two mechanisms.

### 1. Smart Bidding gets better training data

Google's Smart Bidding strategies — Target ROAS, Target CPA, Maximize Conversion Value — use machine learning to set bids in every auction. The algorithm uses [Bayesian learning](https://support.google.com/google-ads/answer/10970825?hl=en) to predict conversion probability for each impression, refining its model as more conversion data arrives.

When conversions are missing, the algorithm systematically undervalues the campaigns, keywords, and audiences that drove those conversions. It bids less aggressively on what is actually working and may shift budget toward lower-performing segments that happen to have more complete tracking.

Adding server-side conversion data corrects this. The algorithm receives a more accurate picture of which auctions lead to purchases, and adjusts bids accordingly. Google's internal data shows that [accounts with sufficient conversion data see 20–35% more conversion value](https://leadsuitenow.com/blog/smart-bidding-google-ads-guide) at the same ROAS when using Smart Bidding. The key variable is data quality — which is exactly what server-side tracking improves.

### 2. You stop cutting profitable campaigns

Incomplete tracking makes profitable campaigns look unprofitable. If a campaign is driving a true ROAS of 5x but you are only seeing 70% of conversions, your reported ROAS is 3.5x. At that level, many marketing managers would cut budget or pause the campaign entirely.

This is the hidden cost of bad attribution — not just suboptimal bidding, but human decisions based on inaccurate data. When Littledata recovers those missing conversions, campaigns that appeared marginal reveal their true profitability, and budget flows to where it actually performs.

## Published benchmarks for the revenue lift

Multiple independent sources have measured the impact of improved conversion tracking on Google Ads performance:

| Source                                                                                                                | Finding                                                                            |
| --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [Google Ads documentation](https://support.google.com/google-ads/answer/13262500)                                     | Enhanced Conversions improve measured conversions by 5%+ on Search, 17% on YouTube |
| [Published case study data](https://almcorp.com/blog/attribution-modeling-google-ads/)                                | Enhanced Conversions improve attribution accuracy by 15–30%                        |
| [Google / Practical Ecommerce](https://www.practicalecommerce.com/how-conversion-data-improves-google-ads-automation) | ASOS saw 8.6% sales lift from Search after implementing Enhanced Conversions       |
| [Industry benchmarks](https://webmarketinginternational.com/good-roas-benchmarks-by-industry/)                        | Server-side tracking improves reported ROAS by 15–30% with no campaign changes     |
| [ProfitMetrics](https://profitmetrics.io/blog/conversion-booster-google-ads-serverside-tracking)                      | 12% additional conversions attributed on average via server-side tracking          |

It is important to distinguish between two types of improvement in these benchmarks. The **attribution uplift** (15–30%) represents conversions that were already happening but were not being reported. The **revenue lift** represents the genuinely incremental revenue driven by smarter bidding and better budget allocation once that improved data feeds the algorithm. Since Smart Bidding retrains on a 15–30% larger conversion dataset, the downstream effect on total revenue is typically in the range of 8–15%.

## Why 10% is a conservative default

A 10% revenue lift sits in the middle of the published range for the combined effect of:

* Recovering 15–30% of previously invisible conversions
* Enabling Smart Bidding to optimize with a materially larger conversion dataset
* Preventing incorrect budget cuts on campaigns that appear to underperform

The ASOS case study showed an 8.6% sales lift on Search alone — and ASOS already had a sophisticated tracking setup before Enhanced Conversions. That 8.6% was the improvement for a retailer whose tracking was already well above average. For a typical Shopify store moving from Google & YouTube app to Littledata's full server-side connection with Enhanced Conversions, the gap in data quality is larger, and so the improvement is likely to exceed what ASOS saw.

Stores with higher proportions of mobile traffic, longer purchase cycles, or significant cross-device behavior will typically see a larger lift, because these are the scenarios where client-side tracking loses the most data.

## Calculating your return on investment

The ROI of Littledata's Google Ads connection can be expressed as:

**ROI = Google Ads attributed revenue × revenue lift % ÷ Littledata monthly cost**

For example, a store with $80,000/month in Google Ads attributed revenue, a 10% lift, and a $400/month Littledata plan would see $8,000 in incremental revenue — a **20x return** on the Littledata investment.

You can model this for your own store using the [Littledata ROI calculator](/integrations/google-ads/google-ads-roas).

{% hint style="info" %}
The revenue lift percentage will vary by store. To measure your actual lift, compare Google Ads attributed revenue in the 30 days before and after connecting Littledata, controlling for seasonality and budget changes.
{% endhint %}

## Next steps

* [Install the Google Ads connection](https://github.com/littledata/helpcenter-content/blob/main/integrations/google-ads/google-ads-install-guide/README.md) (takes less than 10 minutes)
* [Understand how the connection works](https://github.com/littledata/helpcenter-content/blob/main/integrations/google-ads/google-ads-how-it-works/README.md)
* [Learn about Enhanced Conversions](https://support.google.com/google-ads/answer/13262500)


# Building winback campaigns in Google Ads

How to build winback campaigns in Google Ads

The benchmark conversion rate for ecommerce is 2% - so what happens with the remaining 98% of visitors who land on your website but never buy?

Retargeting visitors through personalized ads is a must do - people were already on your website, so it’s up to you to understand what prevented the purchase and adjust the offer!

Littledata’s role in this process is to collect user data and send it to GA4. Your role is to use this data to create proper retargeting audiences.

{% embed url="<https://www.youtube.com/watch?v=eZTke88eMqA>" %}

## Importing audiences from GA4

1. You can see how to get Littledata to track events in GA4 [here](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4)
2. After that you'll need to turn on Google Signals:

   ![ga4-signals](/files/BcFxu2wloDINrP5isF9Q)
3. Also don’t forget to link Google Ads to your GA4 property:

   ![gads-ga4-link](/files/caSTsDUWAqapyaxzRKoQ)
4. Here is where you can find your Audiences in your Google Ads account:

   ![](/files/z4CcGWLh3JsWqbZpc7HP)

## Example audiences for Google Ads

Here are just a few examples of particular audiences that address specific scenarios:

A. Customer keeps viewing products but never buys (purchase count = 0) B. A channel with high traffic volume in the top of funnel doesn’t convert C. Product added to cart but checkout never started D. Customer bought once and didn’t come back E. Customers who spent more than a preset threshold F. Your custom funnel dropoff (e.g. after a quiz, survey, etc) G. People who first visited during a particular time-range (e.g during Black Friday sale)

## How to build audiences in GA4

If you prefer watching a [video](https://youtu.be/eZTke88eMqA) that explains how to create GA4 Winback audiences that will help your Google Ads remarketing efforts.

## Audience-specific creative ideas

Here a a few ideas for creatives which fit a particular audiences (audience shown in parentheses):

**Highlight Product Benefits (A, C and E)**

Create retargeting ads that emphasize the key benefits of the products. Address objections by showcasing how the product solves a problem, meets a need, or enhances the customer's life. This could also include how-to guides, video demonstrations, or in-depth product specifications.

**Customer Testimonials (D, E)**

Use retargeting ads to feature customer testimonials or reviews. Real experiences from other customers can help overcome objections and build trust.

**Limited-Time Offers (E, F, H)**

Create a sense of urgency in retargeting ads by incorporating limited-time offers. Highlight discounts or promotions to encourage customers to make a purchase sooner rather than later.

**Address Pricing Concerns (A, F)**

If price is a common objection, use retargeting ads to emphasize the value proposition of the product. Showcase any additional features, quality, or uniqueness that justifies the price.

**Free Trials or Samples (B, D)**

Offer free trials, samples, or exclusive previews through retargeting ads. This allows potential customers to experience the product with minimal risk, addressing concerns they may have about its suitability. Free trials are especially interesting if you're trying to [acquire new customers](/integrations/google-ads/new-and-returning-customer-purchase-in-google-ads).

**Highlight Return Policies (B,C)**

Address concerns about the product not meeting expectations by highlighting the store's flexible return policies. Emphasize hassle-free returns and customer satisfaction guarantees in retargeting messages.

**Interactive Content (G)**

Create interactive retargeting content, such as quizzes or interactive product tours, to engage potential customers and address objections in a dynamic way.

## General creative ideas

Here are a few general types of ads that are very effective in the retargeting campaigns:

**Showcase Awards or Recognition**

If applicable, use retargeting ads to showcase any awards, certifications, or industry recognition the product has received. This helps build credibility and addresses concerns about product quality.

**Compare and Contrast**

Develop retargeting content that compares the product with competitors, emphasizing unique selling points and addressing objections by showcasing why the product stands out.

**FAQs in Ads**

Incorporate frequently asked questions (FAQs) directly into retargeting ads. This can address common concerns and provide instant answers to potential customers.

## Final thoughts

Remember to test different messaging and creative elements in your retargeting campaigns to identify what resonates best with your audience. Regularly analyze performance metrics to refine your approach and continually improve the effectiveness of your retargeting efforts.

Personalization is the key here - don't say the same things to everyone.

One last note to wrap it up (as the old adage goes) you are only as good as your list (or your audience in this case!)


# Google Ads FAQ

Littledata's [Google Ads connection](/integrations/google-ads/google-ads-how-it-works) provides accurate, server-side conversion tracking to your Google Ads account. Here are some frequently asked questions about our Google Ads connection.

#### What are Enhanced Conversions and why is it important to use them?

Enhanced Conversions is a feature that allows Littledata to send **first-party customer data**, securely and privately, directly to Google's servers to enable identification and attribution. This improves the accuracy of your Google Ads measurement by increasing observable data and improving the overall quality of conversion modeling.

#### How is this better than classic browser tracking for conversions?

While browser tracking can be blocked by ad blockers and privacy-focused browsers leading to incomplete data, the server-side tracking is sending data from Shopify's server directly to Google Ads and is not susceptible to these issues since it doesn't rely on browser scripts.

Such an approach reduces data loss and more accurate conversion data that helps to reduce wasted spend on underperforming ads.

#### How much time does it take for a new conversion action to populate?

New conversion actions can take up to **24 hours** to populate.

#### Do I need to disable the Google Ads account linked in the Google & YouTube channel in Shopify?

If you've connected your Google Ads account via Littledata, it is recommended to disconnect the Google Ads account from your Google & Youtube channel in Shopify to avoid counting **duplicate** conversions to your Google Ads account.

#### How do I know Littledata's Google Ads connection is working as expected?

When you complete the Google Ads connection, Littledata automatically creates a new conversion action in your Google Ads account called **Purchase - Littledata**. You should see conversions registered under this action moving forward. Our connection tracks **100%** of your purchases with the help of server-to-server technology.

#### How do I check if browser events are being sent?

While Google Ads does not offer a real-time reporting feature, you can always check if our browser events for Google Ads (page\_view, view\_item\_list, view\_item) are being sent using tools such as [Google Tag Assistant](https://tagassistant.google.com/), which will show the events firing in real time on your store.

#### Is your connection GDPR/CCPA compliant?

Yes. Server-side tracking allows for better control over the handling of sensitive information by providing more control over what data is shared and ensuring user consent is properly managed.

#### Google Ads account-default conversions

Each conversion goal in Google Ads has an account-default setting. When a goal is set as account-default, its primary conversion actions count toward your Conversions column and inform Smart Bidding across all campaigns (unless you override this with [campaign-specific goals](https://support.google.com/google-ads/answer/9143218)). See [About account-default conversion goals](https://support.google.com/google-ads/answer/4677036) for background.

Littledata creates the `Purchase - Littledata` conversion action via the Enhanced Conversions for Leads API. Google will **only** mark this goal as account-default automatically if every other goal in the same category is already account-default. If that condition is not met, the goal will not influence Smart Bidding until you enable it manually. This is intentional Google behavior designed to prevent campaigns from inadvertently optimizing toward unintended goals -- see Google's post on [streamlined account-default CustomerConversionGoal behavior](https://ads-developers.googleblog.com/2025/09/streamlined-account-default.html).

To set the goal as account-default:

1. In your Google Ads account, go to Goals > Conversion goals.
2. Find the goal containing "Purchase - Littledata".
3. Click Edit goal, enable Use as an account goal, then save.


# Where to find your Google Ads Conversions ID

### Finding the conversions settings

To find you Google Ads conversions ID, you will need to log into your Google Ads account and open the **Goals** tab, on the left sidebar. There you'll need to find the **Conversions** dropdown, and open the **Summary tab.**

![goals sidebar](/files/mpkMRF4QvXn9rYtIwoEL)

### Creating a new conversion

You can either select an existing conversion that you want to track with Littledata, or you can create a new one.

![selecting a conversion](/files/JNuISLp5rjAdwacTmULf)

Clicking on the conversion name will open the settings and you want to scroll down to **Tag Setup.** After you click open that section, three options will appear for tag setup. The easiest way is to click on **"Use Google Tag Manager".**

![get conversion ID](/files/NLBz4B0j7sskyqKT5Iac)

The only thing that is left now is to copy those values and paste them into Littledata.

Please note that for the Conversion ID, you will need to add **"AW-"** to the start of the Conversion ID.


# Google Ads Troubleshooting Guide

Troubleshooting guide for Google Ads issues

#### How to check if your tag is firing multiple times?

The most straightforward way to verify this is to check the `Webpages` table. There you will see immediately if the value is multiplied, like in this example:

To find this table, you need to click on your preferred conversion. On the top left, you will find the `Webpages` table.

![conversion-duplicate](/files/0hFTapJ7xeELKKwlk2KT)

#### Identifiers are too old warning

If you get this error, there isn't anything wrong with your setup. It is just a timing issue.

If you created a conversion a day ago, with a click-through window of 21 days, you might still get some `gclid's` that are 2 days old or more. This means that the specific `gclid` in question can't be used for this conversion, because it is older than the action. This issue will solve itself after some time has passed and it will not affect your results.\
\
You may also see this warning because of how Littledata maximizes conversion attribution. When a click identifier (gclid) is too old to be accepted, Littledata retries the conversion as an Enhanced Conversion using first-party user data (such as a hashed email) instead. Google Ads still flags the older `gclid` in the diagnostics, which is what triggers this warning, but the retry means more of your conversions can be attributed than if we only relied on click identifiers. In other words, the warning is a byproduct of recovering conversions that would otherwise have been lost.

<figure><img src="/files/0suJNZjRTo2FfkWqrFSM" alt=""><figcaption></figcaption></figure>

#### Click not found

Littledata sends all orders, not just those originating from a campaign. This notification is expected and can be safely ignored.

![](/files/yHD7N4K7r3QnLpeyAyTL)

#### Enhanced conversions has no recent data

This is a false positive. The dashboard expects the client-side tag to send user-provided data, but the data is already being fed server-side.

![](/files/PIHdBwpTsq5yjHAuMa2O)

#### Littledata's conversion showing fewer conversions in the first few days or weeks.

If you recently installed our Google Ads connection, Littledata adds multiple conversion actions that will start recording conversions from that point onwards.

Sometimes, the Littledata conversion actions might show fewer conversions than your legacy conversion actions. There are a multitude of factors contributing to this, including the [conversion lookback window](https://support.google.com/admanager/answer/2477118?hl=en), or users interacting with your Ads **prior to installing Littledata**.

This means that conversion attribution takes time to build, resulting in fewer conversions displayed compared to your legacy conversion action for a brief period of time.


# How to track conversions from Shopify into Google Ads

Learn how to link your Google Analytics and Google Ads (formerly AdWords) accounts to unlock the full potential of Google Ads on Shopify.

![Link Google Ads with Google Analytics](https://res.cloudinary.com/littledata/w_300,h_169,c_fit/littledata-blog-images/2019/02/google-ads.jpg)

## How to track conversions in Google Ads

Google provides two ways to get conversion actions into Google Ads:

1. By tracking **Google Ads** conversions **directly** from your site
2. By linking a **Google Analytics** account and **importing Key Events** into Google Ads

Littledata recommends combining **both approaches**. It includes both the Google Analytics and Google Ads server-side connections in our Google bundle. That means if you use Littledata for Google Analytics, you can connect Google Ads for **no additional cost**.

Let's start with [tracking into Google Ads](/integrations/google-ads/google-ads-how-it-works) directly, using primary conversion actions.

## Why server-side tracking matters

Traditionally, conversion tracking worked directly between a visitor's browser and Google Ads. When someone clicked an ad and made a purchase, the browser quietly passed that purchase information back to Google. This worked well — until browsers started blocking that kind of data sharing to protect user privacy.

Today, ad blockers and privacy-focused browsers routinely prevent those signals from reaching Google, which means Google Ads can end up with an incomplete picture of what's actually driving sales.

Server-side tracking solves this. Instead of relying on the visitor's browser, the purchase data is sent directly from Shopify's servers to Google Ads — completely bypassing browser restrictions.

![How server-side tracking compares to client-side tracking](/files/TY5TRqXlFPbWshwXJxTw)

Here's why that matters in practice:

### More accurate conversion data

Because the data travels from Shopify's servers rather than a visitor's browser, ad blockers can't interfere. You get a complete record of every purchase, not just the ones that happened to make it through. That means Google Ads has accurate data to work with when deciding which ads are performing best — reducing wasted spend and improving results over time.

### Better matching and audience targeting

Server-side tracking allows Littledata to attach more customer information (securely hashed, so it's never exposed) to each conversion event. Google uses this to better match purchases to the Google accounts of the people who saw your ads — even when cookies are blocked or a customer switches devices. With better matching, Google can correctly credit each touchpoint in the customer journey, helping you understand which ads, audiences, and campaigns are genuinely driving revenue.

This also makes your retargeting more precise. You can build [more accurate audience lists](/integrations/google-ads/build-winback-campaigns-in-googleads) for remarketing — such as cart abandoners or lapsed customers — as well as exclusion lists to avoid showing ads to people who've already purchased.

### Privacy-friendly by design

Because you control what data is sent and when, server-side tracking makes it easier to comply with privacy regulations like GDPR and CCPA. You can ensure customer data is handled correctly and that consent preferences are respected before anything is shared with Google.

### Faster pages

Every script loaded in the browser adds time to your page load. Moving tracking server-side removes those scripts from the visitor's browser entirely, leading to faster-loading pages — especially important on checkout pages, where a slow experience can directly reduce conversion rates.

## What Littledata adds

{% embed url="<https://www.youtube.com/watch?v=uGjAJxYiQkQ>" %}

Using Littledata to connect Shopify with Google Ads will:

* Use customer data to power [**Enhanced Conversions**](/integrations/google-ads/google-ads-how-it-works#how-to-enable-enhanced-conversions)
* Track [view-through conversions](https://support.google.com/authorizedbuyers/answer/166342)
* Include attribution of offline or recurring orders to Ads
* Provide robust and maintenance-free tracking – regardless of any Shopify theme changes

**Note:** the [conversion event count may be different](https://support.google.com/google-ads/answer/2679221?hl=en-GB) between Google Ads and Google Analytics.

{% hint style="success" %}
Installing Littledata for Google Ads takes less than 10 minutes. [Here's the step-by-step guide](/integrations/google-ads/google-ads-install-guide).
{% endhint %}

## Comparison with the Google Sales Channel

Shopify provides free conversion tracking into Google Ads as part of the Google & YouTube sales channel. Here's how this compares with Littledata:

| Feature                                                | Littledata | Google & YouTube |
| ------------------------------------------------------ | ---------- | ---------------- |
| Conversion tracking for Google Ads                     | ✔          | ✔                |
| 100% Shopify Revenue Tracked                           | ✔          | -                |
| Enhanced Conversions using 1st party data              | ✔          | -                |
| Recurring Orders / Subscriptions tracked               | ✔          | -                |
| Match ads to other Sales Channels (Amazon, TikTok etc) | ✔          | -                |
| Target campaigns for New Customers                     | ✔          | -                |

## Benefits of linking Google Analytics

[Linking Google Analytics to Google Ads](#linking-google-analytics-with-google-ads) allows you to import Key Events as [secondary conversions](https://support.google.com/google-ads/answer/11461796?hl=en) and sync audiences from Google Analytics for targeting across the full on-site conversion funnel.

You can then:

* Compare the 'greedier' attribution in Google Ads versus the multi-channel, data-driven attribution in Google Analytics
* Report on more ecommerce key events in Google Ads
* See detailed shopping funnel metrics in Google Ads
* Set up more advanced remarketing audiences for abandoned browse or abandoned cart

## Linking Google Analytics with Google Ads

{% stepper %}
{% step %}
**Check your access**

Before you start, make sure you have [Edit Property permissions](https://support.google.com/analytics/answer/2884495) in **Google Analytics** and [Administrative access](https://support.google.com/google-ads/answer/9978556) in **Google Ads**.
{% endstep %}

{% step %}
**Open Google Ads Links**

Sign in to Google Analytics. Then click the **Admin** cog in the bottom-left corner. In the **Product Links** column, select **"Google Ads Links"**.

![link adwords google analytics](/files/HhBc8Lw9NYVNZ51wuVVw)
{% endstep %}

{% step %}
**Start the link**

Click **"Link"**.

![select adwords account ga](/files/KWgbthpulnRWeM5or61B)
{% endstep %}

{% step %}
**Choose your Google Ads account**

In **"Create a link with Google Ads"**, click **"Choose Google Ads accounts"**. Select your Google Ads account, then click **"Confirm"**.

![link website data google analytics](/files/ej19ei5y8ZpxKRKPiVMs)
{% endstep %}

{% step %}
**Finish the setup**

Click **"Next"** twice, then click **"Confirm"**. The link will be created.

![link adwords account to ga account](/files/6Pffn4UDHuvSFkaHIwNd)
{% endstep %}

{% step %}
**Verify the linked account**

Open **Google Ads Links** again to confirm that your linked account appears there.

![adwords linking](/files/jkmHm5z9IcKXtehKKsYM)
{% endstep %}
{% endstepper %}

## Adding remarketing audiences

Once your Google Analytics 4 account is linked, you can automatically sync audiences with Google Ads.

{% stepper %}
{% step %}
**Open the audience builder**

In the **Property** column, click **"Audiences"** and then **"New audience"**.

![Adding remarketing audiences from Google Analytics 4](/files/y3IKl2MLXCNtEBncKRVa)
{% endstep %}

{% step %}
**Choose how to create the audience**

You can:

* [Create a new audience](https://support.google.com/analytics/answer/9267572?hl=en#create) and define all the rules yourself
* [Use a template](https://support.google.com/analytics/answer/9267572?hl=en#template) and adjust the existing rules
* [Select a suggested audience](https://support.google.com/analytics/answer/9267572?hl=en#suggested) and use it as is or modify it
  {% endstep %}

{% step %}
**Build the audience rules**

Use any of the [ecommerce events](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4#server-side-events) that Littledata sends, or custom dimensions like Customer Lifetime Value (LTV).

Common audience examples:

* **Only viewed a product** - users who viewed product details but did not add anything to cart in the last 30 days
* **Abandoned cart** - users who added to cart but did not purchase in the last 30 days
* **Purchasers** - users who made one or more orders in the last 30 days
  {% endstep %}
  {% endstepper %}

## Cookie consent & Auto-tagging limitations

GA4 relies on *auto-tagging* (`gclid`) and cookies to stitch ad clicks to sessions. But when users block advertising cookies, or when they fail for any reason, the `gclid` may not persist. In some cases, it may be removed from the URL before it reaches GA4.

A tracking template ensures every ad click appends UTM ([ValueTrack](https://support.google.com/google-ads/answer/6273460?hl=en)) parameters directly to the URL, regardless of cookie status.

One of the best-balanced approaches is to set templates at the account or campaign level. This ensures consistency and avoids conflicts with ad- or ad-group-level overrides. Implementing [URL templates](https://datatovalue.blog/the-smarter-way-to-add-utms-in-google-ads-for-clean-ga4-data-c4b55c4cb443) alongside auto-tagging creates a robust fallback measurement method for Google Ads.

## Removing the Google Ads Link

If you want to remove the Google Ads link, go to **Admin > Product Links > Google Ads Links**. Click your account, then the three dots in the top-right corner, and select **"Delete"**.

![Unlink google ads from google analytics](/files/adk5R73DUYvKgLEUULYM)

## Next steps

{% stepper %}
{% step %}
**Review how the Google Ads connection works**

Read [how the Google Ads connection works](/integrations/google-ads/google-ads-how-it-works).
{% endstep %}

{% step %}
**Set up the Google Analytics connection**

Set up Littledata's [Google Analytics connection](/integrations/shopify-to-google-analytics/littledata-shopify-install-guide).
{% endstep %}

{% step %}
**Build a win-back campaign**

[Build a win-back campaign](/integrations/google-ads/build-winback-campaigns-in-googleads) in Google Ads.
{% endstep %}
{% endstepper %}


# Why does Google Ads show more conversions than GA4?

Quite often brands see a higher number of ecommerce purchases in Google Ads than in Google Analytics 4. Why?

There are several reasons why your Google Ads conversion count can be significantly higher than what you see in Google Analytics 4. In this article we’ll focus particularly on Enhanced conversions for Google Ads and why they differ from GA4 because that is the technology used by Littledata to send conversions to Google Ads.

## What are Google Ads Enhanced Conversions?

Before we start let’s quickly go through the way Google Ads Enhanced [conversions](/google-analytics/conversions/conversion-rate-ga4) work (it’s important for understanding the difference from GA4!):

Every time a user clicks on your Google ad, the clickID is paired with their email address they used to log in on Google platform (browser, gmail, android, youtube… etc). If that email address happens to buy from you in the future - that ad gets a piece of the credit for the conversion.

It’s important to note that the email address or any other data collected is **hashed** - which means that it’s anonymized before being sent to Google!

## Why Google Ads Enhanced conversions show higher event count than GA4?

Now that we understand how Google Ads Enhanced conversions work, we can list the reasons for seeing discrepancies between Google Ads and Google Analytics 4 conversions - sorted by priority:

1. Attribution model - as we explained above, a user can see your Youtube ad (without even clicking, *literally just see it!*) while logged into Google, and if they buy in the future via direct or social, email or any other non-google visit, the ad will get a portion of that conversion in Google ads, but NOT in GA4. The “portion” - deals with the fact that each conversion potentially has multiple touchpoints before the purchase, so each interaction with your ad deserves a portion of credit. Google, being the dominant organic search player, also includes organic data into this “equation” in GA4.
2. Consent - Google Analytics 4 needs [approval from visitors](/partner-recipes/cookie-consent-integrations/shopify-customer-consent-api) to tie their source of traffic with the purchase, whereas with Google Ads Enhanced Conversions this “tie” links hashed email on Google platform to hashed email in your store conversion and awards clickID connected to the former, i.e. the proper ad that caused that clickID to happen.
3. Attribution window - Long after a campaign is turned off, the clickID will persist, to be precise if the attribution window is 90 days (which is Google Ads default)
4. Switched devices - imagine a visitor clicked one of your ads on mobile, but bought on desktop. Or the other way around.. Or any other combination of devices - as long as the email used for Google login is consistent AND that email is on the order.

Apart from these *expected* reasons there are also negative examples how technical misconfigurations can cause increased Google Ads conversion count.

## Why GA4 can show lower conversion count than Google Ads Enhanced conversions?

While there are many reasons for GA4 to under-count google/cpc conversions, the case where this is completely Google Ads’ fault is **duplicated Google Ads conversions** - you might have two routes sending same conversions twice into the same Google Account.

The reasons why GA4 could report lower conversion count can be:

1. GCLID stripped - due to various privacy protection methods (which we’re not gonna go into!) this parameter that is automatically added to the URL of a clicked Google ad might get stripped, and it’s the GA4 primary source of information about ads. There’s a workaround to put utm parameters on account level for
2. Payment provider not excluded from referral list: a visitor may briefly abandon your website and “visit” paypal, stripe or similar payment provider site, then come back to the thank you page - GA4 might misunderstand that the visit comes from payment site domain
3. If your store spans multiple domains (e.g shop(dot)com and checkout(dot)shop(dot)com),[ ](/integrations/google-ads/build-winback-campaigns-in-googleads)GA4 may lose the session source/medium data when the user moves between them, treating the purchase as a "Direct" visit while it actually came from google/cpc
4. Landing page software (Shogun, Gem Pages etc) that accept your paid traffic but don’t have GA4 installed
5. Thresholding - applies only if you have too few conversions from Google Ads in a given timeframe. The official docs suggest that a conversion coming from a campaign with less than 30-50 events might get bundled with other alike traffic sources in order to avoid individual users. If on the top of your GA4 report a small orange warning icon says "Thresholding applied," some of your google/cpc data might be filtered out of view.

## Conclusion

It’s completely normal and quite often to see a higher number of ecommerce purchases in Google Ads than in Google Analytics 4 because the former tracking is way better at following customers through privacy blocks and across different devices. Enhanced Conversions tend to recover "lost" sales that GA4’s cookie-reliant model often misses due to privacy restrictions. However, it’s good to do health checks by making sure that your GA4 conversion deficit is not happening due to payment provider referral steals, landing page problems or any other issue listed in the second part of this article.


# New and Returning Customer Purchase Event in Google Ads

As marketers, we know that understanding the difference between new and returning customers in your Google Ads campaigns is essential for budget allocation and maximizing ad spend efficiency. Your goal is to maximize new customer influx at projected cost per acquisition (CAC) while maintaining a balanced budget for retention campaigns.

## Why Track New and Returning Customer Purchases Separately?

New customers are critical for business growth, as they expand your customer base and create long-term sustainability. However, acquiring them typically costs more than retaining existing customers.

Returning customers, on the other hand, should primarily be engaged through owned channels like email and organic social media. In some cases - such as re-engaging dormant customers - [Google Ads retargeting](/integrations/google-ads/build-winback-campaigns-in-googleads) may be justified.

![](/files/Cc8UyILtb1z2a7BEBP8E)

By tracking these two purchase events separately, you can make informed decisions about budget distribution, ensuring that your campaigns focus on acquiring new customers while efficiently managing retention costs.

## Enhanced Conversions in Google Ads: The Key to Reliable Data

Enhanced conversions in Google Ads, particularly those sent by Littledata directly from Shopify’s server, provide a more accurate and privacy-compliant method for tracking purchases. Unlike traditional client-side tracking, which is vulnerable to blockers and privacy restrictions, server-side tracking ensures near-100% accuracy.

![](/files/gRl15UlTSaPhVS668mFn)

Littledata ensures that each purchase event is transmitted directly to Google Ads, bypassing tracking gaps while protecting user privacy through hashed personally identifiable information (PII) such as name, email, and phone number.

Littledata's [enhanced conversion tracking for Google Ads](https://blog.littledata.io/2025/01/17/why-enhanced-conversions-might-result-in-fewer-conversions-attributed-to-google-ads/) specifically identifies three types of purchases:

* General purchase: Tracks all conversions.
* New customer purchase: Identifies customers making their first purchase.
* Returning customer purchase: Flags repeat buyers.

This segmentation provides Google Ads with critical data, allowing you to optimize your campaigns based on whether a customer is new or returning.

## Leveraging Littledata’s Enhanced Conversion Tracking for Google Ads

Littledata’s enhanced conversion tracking solves several challenges at once:

* by hashing PII, it improves accuracy in Google Ads while ensuring compliance with privacy regulations
* overcomes the sunset of so called “Similar audiences” in Google ads by sending only new customers as a conversion that enables campaigns to optimize around it and expand your customer base

![](/files/nGBpLKIRTEHLtRzoGIyK)

Alternative Methods and Their Limitations

While you can import audience lists manually, this method lacks browser identifiers. Similarly, importing data from Google Analytics has its drawbacks: incomplete purchase data (unless Google Analytics is integrated with Littledata), lack of hashed PII (Google Analytics does not send name, email, or phone number with each transaction).

Even if you set your campaigns to optimize for new customers within Google Ads, traditional tracking methods still fail to capture crucial browser identifiers and personally identifiable information.

## Setting Up New Customer Purchase Tracking in Google Ads

The native way to differentiate the customers obtained by advertising is by implementing Google's dedicated New Customer Acquisition Parameter within your conversion tracking tag.

To do this, you must dynamically calculate on your website (typically on the checkout or purchase confirmation page) whether the user completing the conversion is a first-time buyer. You then pass this information back to Google Ads via a parameter in your gtag.js event snippet.

| Integration method             | Parameter name | Value type | Example value     |
| ------------------------------ | -------------- | ---------- | ----------------- |
| Google Ads Conversion tracking | new\_customer  | Boolean    | true/false        |
| Google Analytics 4             | customer\_type | String     | 'new'/'returning' |

Your website's data layer or custom code must look up the user's purchase history (e.g., checking for an existing account or previous purchase cookie). Google typically uses a 540-day window to automatically detect returning customers, but your custom implementation can have different lookback timeframes.

By correctly implementing this parameter, you can view a breakdown of "New Customers" and directly in your Google Ads conversion reports.

For example here's side by side look on how this metric compares to Littledata tracker:

![new cutomer metric in Google Ads](/files/qF11MrdyWrgfqXbnhmVV)

As you can see, the Littledata New Customer Purchase event has a higher count and that's expected because it's sent server-side i.e. directly from the ecommerce store's Shopify servers.

## Setting Up New Customer Purchase Tracking in Google Ads with Littledata

To get started with Littledata’s enhanced conversions for Google Ads:

1\. Enable the Shopify-to-Google Ads connection in the Littledata admin. It will automatically track three conversion events: General purchase, New customer purchase, and Returning customer purchase.

![](/files/KETnx5Y02rMKlyxShj7B)

1. Wait 10-12 hours for data to populate in your Google Ads account, then go to the Goals section in Google Ads:

Scroll down and click “Add Custom Goal.”

![](/files/JPrbm2eSVmQ9Ku7l0ioh)

Select “New customer purchase (Littledata)” and “Returning customer purchase (Littledata).”

![](/files/hjNNCUEknLZAiSl2nXLe)

Name them accordingly and save.

1. Assign the new customer purchase goal to specific campaigns:

Go to the campaign of your choice.

Select “Campaign-specific goal.”

![](/files/Wv1FntNMFXsIwHhjqFQA)

Choose the custom goal for new customer purchases.

## Key Considerations for Optimizing Customer Acquisition Costs

While optimizing campaigns exclusively for new customers will naturally increase acquisition costs, this should not be seen as a downside. The goal is not simply to lower cost per sale—it’s about acquiring high-value customers who will generate long-term revenue.

To set an effective customer acquisition cost (CAC), consider:

* Customer [lifetime value](/google-analytics/conversions/lifetime-value-in-ga4) (CLV)
* Retention period (especially if you operate a subscription-based model)
* Average number of purchases per customer

By strategically investing in new customer acquisition while maintaining cost-effective retention strategies, you can build a sustainable growth model.

## Final Thoughts

Tracking new versus returning customers in Google Ads is a game-changer for campaign optimization. By using Littledata’s enhanced conversions, you ensure accurate, privacy-compliant data that helps you make smarter budget allocation decisions.

Implementing these best practices will help you strike the right balance between acquiring new customers and nurturing existing ones—ultimately leading to better ad spend efficiency and long-term business growth.

Happy advertising!

\\


# Google Analytics

![shopify to google analytics](/files/SNBgKEVTO1DRaHAaEvV7)

Shopify Analytics is limited for marketing reporting and attribution, and Shopify's free integration with Google Analytics - via the Google & YouTube app - is unreliable and inflexible.

Littledata's [Shopify Google Analytics](https://www.littledata.io/shopify/google-analytics) connection uses a combination of client-side and server-side tracking to ensure 100% accurate data about your Shopify store in Google Analytics. Littledata automatically integrates with your store to capture every customer touchpoint, including sales, marketing and product performance data.

## Connection benefits

* Combination of client-side and server-side tracking to capture [browsing activity, orders and refunds](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4#what-can-you-track)
* Accurate [marketing attribution](https://blog.littledata.io/2023/06/28/the-truth-about-cookies-and-attribution/)
* Full control over your event data with the [Event Editor](/event-editor/overview) — filter, derive, enrich or remap any event before it reaches your destination
* [Custom dimensions](/google-analytics/conversions/customer-lifetime-value-google-analytics) for calculating LTV and more
* Send margin instead of revenue to your ad platforms with [Profit Signal](/sources/profit-signal/how-to-use-profit-signal)
* Option to export data [from GA4 to a BigQuery data warehouse](/google-analytics/setup/ga4-to-bigquery)
* Connect [Shopify + Google Ads](https://www.littledata.io/shopify/google-ads)

## Connection details

Littledata's Google Analytics connection works automatically for detailed ecommerce tracking and marketing attribution in Google Analytics. This chart outlines what you can track with Littledata versus the Google & YouTube app.

{% hint style="info" %}
**Google & YouTube app update, August 2026:** Shopify's native app is adding four events (`view_item_list`, `remove_from_cart`, `view_cart`, `add_shipping_info`) and standard Enhanced Ecommerce parameters. Littledata already sends all of this event and parameter data, with more customisation of server-side events with Event Editor.
{% endhint %}

| **Essentials**                          | **Google Channel** | **Littledata** |
| --------------------------------------- | ------------------ | -------------- |
| Basic ecommerce events                  | ✔                  | ✔              |
| Accurate attribution to source of visit |                    | ✔              |
| Subscription & upsell tracking          |                    | ✔              |
| Support from Google Analytics Experts   |                    | ✔              |

### Custom dimensions

| **Custom dimensions**        | **Google Channel** | **Littledata** |
| ---------------------------- | ------------------ | -------------- |
| Store name (for multi-store) |                    | ✔              |
| Shopify Customer ID          |                    | ✔              |
| Last transaction date        |                    | ✔              |
| Purchase count               |                    | ✔              |
| Lifetime Revenue             |                    | ✔              |
| App Name                     |                    | ✔              |
| Affiliation                  | ✔\*                | ✔              |

{% hint style="info" %}
\*Affiliation from Google & Youtube channel = hostname; Littledata's affiliation dimension displays the order type (i.e. recurring order)
{% endhint %}

Read more about [user properties and custom dimensions](/google-analytics/conversions/customer-lifetime-value-google-analytics)

| **Recurring orders (from** [**subscription apps like Recharge**](/sources/shopify/tracking-subscription-orders-in-the-shopify-checkout)**)** | **Google Channel** | **Littledata** |
| -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | -------------- |
| User attribution                                                                                                                             |                    | ✔              |
| Linking subscription revenue to marketing campaigns                                                                                          |                    | ✔              |
| Subscription type differentiation                                                                                                            |                    | ✔              |
| Can calculate Customer Lifetime Value                                                                                                        |                    | ✔              |
| Can calculate Subscriber Churn Rate                                                                                                          |                    | ✔              |

### Control and customization

Adding fields to a fixed set of events only gets you so far. The real gap between Littledata and the Google & Youtube app is how much control you have over that data once it's flowing.

| **Control & customization**                                                                                             | **Google Channel** | **Littledata** |
| ----------------------------------------------------------------------------------------------------------------------- | ------------------ | -------------- |
| [Event Editor](/event-editor/overview): filter, derive, enrich or remap any event                                       |                    | ✔              |
| [Include or exclude specific order/sales channels](/advanced/troubleshooting/how-to-exclude-orders-by-source)           |                    | ✔              |
| Track [post-purchase upsells](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4#server-side-events) |                    | ✔              |
| [Custom dimensions](/google-analytics/conversions/customer-lifetime-value-google-analytics) for LTV, churn and more     |                    | ✔              |
| [Profit Signal](/sources/profit-signal/how-to-use-profit-signal): send margin instead of revenue                        |                    | ✔              |

For example, you can use the Event Editor to keep POS or wholesale orders out of your ad conversions, [exclude a sales channel](/advanced/troubleshooting/how-to-exclude-orders-by-source) entirely from a destination, or [derive a custom event](/event-editor/custom-events) for a single high-value segment — none of which the Google & Youtube app supports.

### How Littledata's Google Ads connection compares to the Google Sales Channel

If you've installed our Google Analytics connection, the next step is to power up your Google Ads data with Littledata's [Google Ads connection](/integrations/google-ads/google-ads-install-guide). Here's a peek at how our Google Ads connection compares to Shopify's native connection:

| **Feature**                            | **Littledata** | **Google Channel** |
| -------------------------------------- | -------------- | ------------------ |
| Conversion Tracking for Google Ads     | ✔              | ✔                  |
| Supports checkout extensibility        | ✔              | ✔                  |
| Tracks 100% of conversions server-side | ✔              | -                  |
| Enhanced Conversions                   | ✔              | -                  |

### Learn more

Read more about how to make the most out of Littledata's robust, no-code tracking solution.

* See [what reports you can view](/google-analytics/conversions/shopify-to-google-analytics-4-beta) in GA4
* Take full control of your event data with the [Event Editor](/event-editor/overview)
* Customizable [data pipeline settings](/advanced/developer/data-pipeline-settings) and how to add [custom GTM](/advanced/developer/gtm-and-google-analytics-data-layer-for-shopify) that works with Littledata (such as quiz tracking)
* Install Littledata's [Advanced Google Analytics app](https://apps.shopify.com/littledata) in the Shopify app store
* Learn [how Littledata sends the events](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4) from Shopify to Google Analytics


# Littledata to Google Analytics installation guide

In this guide, we'll explain how to connect your Shopify store to the Google Analytics 4 destination.

## Quick install guide

{% stepper %}
{% step %}
**Add the destination**

From the Littledata dashboard, click **Add destination**.

![](/files/XBN8On4yFnPOYxcRIb5O)
{% endstep %}

{% step %}
**Connect Google Analytics 4**

Find the Google Analytics 4 destination and click **Connect**.

![](/files/Vbsg45yavtOKMeyTw4aM)
{% endstep %}

{% step %}
**Choose your tracking preferences**

Select your tracking preferences, then click **Continue**. The recommended settings are already selected.

![](/files/0rVCzIII9L4ZfH9e8TFf)
{% endstep %}

{% step %}
**Sign in and select your property**

Sign in with your Google account to load your available Google Analytics properties.

![](/files/G0wpi3ifHX3yUaerVZOD)

{% hint style="info" %}
If you connected the wrong account, click **Change account**, then refresh the property list.
{% endhint %}
{% endstep %}

{% step %}
**Disable duplicate tracking**

Turn off any tracking that could duplicate Littledata's Google Analytics data.

Follow the instructions shown in the install flow, or watch [this video](https://youtu.be/CWr0WL-dyTw) to disable Shopify's native Google Analytics tracking.

After you finish, tick **I have disabled other tracking apps** and click **Continue**.

![](/files/GgNBqbsdmc1TnkzEp4sS)
{% endstep %}

{% step %}
**Finish the connection**

Your Google Analytics 4 property will start receiving data as soon as setup completes.
{% endstep %}
{% endstepper %}


# How it works: Shopify to Google Analytics

![shopify to google analytics](https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-ab4ead720decff02f47aef7185ab6fe6d0aeece8%2Fconnection-google-analytics.png?alt=media)

Littledata's Shopify to Google Analytics 4 connection uses a combination of client-side (browser) and [server-side tracking](/get-started/how-server-side-tracking-works) to ensure 100% accurate data about your Shopify store in Google Analytics 4.

{% embed url="<https://www.youtube.com/watch?v=zoYJea5G5zU>" %}

Littledata automatically integrates with Shopify sites to capture every customer touchpoint, including sales, marketing, customer and product performance data.

## What can you track

{% hint style="success" %}
For a more detailed schema and parameters, reach out to <help@littledata.io>.
{% endhint %}

All the events below are tracked by default, but can be turned off and on during the setup or in the [data pipeline settings](/advanced/developer/data-pipeline-settings).

## Client-side events

Client-side events tracked by Littledata, via a script loaded within your Shopify theme.

| Event Name            | Description                                                 |
| --------------------- | ----------------------------------------------------------- |
| page\_view            | User has viewed a page                                      |
| view\_item\_list      | User has viewed a product link as they scroll down the page |
| select\_content       | User has clicked a product within a product list            |
| view\_item            | User has viewed a product                                   |
| click                 | User has clicked a product image                            |
| share                 | User has shared a product                                   |
| view\_cart            | User has viewed the cart page                               |
| view\_search\_results | User has viewed the product that he searched for            |
| sign\_up              | User has created an account on the store                    |
| login                 | User has logged in an existing account                      |

## Server-side events

Server-side events are tracked by [Littledata servers](/get-started/how-server-side-tracking-works) from Shopify and passed onto any destination in cloud mode.

| Event               | Description                                                                                                                                                                                            |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| add\_to\_cart       | User has added a product to the cart, and left it in the cart for more than 10 seconds                                                                                                                 |
| remove\_from\_cart  | User has removed a product from the cart                                                                                                                                                               |
| begin\_checkout     | User has [started the checkout](/integrations/shopify-to-google-analytics/checkout-funnel-steps)                                                                                                       |
| add\_shipping\_info | User has completed [checkout step 1](/integrations/shopify-to-google-analytics/checkout-funnel-steps)                                                                                                  |
| add\_payment\_info  | User has completed [checkout step 2](/integrations/shopify-to-google-analytics/checkout-funnel-steps)                                                                                                  |
| purchase            | Customer has completed a web order (excluding Point of Sale orders). The transaction ID is by default the [Shopify order name](/advanced/developer/data-pipeline-settings#data-customization-settings) |
| refund              | Web order has been refunded                                                                                                                                                                            |
| upsell              | User has accepted a post-purchase upsell offer                                                                                                                                                         |

{% hint style="info" %}
Transaction events may be delayed by 40 seconds to include any updates to order tags or status made by other apps after the order was created
{% endhint %}

## Supported checkouts

Littledata [sends checkout steps to Google Analytics](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4) automatically, to ensure you can report on checkout conversions out of the box.

Littledata supports checkout funnel event tracking for:

* [New Shopify checkout](#server-side-events) (including **Checkout Extensibility**)
* [Recharge checkout](/sources/recharge/how-it-works-recharge-to-google-analytics-connection)
* One-click checkouts (Shop Pay, Amazon etc)

Checkout journey starts when a user clicks the **checkout button**. Here is the structure of these events and how they work.

![Shopify checkout tracking](https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-6710d7e913cb97424a3aaf79b1da2fed57783db4%2Fcheckoutsteps-.png?alt=media)

## Custom parameters

The custom event parameters listed in this table are sent with every event. The user-scope parameters are sent when the customer logged in (typically step 2 of the checkout onwards).

Most of these are [automatically created as custom dimensions](/google-analytics/conversions/customer-lifetime-value-google-analytics) during the Google Analytics 4 connection setup. For example, Google Ads can be targeted at new customers only by creating an audience where the custom dimension `purchase_count_ld` is 1.

| Parameter                   | Description                                                                                                                                                                                              | Scope |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| user\_id                    | Special parameter, used for user identity. Only available when [user data is enabled](/integrations/shopify-to-google-analytics/tracking-first-party-data-ga4)                                           | User  |
| lifetime\_revenue\_ld       | Total of revenue from current and all previous purchases for that customer on Shopify                                                                                                                    | User  |
| purchase\_count\_ld         | Count of current and all previous purchases for that customer                                                                                                                                            | User  |
| last\_transaction\_date\_ld | Date of customer's last order                                                                                                                                                                            | User  |
| shopify\_customer\_id\_ld   | Customer ID as used on Shopify                                                                                                                                                                           | User  |
| littledata\_client\_id      | Client ID: the cookie identifier Google uses to group events by user                                                                                                                                     | User  |
| affiliation                 | A coma-separated list of order tags. Untagged orders use Shopify                                                                                                                                         | Event |
| store\_name                 | The name of the Shopify store generating the event. Useful when you have multiple country stores feeding into one GA property.                                                                           | Event |
| app\_name\_ld               | The app name that generated the order (fallback on app ID).                                                                                                                                              | Event |
| market\_handle              | The handle of the Shopify Market for this event. Fixed as `unassigned\_market` for orders not attributed to a market.                                                                                    | Event |
| market\_id                  | The internal Shopify Market ID for this event. Fixed as `0` for orders not attributed to a market.                                                                                                       | Event |
| profit                      | The estimated profit of the order, sent with the purchase event when [Profit Signal](/sources/profit-signal/how-to-use-profit-signal) is enabled. Register it as a custom metric in GA4 to report on it. | Event |

### Session Enrichment

This solution enhances the accuracy of your tracking, provides more reporting possibilities—including viewing purchases by device and geolocation — and allows fine control of source / medium.

### General Benefits

* **Improved accuracy:** Experience more precise server-side data collection, minimizing discrepancies and ensuring your analytics are reliable.
* **Enhanced reporting**: Unlock advanced reporting dimensions such as device and geolocation for all events, to gain deeper insights into your audience.
* **Source / medium control:** Customize how orders are attributed based on the Shopify sales channel.
* **100% revenue tracked:** Continue to enjoy complete revenue tracking through our robust server-side tracking solution.

### Detail on Session Enrichment features

1. **Attribution Boost**

The Attribution Boost feature is automatically enabled for all Littledata users. This feature is especially beneficial for businesses offering subscriptions. It allows us to remember the attribution of the first order and apply it to all subsequent orders under that subscription. This means you get a more accurate understanding of customer lifetime value and the effectiveness of your initial acquisition channels.

1. **Source / medium customization**

For users seeking greater control over their data, the [**Source / medium customization**](/integrations/shopify-to-google-analytics/source-medium-customization-payment-gateway) feature allows you to define what source, medium, or campaign name is appended to your orders based on specific order parameters.

For a more detailed schema and parameters, reach out to <help@littledata.io>.

## Market parameters in Littledata events

All events sent to Google Analytics 4 include the Shopify Market handle by default. This allows you to filter and segment your reports by Shopify market — for example, comparing conversion rates, revenue, or funnel drop-off between different markets, or building GA4 audiences for Google Ads remarketing targeted at specific regions. You can register market as a custom dimension in GA4 to use it across all your standard and custom reports. This requires Shopify Markets to be active on your store, but does not require any per-market destination configuration within Littledata.


# Tracking Shopify checkout steps in Google Analytics

A guide to the tracking checkout funnel events - including Shopify checkout extensibility - into Google Analytics 4

## Tracked checkouts

One of the biggest features of Enhanced Ecommerce tracking is support for checkout steps - the navigation path which you expect your website users to follow after they initiate the checkout up to the purchase.

Littledata [tracks the Shopify checkout automatically](/sources/shopify/shopify-checkout-extensibility), to ensure you can use the GA4 checkout funnel report out of the box.

Littledata supports checkout funnel event tracking for:

* Shopify checkout (including Checkout Extensibility) \*
* Accelerated checkouts (Shop Pay, Amazon etc)

\* This includes the same events for both the [one-page checkout](https://help.shopify.com/en/manual/checkout-settings/one-page-checkout) rolled out in 2024 and the original three-step checkout.

The Shopify checkout also includes checkout apps handling subscriptions and upsells. i.e. The checkout steps are the same for these customer journeys, but the [resulting order is differentiated](/sources/shopify/tracking-subscription-orders-in-the-shopify-checkout).

## Checkout steps

When the customer starts and progresses through the checkout on your ecommerce site, Littledata sends a **Checkout Step** event to Google Analytics for the following checkout steps:

* Step 1: Contact information
* Step 2: Shipping information
* Step 3: Payment method
* Purchase (Order complete)

{% hint style="success" %}
Check out a detailed list of [all events supported](/advanced/developer/gtm-and-google-analytics-data-layer-for-shopify) in Littledata's GTM and Google Analytics data layer.
{% endhint %}

## Event names and triggers

The checkout journey starts when a **user clicks the checkout button**.

Let's take a closer look at the structure of these events, what we call them when they're triggered, and how they work.

| Step     | GA4 Event Name      | User action                  | Technical trigger                          |
| -------- | ------------------- | ---------------------------- | ------------------------------------------ |
| 1        | begin\_checkout     | Contact info section viewed  | Checkout created in Shopify for that cart  |
| 2        | add\_shipping\_info | Shipping info section viewed | Customer property added to checkout        |
| 3        | add\_payment\_info  | Payment section viewed       | Shipping lines property addded to checkout |
| Purchase | purchase            | Order completed              | Order is created and marked as PAID        |

### Accelerated checkouts

Littledata works seamlessly with one-click checkouts (like Shop Pay), tracking the purchase and sending it over to the desired destination, as well as attributing it to the original source.

But these accelerated checkouts may lack Checkout Steps - because the nature of the one-click checkout is to bypass the Shopify checkout entirely.

## How the report looks in Google Analytics

After you install Littledata, you will start seeing data populating in your [Checkout Journey report](https://support.google.com/analytics/answer/14000977) with the checkout steps like this:

![Screengrab of the Checkout Journey UI in Google Analytics.](/files/gXmqUmVo0MJ9yg64Pbar)

## How to customize your checkout funnel in GA4

The Checkout Journey report is not editable, but you can easily rebuild it using the checkout events sent by Littledata in a Funnel Exploration report.

Here's how to build a checkout funnel in Google Analytics 4.

1. Go to the Explore tab and start a new exploration. In the top left corner, under TECHNIQUE, select **Funnel exploration** and set a name for your report. You'll name this report **Checkout funnel:**

![](/files/RZzzwrI8j4bZUCIFuEtn)

2. Next, you will need to add the steps to your funnel. Go to the **STEPS** section and click the pencil icon to edit your funnel steps:

![](/files/1O92hQfrB9hvSzfddARF)

3. Next, you will add the steps starting with **Contact Information.** Name your step, then search for the **begin\_checkout** event:

![](/files/xrQDe5b3XYhEWBuEU7mm)

4. Click on **Add step** and repeat the process with the **add\_shipping\_info** event:

![](/files/VqdC06C0Qjf7og3hDpVT)

5. Repeat the same process and select the **add\_payment\_info** event for the Payment step:

![](/files/44qzSjNxFvYXgrwerJ0D)

6. Lastly, add your purchase step; search for **purchase** and select the event:

![](/files/hJhp7UbtXUBoQYeP4wor)

7. You now have a complete checkout funnel that showcases data collected during the checkout and the drop from each checkout step:

![](/files/3AGKvZrB9qKJYabTuwDK)


# Create a Data Stream in GA4

Google Analytics 4 allows you to add Data Streams to a Google Analytics property.

### Create a new Data Stream

Follow the steps below to create a new **web Data Stream** and get a Measurement ID.

1. In your Google Analytics account go to Admin > Data collection and modification > Data Streams\*\*,\*\* click **Add stream** and select **Web**: ![](/files/O2P9QhWvOr5wzHySojzI)
2. Enter your website's URL and your desired stream name. Then, click **Create stream.** ![](/files/uwhVPoAVQWIBGvLuIdvD)

{% hint style="success" %}
Turn on the Enhanced Measurement settings
{% endhint %}

3. You can click on the new **Data Stream** to see your Data Stream details: ![](/files/PfJIGkMbnMDM0oMOdDxz)
4. Click on the copy icon next to Measurement ID and paste this into Littledata's app to start tracking - all done!


# Create a Measurement Protocol API secret in GA4

Create a Measurement Protocol API secret in GA4 for server-side tracking

To enable Littledata to add server-side events to your Data Stream via the Measurement Protocol API, you need to create a new **Measurement Protocol API secret** for your Data Stream:

{% stepper %}
{% step %}
**Open your Data Stream**

Go to your Google Analytics Admin > Data collection and modification > Data Streams, and **open your chosen stream**:

![](/files/2Js7RGwBKFpQMl2k1wJk)
{% endstep %}

{% step %}
**Create a new API secret**

Scroll down to the **Events** tab and click **Measurement Protocol API secrets**. Then click **Create**:

![](/files/EInTHCsYzQl4uzMNyCee)

![](/files/YhCiR1RNEudkdo3vaZUO)
{% endstep %}

{% step %}
**Name the secret**

Create a nickname for your new API secret. We recommend naming it **Littledata**. Then click **Create**:

![](https://res.cloudinary.com/littledata/w_760,h_380,c_fit/littledata-blog-images/2020/11/Screenshot-2020-11-18-at-13.12.48.png)
{% endstep %}

{% step %}
**Copy the secret value**

Copy the **Secret value** provided.

*This value is confidential and should only be shared with Littledata.*

![](https://res.cloudinary.com/littledata/w_834,h_164,c_fit/littledata-blog-images/2020/11/Screenshot-2020-11-18-at-13.16.55.png)
{% endstep %}

{% step %}
**Done**

All done!
{% endstep %}
{% endstepper %}


# How to create and use the custom dimension for Affiliation in GA4

{% embed url="<https://www.youtube.com/watch?v=fV530aNb1Mg&list=PLzjBsQdVKYbsjYJN8Mz_SqJj-8utjPoR6&index=17>" %}

Creating Google Analytics 4 custom dimensions and metrics allows you to easily access and use your event properties and user properties.

For example, without creating a custom dimension for your custom `affiliation` event parameter, you won't be able to see the parameter values in reports or use them on explorations, segments and so on.

By adding ‘affiliation’ as a custom dimension, you’ll be able to analyze subscription data and answer specific questions to your business’s needs.

{% hint style="success" %}
Littledata applies automatically [a set of custom dimensions](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4#custom-parameters) during installation, including Affiliation.
{% endhint %}

## How to create a custom dimension for Affiliation in GA4

To create a custom dimension in Google Analytics 4 please follow the steps below:

* Click on the Admin cog on the bottom left-hand corner in Google Analytics.

![](/files/gfbpthSV7tYHRD2OVNhn)

* Click on *Custom Definitions* under Data display.

![](/files/friQ6iKI0ptNUUIovEtU)

* Click on *Create Custom Dimensions.*

![](/files/DA3gzi15XB9k3wE60hbN)

* Add in *Affiliation* as the dimension name.

![](/files/P3hLBIZzkp7WEhyIVEfi)

* Add in Affiliation as the description.

![](/files/llUHSMhLJgZCoOoPScSO)

* Add in Affiliation as the event parameter.

![](/files/CboqhF5nw0g9koEnbTgM)

* Click on *Save.*

![](/files/1WJcLZqjpXmWedHdsk14)

You will be able to use the custom dimension within 24 hours after its creation.

## How to use the custom dimension for Affiliation

You can use this custom dimension and apply it to the built-in GA4 reports or create filters and segments on explorations.

**Existing GA4 reports**

If you are using a subscription app, you will be able to look at reports like Traffic Acquisition and exclude recurring or offline orders, by applying a filter based on the affiliation custom dimension. You'll want to exclude recurring orders/rebills as they will be unattributed due to GA4's session-based architecture.

![](/files/mu3Bs1h94ZsWckueb5dq)

**Explorations**

By creating an exploration similar to the[ Sales performance](/google-analytics/conversions/how-to-build-a-sales-performance-report-in-ga4) one, you will be able to create a filter based on affiliation and include or exclude any type of orders coming into GA4.

{% hint style="success" %}
Learn [how to build a Sales Performance report in GA4.](/google-analytics/conversions/how-to-build-a-sales-performance-report-in-ga4)
{% endhint %}

Here is an example of a Sales performance exploration that has recurring orders excluded by a filter based on affiliation:

![](/files/3dMoW7Rakj2uKgmTebqN)

Additionally, you can also [create segments for subscription analysis in GA4](https://blog.littledata.io/2023/03/15/how-to-create-segments-for-subscription-orders-in-google-analytics-4) by using the custom dimension for affiliation.


# FAQ: Shopify to Google Analytics

Frequently asked questions about Littledata's Shopify to Google Analytics connection for Shopify and Shopify Plus stores

Littedata's [Shopify to Google Analytics connection](/integrations/shopify-to-google-analytics) is an advanced Google Analytics integration for tracking ecommerce events, including marketing channels and sales data. Here are Frequently Asked Questions about the connection.

<details>

<summary>Is the connection available in the Shopify app store?</summary>

Yes, you can install Littledata's Shopify to Google Analytics connection directly from the [Shopify app store](https://apps.shopify.com/littledata).

</details>

<details>

<summary>What do I get with the connection?</summary>

* Accurate marketing attribution, so you're not left with large amounts of mysteriously "Direct" traffic
* Revenue in Google Analytics that matches Shopify, including refunds and cancellations
* Meaningful [checkout funnels](/integrations/shopify-to-google-analytics/checkout-funnel-steps), including subscription and upsell tracking
* [Custom dimensions](/google-analytics/conversions/customer-lifetime-value-google-analytics) to calculate customer lifetime value and build custom audiences for retargeting
* Full control over your event data with the [Event Editor](/event-editor/overview), and the ability to include or exclude specific order and sales channels
* [Profit Signal](/sources/profit-signal/how-to-use-profit-signal), to send margin instead of revenue to your ad platforms

See the [connection overview](/integrations/shopify-to-google-analytics) for more details.

</details>

<details>

<summary>How is this different from Shopify's default tracking?</summary>

Shopify's own Google & YouTube app now sends a fairly complete set of ecommerce events, but it's a fixed pipe: the events, parameters and attribution logic are whatever Shopify decides they are. Littledata uses a combination of client-side and server-side tracking to capture the full shopper journey, and layers on what the native app can't do at all: accurate attribution, refunds and subscription tracking, custom dimensions, and control over that data through the [Event Editor](/event-editor/overview) — filtering, deriving, enriching or remapping any event, and including or excluding specific order channels. See the [full comparison](/integrations/shopify-to-google-analytics#connection-details) for details.

</details>

<details>

<summary>Do I need to disable Shopify's default Google Analytics tracking?</summary>

Yes. During the install flow, you will be prompted to disable Shopify's native Google Analytics tracking setup. This is an important step to ensure that you don't have double tracking in Google Analytics, and that Littledata's tracking works correctly. Disabling the default tracking will not mess with your historic data, only help to improve your tracking going forward. [See how to disable Shopify's default GA tracking](/integrations/shopify-to-google-analytics/fix-duplicate-tracking-ga4).

</details>

<details>

<summary>Can I set up cross-domain tracking for my Shopify store?</summary>

Yes. Follow [this guide](https://support.google.com/analytics/answer/10071811?hl=en).

</details>

<details>

<summary>Do you support multi-currency?</summary>

Yes. If you are selling in multiple currencies with different Shopify stores, Littledata's Shopify to Google Analytics connection makes it easy to track this and convert sales into your shop currency. This also works with [Shopify Markets](/sources/shopify/multi-currency-support-for-shopify): every event carries the Shopify Market handle and ID by default, so you can filter and segment reports by market without any extra setup. Read more about [multi-currency tracking.](/sources/shopify/multi-currency-support-for-shopify)

</details>

<details>

<summary>Do you support headless Shopify setups?</summary>

Yes, Littledata provides accurate sales and marketing data for [headless ecommerce](https://www.littledata.io/headless-shopify). This requires manual setup steps. Follow this guide to setting up Littledata for [headless Shopify tracking](/sources/shopify/headless-shopify/working-with-a-headless-shopify-setup).

</details>

<details>

<summary>Does the connection work with GTM?</summary>

Littledata’s tracking script for Shopify stores adds detailed events which you can use to build funnels or trigger other marketing tags in Google Tag Manager (GTM). You can use Littledata to [replace GTM](/integrations/shopify-to-google-analytics/google-tag-manager-faq), or use Littledata with GTM. Our script uses the naming conventions set by Google for gtag. Here is an overview of Littledata's [GTM and Google Analytics data layer](/advanced/developer/gtm-and-google-analytics-data-layer-for-shopify).

</details>

<details>

<summary>Do you track by Product ID or SKU?</summary>

Shopify has a unique way of tagging and organizing [products and variants](https://help.shopify.com/en/manual/products). Littledata enables tracking by SKU, ID and variant in Google Analytics. Learn more about [how Littledata handles SKUs, Shopify product IDs and product variants](/advanced/developer/data-pipeline-settings).

</details>

<details>

<summary>How does the connection fix marketing attribution?</summary>

Google Analytics loses the link between a customer choosing a product, checkout, and payment. Littledata fixes this by linking together the session that the customer had browsing products on your Shopify store with the actual checkout steps and payment. Learn more about [marketing attribution](/integrations/shopify-to-google-analytics).

</details>

<details>

<summary>Who uses Littledata?</summary>

Hundreds of top Shopify merchants around the world use Littledata's smart connections to increase sales and improve ROAS. Read some of our reviews in the Shopify app store, browse our [case studies](https://www.littledata.io/case-studies), or feel free to contact us for references on [Plus plans](https://www.littledata.io/plus).

</details>

<details>

<summary>Can I get this data into my data warehouse?</summary>

If you want raw, row-level data on your customers in a data warehouse you should [export data to BigQuery](/google-analytics/setup/ga4-to-bigquery), or our [Segment connection](/integrations/shopify-to-segment).

</details>

<details>

<summary>Can you help track Amazon referrals?</summary>

Yes! Orders from Amazon are now displayed in GA reports as coming from "amazon.com/referral" instead of "direct". This eliminates confusion about an increase in direct traffic share (% of transactions coming from direct) without any increase in direct traffic volume.

</details>

<details>

<summary>Will I lose any data?</summary>

No. The moment you complete this connection, Littledata will add client-side and server-side tracking to your store. You will not lose any data, and you will continue to have access to all of your data in Google Analytics, even if you ever choose to uninstall Littledata

</details>

<details>

<summary>Where can I find the Conversions reports in GA4?</summary>

While the ecommerce reports interface isn't quite the same in GA4, you can get similar insights from the [Monetization](https://support.google.com/analytics/answer/9786881) reports.

At the same time, you can [build your own](/google-analytics/conversions/how-to-build-a-sales-performance-report-in-ga4) reports using the Explorations feature.

</details>

<details>

<summary>How do custom dimensions work in GA4?</summary>

GA4 allows you to create your own custom dimensions which can be either event-scoped or user-scoped (item-scoped dimensions are coming soon).

Currently, custom metrics must always be event-scoped.

There is a limit of 50 event-scoped custom dimensions, 25 user-scoped custom dimensions and 50 custom metrics per property.

However, you can send an unlimited number of events or user properties - these cannot all be reported on in GA4 but [can be exported to BigQuery](/google-analytics/setup/ga4-to-bigquery).

</details>

<details>

<summary>Do event category, action, label, value still exist in GA4?</summary>

In GA4 we don't have a fixed structure of an event like in UA, so the category/action/label are no longer present.

In addition to properties that are sent automatically such as `page_title`, you can have any number of custom properties. While you could name them `event_category`, `event_label` etc., you can also name them any way you want.

</details>

<details>

<summary>How will GA4 work with Recharge?</summary>

Our GA4 connection provides end-to-end tracking for Recharge orders, including first-time subscriptions and ongoing subscriptions (recurring orders), as well as marketing attribution for subscription orders.

</details>

<details>

<summary>Does Littledata track subscriptions in the Shopify checkout in GA4?</summary>

Yes! We now provide complete GA4 tracking for [subscriptions in the Shopify checkout](/sources/shopify/tracking-subscription-orders-in-the-shopify-checkout), including Recharge, Smartrr, Skio, Ordergroove, Awtomic, Stay Ai and others.

</details>

<details>

<summary>Can I modify Littledata's events in GA4?</summary>

GA4 lets you modify or create events directly in its own interface (*Configure > Events*), but that only works on client-side events — you can't touch server-side events that way, and any changes live only in GA4, not in what's actually sent.

For full control, use Littledata's [Event Editor](/event-editor/overview) instead. It works on both client-side and server-side events, before they reach GA4, and lets you filter, derive, enrich or remap any event. See the [common setups](/event-editor/common-setups) for ready-made recipes, such as [excluding purchases from a specific market](/event-editor/common-setups/exclude-purchases-from-a-specific-market) or [tracking purchases from a specific collection](/event-editor/common-setups/track-purchases-from-a-specific-collection).

You can find a complete list of the server-side events sent by Littledata [in this article.](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4#server-side-events)

</details>

<details>

<summary>What is gtag.js?</summary>

The Google tag (gtag.js) is a single tag you can add to your website to use a variety of Google products and services. Instead of managing multiple tags for different Google product accounts, you can use the Google tag across your entire website and connect the tag to multiple destinations.

The Google tag uses the gtag.js JavaScript library to send data to Google Analytics. In addition to the Google tag, you can use Google Tag Manager to send data to Google Analytics.

</details>

<details>

<summary>Why the 'affiliation' custom parameter doesn't mirror Shopify order tags 100%?</summary>

Because the Subscription tags are applied **after** the order is created. Our order processing is delayed intentionally to wait on those tags to be applied, but sometimes the tags are applied too late, and we've already processed the order - hence some orders might have the tag in Shopify but not sent to GA4. This happens because Shopify restricts recurring apps from creating the order directly with their tags, so an update has to run after the order has been placed.

</details>

<details>

<summary>Does Littledata replace the need for gtag.js?</summary>

No, Littledata does not replace the need for gtag.js. Littledata's tracking script uses the gtag.js JavaScript library to send its client-side events such as page views, while it is also required to run other Google services such as Optimize or Tag Manager. So while Littledata does not replace the need for gtag.js, we *do* replace the need for Google Tag Manager (GTM) for many merchants. Read more about our [gtag data layer](/advanced/developer/gtm-and-google-analytics-data-layer-for-shopify) and [why Shopify is limiting GTM in the checkout](https://blog.littledata.io/2022/12/15/is-shopify-cutting-off-gtm-support) for Shopify Plus merchants.

Once Google Analytics 4 extends the capability of sending Device and Geolocation data points server-side, then Littledata's tracking script will be able to be independent from gtag.js.

</details>

<details>

<summary>How does thresholding work for GA4 reports?</summary>

[GA4 will not display](https://support.google.com/analytics/answer/9383630) certain events if the event count is low. In this case you can adjust the time period or create an Exploration report to see all the events and their count.

</details>

<details>

<summary>I've just installed Littledata but I don't see any data in GA4?</summary>

The data processing time in Google Analytics 4 is between 24-48 hours, so after installing Littledata, it will take a few days before you could start seeing data in GA4.

</details>


# How to fix duplicate tracking in GA4

During install, disable the Google Sales Channel in Shopify. If our audit finds more Google Analytics tracking still active, follow this guide to remove it.

Littledata's Shopify to Google Analytics 4 (GA4) connection automatically tracks user behavior including page views, shopping events, purchases and more. You do not need any further tags or scripts on your page for accurate data in Google Analytics.

### Check for duplicate pageviews

If you had any tracking prior to adding Littledata's connection it's important to check whether your Google Analytics still receives duplicate pageviews.

Apart from doubling pageview count, duplicate pageviews will skew other GA4 metrics including bounce rate, engagement, views-per-session, key event rates etc.

To determine whether your property receives duplicate pageviews you should debug your website GA4 connection: a) Install the debugger plugin on your browser - one of the most popular is [Google Analytics Debugger](https://chromewebstore.google.com/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna?hl=en\&pli=1) b) Go to Google Analytics Admin (Gear icon in bottom left corner) and open Debug View. It will be blank initially, because its not receiving any debug hits c) In a new tab of the same browser open your Shopify store, and turn on the debugger plugin by clicking on the plugin icon

![how to turn on ga4 debugger](/files/1lW8523JsF4MFjqzt3Nu)

When the page loads, if you see 2 pageviews with no time interval in between, just like on the screenshot below, it's proof that your GA4 receives duplicate pageviews.

![duplicate pageviews in ga4 debugger](/files/OUCQSDy8bNFWEruhwpXJ)

Other signs that you are receiving duplicate pageviews can be increased Views-per-session or a very low bounce rate (less than 20%). However, it's always advised to confirm such doubts by debugging using this procedure.

Additonally, you can also check for double pageviews using the [Tag Assistant:](https://tagassistant.google.com/)

![tag-assistant-debugging](/files/VrNvIngkDFQTdojzTcHc)

### Sources of duplicate tracking

To solve the problem of duplicate pageviews, you need to disable any other way of GA4 tracking on your website. These are the most common ways that legacy GA4 installation lingers on:

1. Google & YouTube Sales Channel in Shopify
2. GA4 tag in Google Tag Manager
3. gtag code directly in your store theme
4. Custom web pixel
5. Third party apps

### Disable Shopify's native GA4 tracking

During Littledata's installation process, you will be prompted to disable Shopify's Google Analytics tracker from the Google Sales Channel.

If our audit detects that the original Shopify tracking is still active, follow these steps to remove it.

1. Go to your Shopify store admin and **Sales Channels > Google & YouTube.**

   ![Shopify sales channel](/files/0AqIqJnYVOZZhx5VVMZE)
2. Click **Disconnect** next to the 'Google Analytics' property.

   ![Disconnect duplicate tracking](/files/2UAgphTxW1KvKTJyLWtc)

If you don’t disconnect the Google Analytics 4 property from the Google Channel it will trigger [double pageviews and ecommerce events in GA4](https://blog.littledata.io/2019/05/27/is-google-analytics-accurate).

### Disable tags in Google Tag Manager (GTM)

If you use GTM you should check whether you have an active GA4 configuration tag and pause it.

![pause ga4 configuration tag in gtm](/files/ummj1ZdGdbbGd4R2AN0B)

Even if the GA4 Measurement ID does not match the one that Littledata is connected to, it could be a [different data stream](https://support.google.com/analytics/answer/12270356) feeding into the same web property.

For a more detailed instruction, make sure to check our guide on [how to disable pageviews in GTM](/advanced/troubleshooting/how-to-disable-pageviews-in-gtm).

### Gtag code directly in your store theme

Google's gtag script might have been added directly to the Shopify `theme.liquid` file.

For this particular scenario you need to check with your developer, this tutorial won't go into detail due to technical complexity.

### Custom web pixel

Shopify allows you to add a 'web pixel' to your storefront, and this might include the gtag tracking - similar to above.

Here's how to [remove custom web pixels](https://help.shopify.com/en/manual/promoting-marketing/pixels/custom-pixels/manage#disconnect-custom-pixel)

### Third Party Apps

There are quite a few Shopify Store Apps which could be sending data to your Google Analytics 4 properties, our recommendation is to always keep an eye out for apps which have the following keywords in the name: "Tracking", "GA4/Google Analytics 4", "Revenue" etc.


# Google Tag Manager FAQ

Learn how Littledata works with ecommerce merchants to implement Google Tag Manager custom tracking and reporting.

Many ecommerce sites use [Google Tag Manager](https://marketingplatform.google.com/about/tag-manager) (GTM) for custom tracking and dynamic remarketing. GTM lets you manage all your website tags without editing code, though it isn't as simple as it sounds.

Littledata works with online merchants using GTM to implement custom tracking and reporting. Here are some of the common questions we receive about GTM.

## Does Littledata work with GTM?

Yes, many of our customers, whether they are sending data to [Google Analytics](/integrations/shopify-to-google-analytics) or [Segment](/integrations/shopify-to-segment), use GTM alongside Littledata to trigger custom events or send data to non-core marketing platforms.

## Can I reuse events sent by Littledata with other tags in GTM?

Yes. For every client-side event Littledata triggers, we also push an event to the [GTM data layer](/advanced/developer/gtm-and-google-analytics-data-layer-for-shopify).

Unfortunately, you can't access [server-side events](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4#server-side-events) (e.g. checkout steps) in client-side GTM.

## Will Littledata's app conflict with my GTM setup?

In short: don't worry. Our code won't conflict with your GTM tracking, and it actually makes it easier to maintain useful GTM containers with a [GTM data layer](/advanced/developer/gtm-and-google-analytics-data-layer-for-shopify).

Selecting the Google Analytics destination in script [adds the gtag library](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4#client-side-events) and triggers pageviews and standard ecommerce events. Any custom GA events you trigger on top of this, using GTM, will be sent to that same GA property.

That said, for many merchants, Littledata's [Google Analytics app for Shopify](https://apps.shopify.com/littledata) actually replaces the need for GTM tracking.

## Should I use GTM? What are the benefits?

There are many benefits to using GTM, especially when it comes to sending data to other marketing platforms. Here are some top benefits:

* It’s a free tool that allows marketers to add and update website tags
* Allows you to add snippets of code to your website without deploying theme changes
* Easy to use interface
* GTM can send data only to other marketing platforms - Bing, Pinterest, Instagram, Twitter, and many others
* GTM allows you to test and preview each implementation and update that you make

## Can you help with GTM setup for my ecommerce site?

With Littledata's [Plus plans](https://www.littledata.io/plus) we can provide advice on where your tagging plan overlaps with Littledata's out-the-box tracking, and where you might need to track extra events via GTM will ease the creation of custom reports in Google Analytics.


# How to uninstall the Littledata app

Learn how to uninstall the Littledata app. Before you uninstall, reach out to our customer support team for possible solutions.

We are sorry to hear about your decision to uninstall Littledata!

In this article we'll show you how to uninstall the Littledata app, we'd greatly appreciate it if you could also fill in this [short uninstall survey](https://littledata.typeform.com/to/LXFiWd).

1. Go to **Shopify Admin -> Apps -> Littledata - The Data Layer**
2. At the top-right corner of your screen, click on the three dots and hit **Uninstall.**

<figure><img src="/files/lRj2LsNLMECaCiCYcFQZ" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
Uninstalling the app this will disconnect ALL destinations connected via Littledata. Once you hit the uninstall button, Littledata will stop tracking data for all destinations.&#x20;
{% endhint %}

{% hint style="info" %}
If you want to disconnect a single connection, click the three dots next to the destination and click **Disconnect** instead. Reach out to <help@littledata.io> for assistance.&#x20;
{% endhint %}

#### Here's what you're losing while using the Shopify Google Sales Channel

[This](/integrations/shopify-to-google-analytics#connection-details) is a comparison how the data will be tracked now that to you are moving to the Shopify Google Sales Channel.


# Source/Medium customization

Littledata enables you to set a **source and medium** to customize how orders get attributed in Google Analytics, based on a set of rules.

You can create custom rules based on:

* **Order sales channel**
* **Order payment gateway**
* **Order tags**

{% hint style="info" %}
If Source / Medium customization is set up, it will override any other attribution for that order session.
{% endhint %}

#### How to use source / medium customization

All the session enrichment settings are located in the **Session enrichment** tab, in the Google Analytics 4 connection settings.

Navigate to the **Session enrichment**, add a rule, fill in the necessary information, and save.

![](/files/pr2MXTQpQH8E5MtTvpzZ)

{% hint style="success" %}
**Custom conditions**

If you wish to add custom channels, tags, or gateways, there will be instructions provided on how to do it once you click `Create custom channel / Create custom gateway`.
{% endhint %}

#### Sales channel

If you want to add a rule for a sales channel/app, you can pick from a list of the most popular sales channels.

Click **Add Custom Value** if you can't find the desired channel in the list, and you can enter an App ID.

For example, if you're using **Recharge** to manage recurring orders, you can set the source/medium `recharge / recurring` for all orders Recharge generates. Littledata would already have tracked recurring purchases, but previously `source` would be Not Set if the subscription was set up before Littledata was installed.

Below is a list of the most popular sales channels and Littledata's recommendations for a custom source/medium:

| Sales Channel / App           | Source (custom)  | Medium (custom)              |
| ----------------------------- | ---------------- | ---------------------------- |
| Shopify Draft                 | shopify          | draft                        |
| Recharge Subscriptions        | recharge         | recurring (or) subscriptions |
| Loop Returns and Exchanges    | loop             | returns                      |
| Tapcart                       | tapcart          | app                          |
| Zapier                        | zapier           | workflow                     |
| Refersion Affiliate marketing | refersion        | affiliates                   |
| Appstle Subscriptions         | appstle          | recurring                    |
| Facebook & Instagram          | facebook         | app                          |
| Google Shopping               | google\_shopping | app                          |
| Shop App                      | shopify          | shop\_app                    |
| TikTok                        | tiktok           | app                          |
| Gorgias                       | gorgias          | app                          |
| Matrixify                     | matrixify        | import (or) app              |
| Skio Subscriptions            | skio             | recurring (or) subscriptions |
| Loop Subscriptions            | loop             | recurring (or) subscriptions |
| Ordergroove Subscriptions     | ordergroove      | recurring (or) subscriptions |
| Bold Subscriptions            | bold             | recurring (or) subscriptions |
| Yotpo Subscriptions           | yotpo            | recurring (or) subscriptions |
| Smartrr                       | smartrr          | recurring (or) subscriptions |
| Seal Subscriptions            | seal             | recurring (or) subscriptions |
| Releasit COD Form & Upsells   | releasit         | app (or) form/upsell         |
| SB Simple Bundles & Kits      | simple           | app\_bundle                  |

{% hint style="info" %}
Some of these sources might still fall under the Unassigned default channel. However, adding custom sources for these channels will allow you to have visibility on Source/Medium data that would have otherwise been (not set).
{% endhint %}

#### Order tag

If you want to customize source/medium based on a specific order tag, you can select Order Tag as your criteria.

For example, if you have a custom tag appended to your orders, you can group those orders under a single source/medium in Google Analytics by selecting Order Tag and adding your custom value.

#### Payment gateway

Littledata offers a few standard options for Payment Gateway: **stripe, paypal,** and **klarna.** If none of these is your prefered gateway, you can add a new one by clicking **add payment gateway.**

To find your preferred payment gateway name, navigate to your **Shopify admin**. Go to **Orders** -> **click on an order** that was made via your preferred gateway -> at the end of the **URL**, add `.json` . Your URL should look similar to this:

![add .json to order in shopify admin](/files/748SqmoZ6y39DjEdi8xs)

Then scroll down (or use the find tool from your browser) to search for the gateway. Copy the value from `payment_gateway_names` and paste it in the **Value for payment gateway** field in the Littledata app .

![](/files/wVBWirUG9T9Fh6TZealV)


# Using first-party data in GA4 for better attribution

This article explains how to enable tracking for hashed first-party data in Google Analytics 4.

Google's [user-provided data collection](https://support.google.com/analytics/answer/14077171?hl=en) enables your Google Analytics property to receive and process hashed first-party customer data.

{% hint style="info" %}
This feature is part of an open beta - it is subject to change, and may have no immediate effect on attribution.
{% endhint %}

This brings benefits similar to **Enhanced Conversions** for Google Ads:

* Better user identification using consenting **Google signed-in users'** data
* **Cross-device attribution** - e.g. user visited on Android phone and then purchased using Chrome (logged in)
* Less reliance on cookies - bypassing 7 day GA cookie limit set by Safari / iOS
* **Demographic / interest** reporting based on first-party data

### How to track first-party data in GA4

There are 2 steps to track first-party data in Google Analytics 4.

1. Open the Littledata app and go to the **Google Analytics 4 destination settings**.\
   Under the **Data customization** tab, turn on **Send user data**.

   ![](/files/IELHYmokdMrGcLdo5MfJ)
2. In your GA4 property, open **Data collection** and enable **User-provided data collection**.

   ![](/files/VdTllRH0VhlJZTGOOKKC)

After you complete these steps, Littledata will start sending hashed first-party data to your GA4 property.\
\
The data is hashed using the **SHA-256** algorithm.

### How it works?

When you turn on the setting inside your Littledata account, conversion events sent to your Analytics property **will be enriched with hashed first-party data**.

If the user-provided data collection setting inside your Analytics property is not enabled, the **conversion will be processed** but the **first-party data and user\_id will not**.

{% hint style="success" %}
Turn off both the setting in Littledata and the setting in Google Analytics if you don't want to share customer data with Google.
{% endhint %}

This is an example of the data we send to Google Analytics:

```javascript
   "user_id":"7158222333381",
   "user_data":{
      "sha256_email_address":"53b61bf697983d0f07a1e4d6962d81a1b86ccf594d32e9bdfb6ad5e110d48b1c",
      "sha256_phone_number":"f029f7d3dd85b2b7e9b657792d168ab92c48c4363634c59187d5a2dd3279188f",
      "address":{
         "sha256_first_name":"1b99f3740501eaef26b5a0a3958b8fe9e81b822981a414d510b1e5b139348cdf",
         "sha256_last_name":"e75be31f77b4aae647f4e0b4233bb5cf3b67384434b76ed36f6ff723f79ef1ce",
         "sha256_street":"4249a5b864b0f3382e9d29c6fd98065fdea6a0ec263fa691842e7e52787aa3e6",
         "city":"3eef36f440a655f87ec46c3e7e4a61427d3c3549b53c33e34f65fa78ad9ee31d",
         "region":"124e0b7201b0388d7c07f43194b9645d162b77005b66fef7283c689a69ff7c56",
         "postal_code":"92c7d71b95dc6540fc58e891dbe649fe72ae5e93b5f42fd7fbdeefe6cef3e51d",
         "country":"884129b7691d98f541650f9974a034323677ebe4e1c3bd71ebf5d43cdf118acc"
      }
   }
```


# Tracking product list views and clicks

{% hint style="success" %}
Products tracked can be viewed in the [Ecommerce Purchases report in GA4](/google-analytics/conversions/shopify-to-google-analytics-4-beta#ecommerce-purchases)
{% endhint %}

Littledata tracks product list impressions on any Shopify storefront, using [Google](https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#product-impression) or [Segment's](https://segment.com/docs/connections/spec/ecommerce/v2/#product-list-viewed) standard product list event properties.

## Benefits of Littledata's product tracking

1. Products 'views' are tracked when the product is truly viewed by the user, as they scroll the page.
2. Product views can be tracked on any page, not just collection pages (PLP).
3. Product metadata such as category, brand and variant is sent with all events.

## What counts as a product list impression?

By default we only track product lists on the `collection` and `search` pages, but this can be altered (see below).

We define a product impression as the user viewing a link to a URL containing `/products/`, where the *parent* HTML element contains an image.

e.g. this product will track as an impression, because the anchor tag (`<a>`) shares the same parent with the `<img>` tag.

![product list example](https://res.cloudinary.com/littledata/w_1024,h_602,c_fit/littledata-blog-images/2021/04/product-list.png)

## When do the events trigger?

An impression is counted whenever 80% or more of the product is visible to the user. The list view tracking starts 500ms after the page has finished rendering, for performance reasons.

![](https://res.cloudinary.com/littledata/w_1024,h_433,c_fit/littledata-blog-images/2021/02/Screenshot-2021-02-15-at-10.52.10.png)

As the user scrolls down the page, we track any further products visible for at least 200ms after they stop scrolling. This 200ms delay is grounded in psychological studies: it takes the average human [at least 200ms to process an image](https://www.pubnub.com/blog/how-fast-is-realtime-human-perception-and-technology).

![](https://lh4.googleusercontent.com/Q3-TmTrAo2gyBJ5pSbM5PzRglvZaVmx7KMz39B2AL86rQIUfgUVPPVnWhU5TRBNgmndwhJlhu5bwaa_G-OhF_iZOWWvs-YLgR4xkTBrQvfqIFYHYJfDNMoZAFCdhKz-Gd2-Rb3ZW)

The `list_position` of the product view (and click) is the order in which the product links are listed on the whole page.

A click listener is then added to every product which is viewed - a product list click will only be tracked for a product which has previously been recorded as viewed, so the Click-Through Rate (CTR) is correct.

Littledata’s tracking script waits a maximum of 1 second for the image click tags to fire (or less if the network connection is fast) before redirecting to the product details page. If you have issues with this click tracking interfering with other event handles on your site you can disable product list clicks in the settings.

## Where can you analyze these events?

These events and conversion rates appear under the **Reports->Monetization->E-commerce purchases** report in Google Analytics.

![Product list performance GA](/files/sses6wVkR0jQGZc6RUOW)

You can change the primary dimension in the table header first column to view the list performance by product name, SKU, category, etc.

![Changing table dimension for product performance](/files/zfnT8tgXIJ3yOXhvWfRM)

## Modifying the product list tracking

All settings can be [updated in the app](/advanced/developer/data-pipeline-settings).

You can extend tracking to *any* page by setting **Product Lists On Any Page** on.

If you find non-product lists are also getting picked up you can restrict tracking using the **Product List Links Have Prices** setting to track only where the product link - or an adjacent link - contains the product price. Or use **Product List Links Have Images** to restrict tracking to where the `<img>` tag is contained within the link.

![Product list impression](https://res.cloudinary.com/littledata/w_1024,h_448,c_fit/littledata-blog-images/2021/03/Screenshot-2021-03-19-at-10.40.52.png)

![Not a product impression](https://res.cloudinary.com/littledata/w_1024,h_300,c_fit/littledata-blog-images/2021/03/Screenshot-2021-03-19-at-10.40.16.png)

i.e. Your theme would have to display both the product image and the product price for the impression to trigger.


# Tracking Shopify payment gateways in Google Analytics

Track payment gateways like Flow\.io, ShopPay, Paypal, and more, and link transactions back to marketing campaigns.

Littledata supports a large number of different payment gateways and payment solutions. Due to the [unique way we track orders](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4) on the Shopify server, our app will also **attribute sales by default** for any other payment gateway you use, including but not limited to Shopify Payments, PayPal, Klarna and Affirm (see below for a full list).

All of the payment gateways also have [multi-currency support](/sources/shopify/multi-currency-support-for-shopify), so payments in any global currency are converted to your store currency for analysis.

### How to see which payment gateway was used

{% hint style="info" %}
Payment gateway is not available for all orders, including draft orders and some subscription apps which do not pass this information on to Shopify
{% endhint %}

If you have activated Littledata's [Shopify to Google Analytics connection](/integrations/shopify-to-google-analytics), you can also segment all of your orders (and customer behavior before they purchased) by the payment gateway they used. Payment gateway is only set on checkout step 2, so you can analyze any customers who got that far. For this destination, the parameter is named `payment_gateway_ld.`

For our [Segment destination](/integrations/shopify-to-segment/how-it-works) the `payment_gateway_littledata` event property will be sent with checkout and order events.

Analyzing your Google Analytics data by payment method let's you take a deep into questions such as:

* Is a new payment solution allowing a higher proportion of customers in a particular country to buy?
* Are particular marketing channels leading to payments in installments with a payment method such as Klarna or Afterpay?
* Which payment methods see a higher checkout completion rate?

To do this analysis, you can use one of the [custom dimensions](/google-analytics/conversions/customer-lifetime-value-google-analytics) our app adds in Google Analytics. To segment by payment gateway, just add '**Payment Gateway**' as a [dimension](https://support.google.com/analytics/answer/6086074?hl=en) to any report in Google Analytics.

### Payment gateways tracked by Littledata

Here are the most popular payment gateways our stores use. All of these payment methods are tracked automatically, and any of the orders that run through these payment methods can be linked back to your marketing campaigns.

| **Payment method**          |
| --------------------------- |
| Adyen                       |
| Affirm                      |
| Afterpay                    |
| Amazon Marketplace          |
| Amazon Payments             |
| Authorize.net               |
| Bank transfer               |
| Bold Cashier                |
| Braintree                   |
| Cash on delivery            |
| Cashfree                    |
| Coinbase Commerce           |
| Credit / Debit Cards        |
| Cyber Source                |
| ePay                        |
| Facebook Marketplace        |
| Flow\.io\*                  |
| Gift card                   |
| GoPay                       |
| Iyzico                      |
| Klarna                      |
| Komuju                      |
| Laybuy                      |
| Mercado Pago                |
| Mobilepay                   |
| Mollie                      |
| Mondido Swish               |
| Ocean Payment               |
| Orbital                     |
| Pag Seguro                  |
| Pague no Boleto             |
| Partial.ly                  |
| Paybright                   |
| Payfast                     |
| Payflow                     |
| Payfort                     |
| Paygate                     |
| Payment Express             |
| PayPal                      |
| Peace Payments              |
| Quadpay                     |
| QuickPay                    |
| Razorpay                    |
| Sezzle                      |
| Shop Pay / Shopify Payments |
| SplitIt                     |
| Stripe                      |
| ZipPay                      |

\* When using Flow\.io (Flow Commerce), the order number in Google Analytics will differ from the order number in Shopify. This is because Flow\.io overwrites the order number after it is created.


# Using Google Consent Mode v2 with Shopify

This article explains how Littledata integrates with Google's Consent mode v2.

## What is Google Consent Mode v2?

Google Consent Mode v2 is the latest version of Google Consent mode, that allows web and app developers to limit data collection on user consent choices.

From March 2024, all advertisers wanting to run personalized Google Ads to users in Europe [must use Consent Mode v2](https://support.google.com/google-ads/answer/14505993?hl=en).

You can read more about [Consent Mode on Google](https://support.google.com/google-ads/answer/10000067?hl=en-GB).

## How does Littledata work with Google Consent Mode?

Littledata integrates automatically and seamlessly with Consent Mode v2 via Shopify Customer Privacy API. This includes Advanced Consent Mode, sending cookieless pings to Google servers even if the user does not accept consent, so Google can [better model and predict](https://support.google.com/analytics/answer/11161109?sjid=13651967392339077290-EU) your non-consenting traffic.

Most [Shopify cookie banners](/partner-recipes/cookie-consent-integrations/shopify-customer-consent-api) and some Consent Management Platforms (CMPs) support this Customer Privacy API.

{% hint style="info" %}
For Consent Mode to work you must have a cookie banner. You can set it up from your Shopify Admin by going to **Settings -> Customer Privacy -> Cookie Banner**, or use another banner app that is compliant with Shopify Customer Privacy API.
{% endhint %}

## Mapping of Shopify consent types to Google

Shopify’s Customer Privacy API supports four consent types.Google Consent Mode v2 tracks customer consent as four different properties, which switch their state depending on the preferences that the customer has chosen within the [Shopify cookie banner](/advanced/troubleshooting/consent-banner-design-ga4) or CMP:

| **Google Consent Mode Parameter** | **Shopify Consent Type** |
| --------------------------------- | ------------------------ |
| `ad_storage` = `granted`          | `marketing` = `yes`      |
| `ad_user_data` = `granted`        | `marketing` = `yes`      |
| `ad_personalization` = `granted`  | `marketing` = `yes`      |
| `analytics_storage` = `granted`   | `analytics` = `yes`      |

The first 3 parameters (those that pertain to advertising) will change their status when marketing consent is accepted or denied, while the last parameter will change based on analytics consent.

Depending on what the user has accepted or declined, a consent update could look like this:

![Consent Mode parameters](/files/fgpkgKDKMRYhQlYj36bw)

[Consent Mode v2](/advanced/developer/how-to-check-whether-google-consent-mode-v2-is-properly-working) adds 2 new parameters to the consent states, those being:`ad_user_data` and `ad_personalization`.

## Advanced Consent Mode and Modeling

Unlike Basic Consent Mode, which only allows data collection from users who explicitly grant consent, the Advanced Mode collects data from users who do not grant explicit consent, thus enabling a more comprehensive data collection process. To go more in-depth here's an article on [how to check if a website implements Google Consent Mode V2 properly](/advanced/developer/how-to-check-whether-google-consent-mode-v2-is-properly-working).

![Basic consent mode vs advanced consent mode](/files/vJWNsDE6iEFfTHL65er4)

When consent is denied, the Google Analytics library will still load and send events, but these will be sent as cookieless pings. This allows Google to collect and model data without relying on cookies, ensuring compliance with user consent choices while still enabling valuable insights through advanced data modeling.

This modeling includes Google Ads consent mode modeling, Google Ads online modeling, Google Analytics conversion modeling, and Google Analytics behavioral modeling.

![Modeled data in GA and Google Ads](/files/Yu08gSU1XaI6odzMOvQW)

With Advanced Consent Mode store owners can rest assured that their tracking efforts are in line with privacy standards while still being able to obtain valuable information about their users. This is a significant step forward in data tracking and privacy.


# Klaviyo

Littledata’s [Klayivo connection](https://www.littledata.io/shopify/klaviyo) powers better performing email and SMS flows for Shopify stores. The integration works automatically for any site on Shopify or Shopify Plus, and is the first privacy-compliant solution for building bigger audiences around browsing behavior and checkout steps.

![klaviyo abandoned cart shopify](/files/8KVvlhn7MgFueDTn8nGZ)

The Klaviyo destination for Shopify uses a combination of client-side and server-side tracking to better identify web visitors. Get higher performing abandoned cart flows in Klaviyo with Littledata's enhanced identity resolution, which links anonymous sessions with users who opted in to emails. DTC brands typically see a 40%+ uplift to their Klaviyo flows when using Littledata.

{% embed url="<https://www.youtube.com/watch?v=VvKMLIrFdMI>" %}

### Klaviyo integration benefits

* Larger audiences with server-side **Viewed Product**, **Added to Cart** and **Checkout Started** events
* Reuse the same email templates: backwards-compatible with Klaviyo template flows
* Target the whole cart contents rather than just the last item added to cart
* Split the flows based on cart value, number of items or product categories
* Able to exclude free gifts or certain SKUs from retargeting
* Reduce unsubscribe rate by increasing email personalization and relevance
* Enhanced customer identification, especially on iOS / Safari
* GDPR / CCPA compliant

### Feature comparison

| Feature                                    | Littledata integration | Klaviyo <> Shopify integration | Other solutions |
| ------------------------------------------ | ---------------------- | ------------------------------ | --------------- |
| GDPR/CCPA Compliant                        | ✅                      | ✅                              | ✖️              |
| Uses fully opted-in email lists            | ✅                      | ✅                              | ✖️              |
| Server-side Identity Resolution \*         | ✅                      | ✖️                             | ✖️              |
| Server-side Viewed Product event           | ✅                      | ✖️                             | ✖️              |
| Server-side Added to Cart event            | ✅                      | ✅                              | ✖️              |
| Added to Cart event includes cart contents | ✅                      | ✖️                             | ✖️              |
| More identified Checkout Started events    | ✅                      | ✖️                             | ✅               |

\* Klaviyo announced an 'ExtendedID' in October 2024, which we understand allows matching of a user based on non-Klaviyo cookies (Google, Meta, Shopify etc) to better identify customers across devices. This is different to Littledata’s PersistentID, which uses a server-side device graph to persist this ID beyond browser limitations.

### Improving abandoned cart flows

{% hint style="success" %}
Our [ROI Calculator sheet](https://docs.google.com/spreadsheets/d/1B0MsTzQZnJjVlDM0MevZECSubA_40Rhfxx0UnJrzIWA/copy) allows you to estimate the Return on Investment from Littledata, given performance of current Klaviyo flows.
{% endhint %}

Littledata triggers a **Added to Cart or a Checkout Started** event, directly from updates on Shopify's servers, every time we can identify a user on your email list who is adding to cart.

Littledata's **Added to Cart and Checkout Started** events are backwards compatible with either Klaviyo's [Added to Cart](https://help.klaviyo.com/hc/en-us/articles/115001396711) or [Checkout Started](https://help.klaviyo.com/hc/en-us/articles/115005080447) events. This means you don't need to remap any properties in your email templates.

For example, you can send an email template with all the products in the user's cart at the time of the event.

We also add a [checkout URL](/integrations/shopify-klaviyo/set-up-klaviyo-flows#using-checkout-urls) to direct users from abandoned carts directly to the checkout.

See [how to set up those flows in Klaviyo](/integrations/shopify-klaviyo/set-up-klaviyo-flows).

![How Littledata works with Klaviyo](/files/Jgou88mOJNL6z22VFo5j)

### Improving browse abandonment flows

Littledata's Klaviyo connection is the first privacy-compliant way to identity shoppers who are browsing your Shopify site but didn't add something to the shopping cart yet.

To do this, Littledata automatically tracks **Viewed Product** events server-side, enriched with customer and product data, and sends them back to Klaviyo for you. These events can then be used to improve "abandoned browse" flows -- those email and SMS flows sent to shoppers who browsed a product on your site but didn't start the checkout.

See [how the Klaviyo integration works](/integrations/shopify-klaviyo/how-it-works-shopify-to-klaviyo).

### Improving checkout abandonment flows

Leveraging Littledata’s advanced identity resolution, the `Checkout Started` event can be triggered server-side as soon as the checkout process begins, even before the customer enters their email.

This is in contrast to Klaviyo’s implementation, which requires the customer to provide their email during checkout for the event to be captured. As a result, Klaviyo's Checkout Started event will miss instances where a checkout is initiated but no email is entered, leading to a \~30% smaller checkout abandonment audience.

In addition, Littledata's `Checkout Started` event will enrich more Klaviyo profiles with shipping address - as shared via the customer's Shopify profile when they login with Shop Pay. This allows retargeting of abandoned checkouts via direct mail solutions which pulls addresses from Klaviyo audiences (e.g. [Paper Run](https://paperrun.com/)).

### Learn more

* [Connect Klaviyo with Littledata](/integrations/shopify-klaviyo/littledata-klaviyo-installation-guide)
* [How our Klaviyo integration works](/integrations/shopify-klaviyo/how-it-works-shopify-to-klaviyo)
* [How to retarget abandoned carts with Klaviyo](https://blog.littledata.io/2024/02/21/retarget-abandoned-carts-using-klaviyo/)
* [Browse vs cart abandonment](https://blog.littledata.io/2024/02/02/tackling-browse-and-cart-abandonment-with-klaviyo/)


# Shopify to Klaviyo installation guide

This article presents a quick install guide on how to connection your Shopify store to Klaviyo.

In this guide, we'll explain how to connect your Shopify store to the Klaviyo destination.

### Quick install guide

{% stepper %}
{% step %}
**Add the destination**

From the Littledata dashboard, click **Add destination**.

![](/files/XBN8On4yFnPOYxcRIb5O)
{% endstep %}

{% step %}
**Connect Klaviyo**

Find the Klaviyo destination and click **Connect**.

![](/files/ac9hkpEETfQLCoa1F59B)
{% endstep %}

{% step %}
**Authorize Klaviyo**

Click **Connect** to open Klaviyo.

![](/files/W5XsEKmUbBG7wjXaeXBm)

Select the account you want to connect, then click **Allow** on the permissions prompt.

![](/files/EszAjOmKpWJpvxvUvmRA)
{% endstep %}

{% step %}
**Verify the connection**

During setup, Klaviyo receives test events:

* to confirm the connection works correctly
* to make the events available as flow triggers

![](/files/rtK3wU6hxxs6hRyJfOwb)

{% hint style="info" %}
Test events won't affect your current campaigns.
{% endhint %}
{% endstep %}
{% endstepper %}

### Create new flows using Littledata triggers

To measure the connection properly, clone your existing flows and switch them to Littledata triggers.

{% stepper %}
{% step %}
**Open your flows**

Sign in to Klaviyo and go to **Flows**.

![](/files/fDVBTjWC6AxvB1XwHQ2a)
{% endstep %}

{% step %}
**Clone each flow with a Littledata trigger**

Start the flow cloning process.

When Klaviyo asks for a trigger, choose the matching trigger from the Littledata integration. It appears with the Littledata logo.

Then clone the flow.

![](/files/O0dd8a8SmIL1yulSk8yk)

{% hint style="info" %}
Repeat this process for each flow that should use Littledata triggers.
{% endhint %}
{% endstep %}

{% step %}
**Review and turn on the new flows**

After you clone the flows, disable the previous versions and turn on the new flows that use Littledata triggers.
{% endstep %}
{% endstepper %}

**Next step:** [Use the improved triggers in your Klaviyo flows](/integrations/shopify-klaviyo/set-up-klaviyo-flows)


# How it works: Shopify to Klaviyo

This articles describes how does Littledata's integration with Klaviyo works, what can you track and the event parameters.

![Shopify to Klaviyo](/files/408CURaNyaQVRECirt4j)

Littledata’s connection to **Klaviyo** gives brands more identifiable event data about customer behavior, with enhanced accuracy in tracking pre-purchase customer events.

In addition to syncing events with Klaviyo, Littledata automatically integrates with Shopify sites to capture customer touch-points, including sales, marketing, customer, and product performance data.

During the automatic [installation process](/integrations/shopify-klaviyo/littledata-klaviyo-installation-guide), Littledata adds a tracking script to all the store pages, along with [server-side tracking for Shopify](/get-started/how-server-side-tracking-works).

### What you can track

Here’s what you can track with Littledata’s **Klaviyo integration** for **Shopify**. All the events listed below are tracked by default. You can turn events off within the app settings.

#### Server-side events

| **Event name**                 | **Description**                                           |
| ------------------------------ | --------------------------------------------------------- |
| Added to Cart - Littledata     | When a user adds an item to the cart                      |
| Removed from Cart - Littledata | When a user removes an item from the cart                 |
| Viewed Product - Littledata    | When a user views a product                               |
| Checkout Started - Littledata  | When the user first enters the checkout page on a session |

### Respecting cookie consent

Littledata’s tracking is compatible with cookie consent (eg. [Shopify cookie banners](/partner-recipes/cookie-consent-integrations/shopify-customer-consent-api) or [OneTrust](/partner-recipes/cookie-consent-integrations/integrating-onetrust-shopify)), and so the solution is **GDPR compliant**.

Littledata **does not send events from their browser session to Klaviyo** until the user has opted into tracking.

### Automated Klaviyo Segments

After you finish your setup, Littledata will automatically create 6 segments for you to use and see the benefits of our app.

Those 6 segments are called **Legacy** and **Combined** and contain the following events: **Viewed Product, Added To Card and Checkout started**.

![Littledata Segments in klaviyo](/files/O4EwAuBdIlFm8ps6kMSD)

**Legacy** segments contain Klaviyo events, while **Combined** segments contain Klaviyo and Littledata events, thus you can see how many more customers Littledata has tracked for you, on top of Klaviyo's basic tracking.

### Event properties

The cart events designed to be backwards compatible with **both** the standard Added to Cart and Checkout Started events from Shopify.

{% hint style="success" %}
Read the full event schema for Klaviyo [here](https://docs.google.com/spreadsheets/d/10FZppBqhdEFuAbvvkRq4Rh_2dBQ7xJc57d-hGLc1GJo/edit#gid=0).
{% endhint %}

One major improvement over the Klaviyo standard event schema is the including of the full contents of the cart (`Items`) with the Viewed Product, Added to Cart and Checkout Started event.

{% hint style="info" %}
All events are sent in presentment currency. This means that the value is adjusted accordingly, to the currency it was shown to the customer
{% endhint %}

| Items.Name                                                    | Product name                                                            | string    |
| ------------------------------------------------------------- | ----------------------------------------------------------------------- | --------- |
| Items.ProductID                                               | Product ID                                                              | string    |
| Items.Collections                                             | Categories of the product, selected from product types and collections. | string    |
| Items.ImageURL                                                | The URL of the product image                                            | string    |
| Items.URL                                                     | The current URL                                                         | string    |
| Items.ProductURL                                              | URL of the product                                                      | string    |
| Items.Brand                                                   | Product brand                                                           | string    |
| Items.FulfillmentService                                      | Type of fulifllment                                                     | string    |
| Items.TaxLines \*                                             | If the product has tax lines                                            | object    |
| Items.PresentmentTitle                                        | Title of the product in presentment language                            | string    |
| Items.PresentmentVariantTitle                                 | Title of the variant in presentment language                            | string    |
| Items.Price                                                   | Product price at the moment of the trigger.                             | string    |
| Items.ItemPrice                                               | Price of the Item                                                       | string    |
| Items.CompareAtPrice                                          | Original price of the product in case of a sale.                        | string    |
| Items.SKU                                                     | Product SKU                                                             | string    |
| Items.Quantity                                                | Product quantity                                                        | number    |
| Items.TotalDiscount                                           | Total amount of discount                                                | string    |
| Items.Discounts                                               | Array of all applied discounts                                          | array     |
| Items.Grams                                                   | Product weight in grams                                                 | number    |
| Items.Taxable                                                 | Product is taxable or not                                               | boolean   |
| Items.VariantTitle                                            | Product variant name                                                    | string    |
| Items.VariantID                                               | Product variant ID                                                      | string    |
| Items.Properties                                              | Array of custom properties set for the item                             | array     |
| Item Count \*                                                 | Number of products inside the cart                                      | string    |
| Discount Codes                                                | Discounts codes used                                                    | object    |
| Total Discounts \*                                            | Array of total discounts                                                | array     |
| Source Name \*                                                | Name of the source                                                      | string    |
| extra.token \*                                                | Shopify checkout token                                                  | string    |
| extra.webhook\_topic \*                                       | Type of webhook                                                         | string    |
| extra.responsive\_checkout\_url \*                            | URL of the checkout                                                     | string    |
| extra.referring\_site \*                                      | URL of the store                                                        | string    |
| extra.checkout\_url \*                                        | URL of the checkout                                                     | string    |
| extra.full\_landing\_site \*                                  | URL of the store                                                        | string    |
| extra.presentment\_currency \*                                | Currency code of the presentment currency                               | string    |
| extra.note\_attributes.name                                   | Name of note attribute                                                  | string    |
| extra.note\_attributes.value                                  | Value of note attribute                                                 | string    |
| extra.line\_items.fulfillment\_service \*                     | Type of fulfillment service                                             | string    |
| extra.line\_items.presentment\_title \*                       | Title of the item in presentment                                        | string    |
| extra.line\_items.presentment\_variant\_title \*              | Title of the variant in presentment                                     | string    |
| extra.line\_items.tax\_lines                                  | Types of tax for the product                                            | array     |
| extra.line\_items.compare\_at\_price \*                       | Original price of the product                                           | string    |
| extra.line\_items.applied\_discounts \*                       | Discounts applied for the product                                       | string    |
| extra.line\_items.key \*                                      | Shopify variant ID assigned to the product                              | string    |
| extra.line\_items.gift\_card \*                               | If a gift card was used for the product                                 | boolean   |
| extra.line\_items.grams                                       | Weight of the product                                                   | number    |
| extra.line\_items.origin\_location\_id \*                     | Id for the location of the POS device                                   | string    |
| extra.line\_items.destination\_location\_id \*                | Id for the destination of the order placed by the POS device            | string    |
| extra.line\_items.product\_id                                 | Shopify product ID assigned to the product                              | string    |
| extra.line\_items.quantity                                    | Quantity of the product                                                 | number    |
| extra.line\_items.sku                                         | Product SKU                                                             | string    |
| extra.line\_items.taxable                                     | If the product is taxable or not                                        | boolean   |
| extra.line\_items.title                                       | Title of the product                                                    | string    |
| extra.line\_items.user\_id                                    | The id of the user, if logged in                                        | number    |
| extra.line\_items.variant\_id                                 | Id of the variant                                                       | string    |
| extra.line\_items.variant\_title                              | Title of the variant                                                    | string    |
| extra.line\_items.variant\_price                              | Price of the variant                                                    | number    |
| extra.line\_items.vendor                                      | Brand of the variant                                                    | string    |
| extra.line\_items.line\_price                                 | Total value of products of the same kind (price x quantity)             | number    |
| extra.line\_items.price                                       | Price of the product                                                    | number    |
| extra.line\_items.properties \*                               | Custom properties of the product.                                       | array     |
| extra.line\_items.requires\_shipping                          | If the product requires shipping or not                                 | boolean   |
| extra.line\_items.rank \*                                     | Position of the image shown on the store                                | number    |
| extra.line\_items.unit\_price\_measurement.measured\_type\*   | Type of unit measurement                                                | string    |
| extra.line\_items.unit\_price\_measurement.quantity\_value\*  | Value of the unit measurement                                           | string    |
| extra.line\_items.unit\_price\_measurement.quantity\_unit\*   | Quantity of the unit measurement                                        | string    |
| extra.line\_items.unit\_price\_measurement.reference\_value\* | Base reference for the unit of measurement                              | string    |
| extra.line\_items.unit\_price\_measurement.reference\_unit\*  | Measurement unit                                                        | string    |
| extra.line\_items.product.id                                  | Shopify product ID assigned to the product                              | string    |
| extra.line\_items.product.title                               | Title of the product found in URL                                       | string    |
| extra.line\_items.product.handle                              | Name of the product used in URL                                         | string    |
| extra.line\_items.product.vendor                              | Brand of the product                                                    | string    |
| extra.line\_items.product.tags                                | Tags of the product                                                     | string    |
| extra.line\_items.product.body\_html                          | Raw HTML of the product description                                     | string    |
| extra.line\_items.product.product\_type                       | Type of the product                                                     | string    |
| extra.line\_items.product.properties \*                       | Properties of the product                                               | array     |
| extra.line\_items.product.images.id                           | Object containing images details                                        | object    |
| extra.line\_items.product.images.product\_id                  | Shopify ID of the image                                                 | string    |
| extra.line\_items.product.images.position                     | Position of the image shown on the store                                | number    |
| extra.line\_items.product.images.created\_at                  | Timestamp for the creation of the image                                 | timestamp |
| extra.line\_items.product.images.updated\_at                  | Timestamp for the latest update of the image                            | timestamp |
| extra.line\_items.product.images.alt                          | Used by visually imparied individuals to describe the image             | string    |
| extra.line\_items.product.images.width                        | Width of the image                                                      | string    |
| extra.line\_items.product.images.height                       | Height of the image                                                     | string    |
| extra.line\_items.product.images.src                          | URL of the picture                                                      | string    |
| extra.line\_items.product.images.variant\_ids                 | Shopify product ID assigned to the product                              | string    |
| extra.line\_items.product.images.admin\_graphql\_api\_id      | Identifier for GraphQL operations of the image                          | string    |
| extra.line\_items.product.images.thumb\_src                   | URL of the thumbnail of the product image                               | string    |
| extra.line\_items.product.variant.id                          | Id of the product variant                                               | object    |
| extra.line\_items.product.variant.sku                         | SKU assigned to the product variant                                     | string    |
| extra.line\_items.product.variant.title                       | Title assigned to the product variant                                   | string    |
| extra.line\_items.product.variant.options.Title               | Array of options for the product variant                                | array     |
| extra.line\_items.product.variant.images                      | Array of images for the product variant                                 | array     |
| extra.line\_items.product.variant\_options.Title              | Additional array of options for the product variant                     | array     |
| $value                                                        | Total value of the cart                                                 | number    |

Fields marked with \* are only present for Added to Cart - Littledata & Checkout Started - Littledata events.

### User identity from web sessions

Littledata can infer the identity of a visitor on your site with an **identity graph** that uses several cookie identifiers (from Google, Meta, Klaviyo and Shopify).

We have a complex logic on our servers that allows us to identify the user by many different identifiers, to make sure the identity resolution is as complete as possible.

### Comparison with Anonymous visitor activity backfill

[Klaviyo CDP](https://www.klaviyo.com/uk/customer-data-platform) includes a feature to [backfill anonymous visitor events](https://help.klaviyo.com/hc/en-us/articles/17928628922395) to a **Klaviyo profile after the user is identified in the browser**. In practice, it is only on the **Thank You page**, after the checkout is completed, that the backfill script can run.

## Custom parameters

The following parameters are included with every event sent to Klaviyo. Market parameters are also synced as customer profile attributes, so you can use them for segmentation and filtering within Klaviyo.

| Parameter        | Description                                                                                                           | Type   |
| ---------------- | --------------------------------------------------------------------------------------------------------------------- | ------ |
| market\_handle   | The handle of the Shopify Market for this event. Fixed as `unassigned\_market` for orders not attributed to a market. | string |
| market\_id       | The internal Shopify Market ID for this event. Fixed as `0` for orders not attributed to a market.                    | string |
| customer\_locale | The locale of the customer's storefront session, included for backward compatibility.                                 | string |

## Market parameters in Littledata events

All events sent to Klaviyo include the Shopify Market handle by default. This allows you to build market-specific flows and segments — for example, triggering different abandoned cart emails for customers in different Shopify markets, personalizing content based on the customer’s market (currency, language, or regional promotions), or suppressing flows for markets where you manage email separately. This requires Shopify Markets to be active on your store, but does not require any per-market destination configuration within Littledata.

There are a **few limitations** of this approach compared with Littledata’s integration:

* Requires opting into the **additional tracking via Klaviyo**
* Only works for **client-side events**
* Only backfills **Added to Cart** events if that event trigger is set up
* Relies on **browser's local storage** to queue up the anonymous visitor events, **which is wiped after 7 days in Safari / iOS**
* There are **many reasons** a script on the thank you page might not fire - see our post on [what goes wrong](https://blog.littledata.io/2021/04/08/for-every-100-orders-in-shopify-12-go-missing/)


# How to create a Klaviyo Private API Key

This guide presents steps on how to create a Klaviyo Private API Key

Littledata's integration with **Klaviyo** requires a private API key in order to send **server-side** data.

If you choose the **automatic installation route** in the **Klaviyo** connection flow, you don't need to follow this guide because we will **automatically** create one for you.

If you choose the **manual installation route**, you will need to **manually introduce** the **Klaviyo** private API Key in the connection flow.

Here is how you can manually generate the **Klaviyo** private API key for the **Littledata** connection:

1. Go to your **Klaviyo Account** settings.

![](/files/CSOnSlIIuop7sbmNij62)

2. Under **Account**, select, **API keys**.

![](/files/ocvILu8UxO5aFuOuuvh6)

3. In the **Private API Keys** section, click **Create Private API Key**.

![](/files/RDO1S7cHMiDGcVSsYgBR)

4. Name your **API Key** ***Littledata*** and select the **Grant applications full access to every API scope access level**.

![](/files/BqcbrzUmJgdQkYZMA4Kh)

5. Click **Create** and **copy the API Key**.

![](/files/ztHXsY0hrAFeKDacLwLL)

#### Learn more

* Learn how [Littledata’s Shopify to Klaiyvo connection works](/integrations/shopify-klaviyo)
* See our [quick installation guide](/integrations/shopify-klaviyo/littledata-klaviyo-installation-guide)


# Creating a Klaviyo custom report

To create a custom report in Klaviyo, you first need to have flows set-up. You can check our guide on how to do them [here.](/integrations/shopify-klaviyo/set-up-klaviyo-flows)

After you have established the flows, you can proceed to create a custom report in **Klaviyo**. This report will help you **assess the performance and revenue** contributions from each of your flows. Follow these steps to set it up:

1. **Accessing Custom Reports**: a. In your **Klaviyo admin panel**, navigate to the '**Custom Report**s' section.
2. **Initiating a New report**: a. Start building a new report by selecting the option to **create a custom report**.
3. **Configuring report settings**: a. Choose "**Flows Performance Report**" as your **Report Type**. b. Name the report as "**Revenue by Flow**" for easy identification.
4. **Setting the Conversion Metric**: a. Define your **conversion metric** by selecting "**Placed Order**", the add "**Value**" and choose "**SUM**" as the aggregation method.
5. **Grouping data**: a. Set the report to group data by "**Flow**" to analyze each flow individually.
6. **Specifying the timeframe**: a. Adjust the time frame to focus on the **last 30 days**, selecting "**Entire Range**" to capture all relevant data within this period.

   ![](/files/Z1zrRzZ3nxtMRSzOnfBV)


# Tracking Klaviyo SMS clicks

Littledata integrates with [Klaviyo SMS campaigns and automations](https://www.klaviyo.com/sms-marketing) to help merchants see what happens before and after SMS interactions, including interactions with other channels, orders, refunds and customer behavior.

Follow this setup guide to ensure that your SMS campaigns are tracked correctly by Littledata in Google Analytics.

{% hint style="success" %}
Using Klaviyo for email too? Make sure to follow our [Klaviyo email tracking guide](/integrations/shopify-klaviyo/track-klaviyo-campaigns-in-google-analytics)
{% endhint %}

### Setting up campaign tagging in Klaviyo

First let's look at how to set up your campaign tagging in Klaviyo so that Littledata can capture consistent data about Klaviyo campaigns.

When creating a new SMS campaign in Klaviyo there is a section for **Tracking**. You’ll need to switch on **Include tracking parameters** and **Customize tracking parameters**.

!\[Tracking SMS links in Klaviyo]\(<https://lh3.googleusercontent.com/LYP\\_5FM4NCKq9g3EVUf3YY\\_E-qFF\\_vCoeR1vjiNTIGH99qqyKaXA-\\_yyRuKyCbYrtxz3Elhuz9SZI-VDsfzVstnmHoDYvNj6PrVNmZ7mlanPTc2eJHaR4og0JngFN1aehM3FA93lNze0gdrCYC9oYB2jobQ4BP20Daw-khCihoZA9AEtDk7uSagUo7z4rw> 'Tracking SMS links in Klaviyo")

Confusingly, Klaviyo’s current default is to tag SMS campaigns with UTM medium as ‘**email**’. We recommend changing that to ‘**sms**’, which will show up in the **SMS channel grouping** in GA4.

Similar to our [email tracking guide](/integrations/shopify-klaviyo/track-klaviyo-campaigns-in-google-analytics) for Klaviyo campaigns, we recommend the following values for SMS tracking:

| **UTM Parameter** | **Campaign Value** |
| ----------------- | ------------------ |
| Source            | *Klaviyo*          |
| Medium            | *sms*              |
| Campaign          | *Campaign name*    |
| Id                | *Campaign id*      |
| Customer          | *External id*      |

![UTM tagging SMS links how it works](https://lh4.googleusercontent.com/q90BtBH8MP6l41byNYrMsMqGT4DFlTbr9tzw1uaqb_riWrjF-KzxcB4dSvqHHPW-Hn7Hnor0DdcS1msA3LUEtn1InQ4FkGI7Roqc7jpeYut014CbP4ynWl7TEh2aR4f3z2Ki43dbplfHzYExMONisGaLlKDxdinnOrPUvXc6fs5Wh9_oCicN8n13r9MuUQ)

### Interacting with an SMS link

When you finish setting up a Klaviyo SMS campaign you will see confirmation that you have enabled UTM parameters for tracking.

![SMS link tagging in Klaviyo](https://lh4.googleusercontent.com/I3GJXatxlspp8bgZxLxN3lrD-k2vofSthfKiMMCml7bXsx59o_jD8r1L7zBYumNTJsO__3J_9dUaIaxglZsxwCgoE1qQo-uEqTN5M6zQyZ4J9HxOlBx4LKPKrZcfvUygpGyD9APj2VufCc2VxYpDLYsvy4rtXHpbnJGLRoHGrRQ6IYz0-TBrloDQavGPhg)

And then when you test the email campaign, you’ll see the message links show up with shortened links on the `klv1.io` domain - which then redirects to the full link including UTM parameters.

![SMS preview editor in Klaviyo](https://lh5.googleusercontent.com/j6oRfZhmiFcVZqo0DVCQSsIeO-mLbAlTE-1rxnDEVPXHCtxcvuV47sVe_hkXVGTXuuJCVZDibDADYRzS5098NKArT5RrEpXIrc6a10nmWe1v8Yag0h5odNBA5zqJy0eTGa5kLalS0F8eHTBw_DoEanWFWMvGSkp6or5IX5X6GgltBAxt_3JSsolcjI_wJw)

### Tracking SMS clicks in Google Analytics 4 (GA4)

You can use the **Real-time overview** to check the landing page is showing up in GA4.

![Realtime SMS traffic in Google Analytics](https://lh3.googleusercontent.com/KVuX-DQ1yfBkJV452je16_KVFDcJYTwE1y66s9Rt2MXFjc6Gwrys2Rq4ouUlSth1N6MGHwS6HZW_io76jDDqTSFecm0WY721tfJxhpSveLKg_cZTEj0UpAVF1PQeXqzmgXd2PaBrwIeN3-K_KCBE8xmiLlkPI81jOoNGXeor9jn1z2a4osf5hNW01cM0qQ)

But to see that Google is correctly attributing traffic to the SMS channel you’ll need to wait an hour and check the **Traffic Acquisition** report (under Acquisition menu).

![Tracking SMS links in Google Analytics](https://lh5.googleusercontent.com/dn3lZTNTtvlmh0OIblydb5osW0mawlElFWep24ewJioV4PCI9I22NYiY61xxMLuasXHDU5TvGVa_mZalev0UHeebBfT87r_r-HEuW1fxNFbzbFejiSbrIyT3fKo_DcIDT84bg9P51qRKTTYUIrEzHx-3lyddFR0G55_oAsO2D1YSTs5BHIJsu8ReSKVO-A)

Finally, you can link these SMS clicks to the ecommerce behavior tracked by Littledata. You can do that by creating a comparison of how users who first visited from the SMS link buy:

![Building an SMS comparison](/files/vZVSIY98K4ADN2ynbzwm)

Further reading:

* Setting up [Klaviyo email campaign tagging](/integrations/shopify-klaviyo/track-klaviyo-campaigns-in-google-analytics)
* What you can track with Littledata's [Shopify source for Google Analytics](/integrations/shopify-to-google-analytics)
* Sending data to [Segment's Klaviyo destination](/integrations/shopify-to-segment/shopify-segment-klaviyo)


# Set up your Klaviyo flows using Littledata's triggers

How to set up your Klaivyo flow triggers to correctly use Littledata's server-side events and measure the impact over client-side events.

Congratulations! You've set up the Littledata Klaviyo integration. Before you can start enjoying the better performance benefits our enhanced identity resolution and server-side tracking brings, you will need to set up your Klaviyo flow triggers to use Littledata's events.

{% hint style="success" %}
Don't have the Littledata Klaviyo integration set up yet? Follow our [installation guide](/integrations/shopify-klaviyo/littledata-klaviyo-installation-guide) to do so.
{% endhint %}

## Littledata's events available for use as Klaviyo triggers

Littledata sends the following server-side events to Klaviyo which you can use as triggers for your Klaviyo flows. These are meant to be 1-to-1 replacements over Klaviyo's client-side triggers. Their schemas are compatible with Klaviyo's so you don't need to remap any dimensions in your flows to get the benefits from our server-side tracking.

| **Klaviyo event**  | **Matching Littledata event**                                      |
| ------------------ | ------------------------------------------------------------------ |
| `Viewed Product`   | `Viewed Product - Littledata`                                      |
| `Added to Cart`    | `Added to Cart - Littledata`                                       |
| -                  | `Removed from Cart - Littledata`                                   |
| `Checkout Started` | `Added to Cart - Littledata` OR `Checkout Started - Littledata` \* |

\* Klaviyo's flow templates use `Checkout Started` for abandoned **cart** flows. If you want a true abandoned cart flow we recommend using `Added to Cart - Littledata`.

If you are using custom triggers, reach out to our customer support team (<help@littledata.io>). They will help providing our full tracking schema which you can then consult to find and match the equivalent dimensions needed.

## Validating Littledata's performance by cloning your existing Klaviyo flows

You can validate Littledata's impact by running flows in parallel: your original flow (Klaviyo triggers) and a cloned flow using Littledata triggers.

Both flows run simultaneously, but the original flow takes priority:

* Profiles tracked by Klaviyo client-side will enter the original flow
* Profiles missed by Klaviyo but captured by Littledata server-side will enter the cloned flow

The emails and revenue generated by the Littledata flow represent incremental uplift — users who would not have been captured otherwise.

{% hint style="info" %}
This setup should be temporary. Running parallel flows adds complexity, especially with multiple splits. Once validated, **pause the original flow** and **remove the profile filters**.
{% endhint %}

{% hint style="info" %}
For all filters below, make sure that the metric you choose is **Klaviyo's default metric** and does not include the word "Littledata". This ensures the Littledata cloned flow only captures profiles that Klaviyo's client-side tracking missed.
{% endhint %}

### Browse Abandonment (Viewed Product - Littledata)

Find your Browse Abandonment flow based on the native **Viewed Product** event, click **Clone**, and in the clone window select **Viewed Product - Littledata** as the matching Littledata trigger. Rename the flow to distinguish it from the original, then click **Clone Flow**.

![](/files/abhJLjzIBGtgt154qZSQ)

![](/files/I9GjojoHgUFu4nl7HiUl)

In the cloned (Littledata) flow, add the following filters:

* The **Viewed Product** filter ensures a user doesn't pass through both browse abandonment flows simultaneously.
* The **Added to Cart**, **Checkout Started**, and **Placed Order** filters exclude users who have moved deeper into the purchase funnel — those users will be handled by the Cart or Checkout Abandonment flows, or have already converted.

### Cart Abandonment (Added to Cart - Littledata)

Find your Cart Abandonment flow based on the native **Added to Cart** event, click **Clone**, and in the clone window select **Added to Cart - Littledata** as the matching Littledata trigger.

{% embed url="<https://www.youtube.com/watch?v=VvKMLIrFdMI>" %}

Rename the flow to distinguish it from the original, then click **Clone Flow**.

![](/files/abhJLjzIBGtgt154qZSQ)

![](/files/L3WUdJGkRdDvy7EgGUWh)

In the cloned (Littledata) flow, add the following filters:

* The **Added to Cart** filter ensures a user doesn't pass through both cart abandonment flows simultaneously.
* The **Checkout Started** and **Placed Order** filters exclude users who have moved deeper into the purchase funnel — those users will be handled by the Checkout Abandonment flow, or have already converted.

{% hint style="info" %}
There is no need to filter out **Viewed Product** here — by the time a user reaches this flow, they have already passed the browse stage.
{% endhint %}

### Checkout Abandonment (Checkout Started - Littledata)

Find your Checkout Abandonment flow based on the native **Checkout Started** event, click **Clone**, and in the clone window select **Checkout Started - Littledata** as the matching Littledata trigger. Rename the flow to distinguish it from the original, then click **Clone Flow**.

![](/files/abhJLjzIBGtgt154qZSQ)

![](/files/k5fW4hvNu24FOcunAVml)

In the cloned (Littledata) flow, add the following filters:

| **Condition**                       | **Metric**           | **Frequency** | **Timeframe**            |
| ----------------------------------- | -------------------- | ------------- | ------------------------ |
| What someone has done (or not done) | **Checkout Started** | zero times    | in the last 1 hour       |
| What someone has done (or not done) | **Placed Order**     | zero times    | since starting this flow |

* The **Checkout Started** filter ensures a user doesn't pass through both checkout abandonment flows simultaneously.
* The **Placed Order** filter excludes users who have already completed a purchase.

{% hint style="info" %}
There is no need to filter out **Viewed Product** or **Added to Cart** here — by the time a user reaches this flow, they have already passed both of those stages.
{% endhint %}

Once you are satisfied with Littledata's performance, disable your original flows. You do not need to remove the filters you've set, but it is harmless to do so.

***

## Using Checkout URLs

Creating personalized checkout experiences for your abandoned cart email campaigns can enhance customer engagement and recovery rates. Littledata adds a `checkout_url` permalink for the Added to Cart event, so you can direct customers back to the checkout with ease. This uses a cart permalink, and should work even when users click through into a new browser — when Klaviyo's checkout URL will not work.

{% hint style="warning" %}
Any utm parameter appended to the link pointing straight to checkout will NOT be "seen" by GA4. Instead, all the server-side events that occur in such a session will be attributed to the previous available session source from the same user.
{% endhint %}

You can access the checkout URL in a Klaviyo email or SMS template by using:

`{{ event.extra.checkout_url }}`

You can also customize these checkout URLs to include specific payment options, discount codes — or direct the customer to the cart page instead of the checkout page.

To initiate a checkout powered by Shop Pay, append the `payment=shop_pay` URL parameter:

`{{ event.extra.checkout_url }}?payment=shop_pay`

So the checkout URL is dynamic, but the payment method is always the same. Or to include a discount code, add the `discount` URL parameter followed by the discount code. For a discount code `15off`, the URL would look like this:

`{{ event.extra.checkout_url }}?discount=15off`

Then you could combine them both like this:

`{{ event.extra.checkout_url }}?payment=shop_pay&discount=15off`

***

## Next steps

You can [set up a custom report](/integrations/shopify-klaviyo/creating-klaviyo-custom-reports) in Klaviyo. This is helpful in helping you assess the performance of your flows.


# Track Klaviyo email campaigns in Google Analytics

Littledata integrates with Shopify sites to capture every customer touchpoint, including sales, marketing, customer and product performance data. Our Klaviyo integration works in tandem with our [Google Analytics](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4) and [Segment](/integrations/shopify-to-segment/how-it-works) connections to provide complete data for action and analysis, including audience building, LTV analysis, multi-channel campaign analysis and comparative attribution reports.

Follow this setup guide to ensure that your Klaviyo email campaigns are tracked correctly by Littledata in Google Analytics.

{% hint style="success" %}
Using Klaviyo for SMS too? Make sure to follow our [Klaviyo SMS tracking guide](/integrations/shopify-klaviyo/klaviyo-sms-clicks)
{% endhint %}

### How Littledata works with Klaviyo

Using **Klaviyo with Google Analytics** will ensure that the store sees attribution of Klaviyo campaigns to sales and Customer Lifetime Value (LTV)

* Klaviyo adds UTM parameters to track the campaign source in Google Analytics
* Littledata sends shopping behavior events and orders into Google Analytics
* L﻿ittledata links everything together behind the scenes

{% hint style="success" %}
Using the [Klaviyo destination in Segment](/integrations/shopify-to-segment/shopify-segment-klaviyo), the events Littledata adds can be shared back with Klaviyo.
{% endhint %}

### Using Klaviyo with Google Analytics

Klaviyo works alongside Littledata's [Shopify to Google Analytics connection](/integrations/shopify-to-google-analytics), ***as long as email UTM parameters are set up correctly.***

For setup of Klaviyo **SMS campaigns** see our [SMS tracking guide](/integrations/shopify-klaviyo/klaviyo-sms-clicks).

#### How to set up UTM parameters

UTM parameters are extra data in the link that the user clicks to tell Google Analytics (and [Shopify](https://www.shopify.com/blog/marketing-attribution)) where the click came from. These parameters are automatically added by Google Ads, but for other platforms (e.g. [Facebook](https://blog.littledata.io/2017/02/08/6-reasons-facebook-ads-dont-match-the-data-you-see-in-google-analytics) or Klaviyo), you will need to add them manually or via the software.

#### Recommended settings

To provide the most reporting flexibility, we recommend having the same UTM parameters across all email flows and campaigns. You can set those up under the Account .. Settings .. UTM tracking menu.

![Enabling UTM tracking](/files/NESt3MA4sWUoIn6UmEns)

Klaviyo allows [dynamic variables](https://help.klaviyo.com/hc/en-us/articles/115005247808-Klaviyo-and-Google-Analytics-Tracking#about-klaviyo-s-utm-parameter-options3) to be used in your default UTM tracking settings. To get the most out of your Klaviyo reporting in GA, we recommend using **static values** for Medium, and **dynamic values** for Campaign, ID, Customer and Content. We *don't* recommending `flow` as the Medium, since this this does not map to a default channel in GA.

With static values for Medium (`email`), you will be able to see Klaviyo compared against other marketing channels in Google Analytics, and in particular, how Klaviyo campaigns contribute to [customer lifetime value](https://blog.littledata.io/2020/09/30/3-deep-dives-into-customer-lifetime-value-for-ecommerce-sites) and other key metrics for Shopify sales and marketing.

![Klaviyo UTM setup](/files/moTBhYtGziAgJJkV0Xde)

If you don't use Klaviyo for all the emails you send to your customers you might consider using static value of 'Klaviyo' for `source`, but since Klaviyo only allows you to add the dynamic ***List or Segment*** as a source we think that is most useful.

Here's the full tagging list:

| **UTM Parameter** | **Campaign Value**      | **Flow Value**          |
| ----------------- | ----------------------- | ----------------------- |
| Source            | *List or Segment name*  | *Flow name*             |
| Medium            | email                   | email                   |
| Source            | *Campaign name*         | *Flow message name*     |
| Id                | *Campaign id*           | *Flow id*               |
| Term              | *Link text or alt text* | *Link text or alt text* |
| Customer          | *External id*           | *External id*           |

{% hint style="success" %}
Many Littledata customers create [internal spreadsheets](https://docs.google.com/spreadsheets/d/1fzZ8YxwNwC1elYbzMhWZTurbwGHEzI1ILWXNvCxMMR4/template/preview) to manage UTM naming conventions as well as channel groupings for Google Analytics and run regular QA checks to ensure consistency.
{% endhint %}

#### Enabling UTM parameters

In addition to setting up the UTM Parameter values in your Klaviyo account, you need to **enable UTM tracking** to ensure that those parameters are applied to all emails in flows and campaigns.

![](/files/ZCPdItBVprY7tegLxzmJ)

* On the left side of the UTM parameters table, switch each one to **ON**
* When creating/editing a campaign, go to **Tracking** and make sure that **'Include tracking parameters'** is **ON** and **'Customize tracking parameters'** is **OFF**

#### Reporting on Klaviyo flows in Google Analytics

Google Analytics is a powerful reporting tool once you get to know how channel groupings and custom dimensions work. You can analyze your Klaviyo campaign conversions in Google Analytics, alongside other marketing channels with multi-channel attribution.

After you have enabled our recommended settings for UTM tags, you will have access to Klaviyo flow and campaign data in Google Analytics. To see revenue and orders attributed to these campaigns, drill into the `Email` channel and add `campaign` as a secondary dimension.

If you set up the Flow email name as the `utm_campaign` above, then you can look at the contribution of that whole flow to sales. For example, without caring if the user clicked on email 1 or 2 in a 4-email flow, did clicking on *any* of the emails in that flow -- for example, the 'Browse Abandonment' flow -- result in sales?

{% hint style="success" %}
Additionally, you can [create a segment](https://support.google.com/analytics/answer/3123951?hl=en) of users who came via an Instagram campaign, and see to what degree they were influenced by the email sequence.
{% endhint %}

#### Will Google Analytics match Klaviyo?

Klaviyo offers **cooperative last touch attribution**. This means that they give email and SMS their own configurable attribution window and attribute purchases to the last Klaviyo message a customer interacted with within the attribution window.

By default, Google Analytics uses the **last-click** attribution model. All credit is assigned to the last channel a user engaged with, and any previous interactions are ignored.

Klaviyo attribution is always more greedy - ignoring contributions from other paid ads or organic visits - so the conversions you'll see in Google Analytics will always be lower.

Under the **Advertising > Model Comparison** in Google Analytics, you can compare the default email attribution in GA with other attribution models more similar to Klaviyo's dashboard.

![](/files/tSg9yfEwIWmKsHcJ7GiN)

You can also look at the **Multi-Channel Funnels > Top Conversion Paths** report to see where Klaviyo fits into the user journey on your ecommerce site.

{% hint style="success" %}
Google Analytics data can also be [used as a source](https://www.littledata.io/shopify) for other reporting tools, such as Looker Studio and Tableau.
{% endhint %}

### Using Klaviyo with Segment

[Littledata's Shopify source for Segment](/integrations/shopify-to-segment/how-it-works) automatically sends a rich data set for use with a range of Segment destinations.

Littledata's [Segment connection](/integrations/shopify-to-segment) gets all of the post-click events into Segment, and it also sends any event associated with an email address onto Klaviyo as well - providing a richer set of events, without a developer, than Klaviyo's own [Shopify event tracking](https://help.klaviyo.com/hc/en-us/articles/115005080407-Integrate-with-Shopify#add-web-tracking-to-your-shopify-store3).

For example, you can retarget users in Segment who have purchased a certain value or got certain products to a stage of the checkout - all without writing a line of code.

And by connecting the [Klaviyo destination](https://segment.com/docs/connections/destinations/catalog/klaviyo) to [Littledata's Shopify source for Segment](/integrations/shopify-to-segment/how-it-works), email opens and clicks will also be gathered.

{% hint style="success" %}
Read more about [how Littledata's Segment connection works](/integrations/shopify-to-segment/how-it-works) and [Segment's Klaviyo source documentation](https://segment.com/docs/connections/sources/catalog/cloud-apps/klaviyo).
{% endhint %}

Email marketing platforms such as [Klaviyo](https://segment.com/docs/connections/destinations/catalog/klaviyo/#server-side-track), require an email property with any server-side event in order to associate events with a customer (they cannot use an `anonymousId`). Littledata adds that `email` property whenever an email address is set in the user `traits()` object (in device-mode) or from the Shopify customer record (in cloud-mode).

Klaviyo can only accept events linked to a user email, so other anonymous events need to be filtered out or ignored to avoid delivery errors.


# Pinterest

Littledata's Shopify to Pinterest connection enhances your Pinterest Ads tracking for better retargeting and audience building, ensuring consistent tracking across your tech stack.

Pinterest Tag lets you track customer behavior and actions on your website after a user has interacted with a Pinterest ad. Littledata's Pinterest connection enhances the tracking from the Pinterest Tag and helps you improve the performance, measurement and collection of your Pinterest campaigns by connecting to [Pinterest API for Conversions](https://help.pinterest.com/en-gb/business/article/the-pinterest-api-for-conversions).

## Benefits

* Enhance Pinterest Tag tracking with server-side events via Pinterest API for Conversions
* Improve retargeting and audience building with accurate conversion data
* Maintain consistent tracking even when client-side tracking is blocked by ad blockers, ITP or iOS restrictions
* Stitch collected data to specific Pinterest users for improved Enhanced Match quality


# How it works: Shopify to Pinterest

## What you can track

{% hint style="success" %}
You can check our [Pinterest tracking schema](https://docs.google.com/spreadsheets/d/1WaE-CVcUPQba_IFehB6T8IE6jY9N6oI9FTBuXLnwRxI/edit#gid=277331750) for a full view of events and parameters
{% endhint %}

Apart from the standard Pinterest events, Littledata enhances your data with the following client-side and server-side events by default:

### Client-side events

| **Event name** | **Description**                                                          |
| -------------- | ------------------------------------------------------------------------ |
| ViewCategory   | When an user lands on a product or collection page                       |
| AddToCart \*   | When the user adds a product to cart                                     |
| Checkout \*    | When the user places an order (excluding Point of Sale and Draft orders) |

\* Only for stores with [Littledata's custom pixel connected](/sources/shopify/littledata-pixel)

### Server-side events

| **Event name** | **Description**                                                          |
| -------------- | ------------------------------------------------------------------------ |
| AddToCart      | When the user adds a product to cart                                     |
| Checkout \*\*  | When the user places an order (excluding Point of Sale and Draft orders) |

\*\* Pinterest's Checkout event is the equivalent of a purchase event.

Note: These are all of the server-side events currently supported by Pinterest. Littledata plans to support additional ecommerce events as they are made available.

## Pinterest enhanced match

You need to [enable Enhanced Match](https://help.pinterest.com/en/business/article/enhanced-match) in Pinterest to get the most from Littledata's server-side events.

Littledata improves this matching quality by stitching collected data to a specific user on Pinterest. For this reason, you might see different values for enhanced match in your event history.

As seen above, enhanced match is 100% for Checkout events; this is because the user has shared all their customer data (email, address etc) through the checkout.

![Pinterest events](/files/q665O0aGPmQIb0yhO8mW)

For AddToCart events, the enhanced match is 0%. This is because the user was not logged in when that particular event was triggered, thus the customer data is missing entirely. This would also be true if the user has an active ad blocker.

**There are other customer parameters that we send:**

| Parameter | Descritpion |
| --------- | ----------- |
| ct        | County      |
| em        | Email       |
| fn        | First Name  |
| ln        | Last Name   |
| ph        | Phone       |
| st        | State       |
| zp        | Zip Code    |

### User agent and IP address

These parameters are also important for Pinterest Tag attribution. User agent and IP address parameters are automatically added to browser events, and we are passing them to server-side events to make sure the enhanced match quality is present.

### How ad clicks are linked to purchases

Pinterest Tag is a client-side tracking method that works directly in the browser. When you install Pinterest Tag, a snippet of JavaScript code is added that tracks visitor activity on your website. Tracked conversions appear under Ads > Conversions, where they can be used to measure the effectiveness of the ads, define custom audiences for ad targeting or dynamic ad campaigns, and to analyze the website's conversion funnels.

When a user clicks on a Pinterest d, it includes the epik query parameter. If they land on the site with enabled browser tracking, then the epik query parameter is saved inside \_epik cookie.

Note that the epik parameter is specific to Pinterest, like [fbp and fbc for Facebook](/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api) and [ttp and ttc for TikTok](/integrations/tiktok/how-it-works). Traffic from organic searches, Google Ads and email campaigns will not contain \_epik.

## Server-side tracking

Client-side tracking is useful, but it is only part of the story. Server-side tracking is a more accurate way to track actions and attribute them to Pinterest campaigns. In situations where the Pinterest Tag might be blocked by privacy controls (ad blockers, ITP and iOS 14/15/16 restrictions), Pinterest API for conversions can still track conversions.

Server events are linked to a Pinterest ad account and are processed like web events sent via Pixel. This means that server events are used in measurement, reporting and optimization similar to browser Pixel events.

## Custom parameters

The following parameters are included with every event sent to Pinterest.

| Parameter      | Description                                                                                                           |
| -------------- | --------------------------------------------------------------------------------------------------------------------- |
| market\_handle | The handle of the Shopify Market for this event. Fixed as `unassigned\_market` for orders not attributed to a market. |
| market\_id     | The internal Shopify Market ID for this event. Fixed as `0` for orders not attributed to a market.                    |

## Market parameters in Littledata events

All events sent to Pinterest include the Shopify Market handle by default. This allows you to analyze ad performance by Shopify market — for example, understanding which markets are driving the most conversions from your Pinterest campaigns, or building market-specific audiences for retargeting and dynamic product ads. This requires Shopify Markets to be active on your store, but does not require any per-market destination configuration within Littledata.


# Shopify to Pinterest installation guide

In this guide, we'll explain how to connect your Shopify store to the Pinterest destination.

## Quick install guide

{% stepper %}
{% step %}
**Add the destination**

From the Littledata dashboard, click **Add destination**.

![](/files/XBN8On4yFnPOYxcRIb5O)
{% endstep %}

{% step %}
**Connect Pinterest**

Find the Pinterest destination and click **Connect**.

![](/files/33KX3A9INUtOFEQYSF68)
{% endstep %}

{% step %}
**Choose your tracking preferences**

Select your tracking preferences, then click **Continue**. The recommended settings are already selected.

![](/files/jQRUIK6tKyiklFa5lZQI)
{% endstep %}

{% step %}
**Add your Pinterest destination keys**

Enter your **Account ID**, **Tag ID**, and **Conversion access token**.

![](/files/sAwPfsFmLGoYKegS7x5z)
{% endstep %}

{% step %}
**Find your Account ID and Conversion access token**

In Pinterest Ads, open **Ads → Conversions**.

Click **Generate new token** to create a **Conversion Access Token**.

Your **Ad Account ID** appears in brackets next to the pixel name.

Copy both values and paste them into Littledata.

![](/files/Tc4q0E9cUTKEAAk8i2Rl)

![](/files/e75aOhelpQ3byT80CRMk)
{% endstep %}

{% step %}
**Find your Tag ID**

In Pinterest Ads, open **Tag Manager** from the left menu.

The value in brackets next to the tag name is your **Tag ID**.

Copy it and paste it into Littledata.

![](/files/RL6gHbm8ssSpuV0QvE4Z)
{% endstep %}

{% step %}
**Disable duplicate tracking**

Turn off any apps that could duplicate Pinterest tracking, including the native Pinterest sales channel.

{% hint style="info" %}
Disabling the native Pinterest sales channel will pause your product catalog sync. Before disabling it, make sure you have a third-party catalog sync in place to avoid any disruption to your Pinterest product feed.
{% endhint %}

After you finish, tick **I have disabled all other tracking apps** and click **Continue**.

![](/files/lFOxVMP85D0cLYtrFwVv)
{% endstep %}

{% step %}
**Finish the connection**

The Pinterest connection is now live on your store.
{% endstep %}
{% endstepper %}


# Segment

![shopify to twilio segment](/files/m4WkfvWeenT9CFbTjaI8)

Littledata's [Shopify to Segment connection](https://www.littledata.io/shopify/segment) is the approved [source](https://segment.com/sources/shopify-littledata) for Shopify stores using Segment as their data integration tool. The connection is fully compliant with Segment's [ecommerce spec](https://segment.com/docs/connections/spec/ecommerce/v2).

Segment is a customer data platform [with connectors](https://segment.com/catalog) for many popular marketing, CRM and data warehouse destinations. Littledata's [Shopify app for Segment](https://apps.shopify.com/segment-com-by-littledata) seamlessly pushes data from your Shopify store to Segment.

Littledata sends **events** to Segment, which are behaviors or occurrences tied to a user and a point in time. Data from these events can be loaded into your Segment warehouses, and **also** sent to Segment streaming destinations.

## Connection benefits

* Send data to any of Segment's hundreds of destinations
* Fully compatible with Online Store 2.0 and one-page checkout
* Combination of client-side and server-side tracking to capture browsing activity, orders, refunds, and upsells
* Extra user fields for calculating LTV and more
* Minimal, super-fast script and [data layer](/advanced/developer/gtm-and-google-analytics-data-layer-for-shopify)
* Works with [headless Shopify](/sources/shopify/headless-shopify/working-with-a-headless-shopify-setup) setups
* Import historic orders into a data warehouse (with a [Littledata Enterprise Plus](https://www.littledata.io/plus) plan)

## Support for common Segment destinations

* Works seamlessly with [Google Analytics](/integrations/shopify-to-segment/send-data-from-segment-to-google-analytics)
* Use [Facebook Conversions API](/integrations/shopify-to-segment/connect-segment-to-facebook-conversions-api)
* Track email campaigns from [Iterable](https://support.iterable.com/hc/en-us/articles/204795719-Sending-Data-from-Segment-to-Iterable-#e-commerce) or Klaviyo

## Learn more

Ready to link up Shopify and Segment?

* See [how the Shopify to Segment connection works](/integrations/shopify-to-segment/how-it-works)
* For a more detailed schema and parameters, reach out to <help@littledata.io>
* [Get started with the connection](/integrations/shopify-to-segment/installation) on your store
* Read [Segment's source documentation](https://segment.com/docs/connections/sources/catalog/cloud-apps/shopify-littledata)


# Shopify to Segment installation guide

The Littledata Segment connection for Shopify app automatically fixes ecommerce tracking and allows you to use Shopify as a Segment source. Learn how!

In this guide, we'll explain to you how to connect your Shopify store to the Segment destination.

## Quick install guide

{% stepper %}
{% step %}
**Add the destination**

From the Littledata dashboard, click **Add destination**.

![](/files/XBN8On4yFnPOYxcRIb5O)
{% endstep %}

{% step %}
**Connect Segment**

Find the Segment destination and click **Connect**.

![](/files/9mSIdImYgUDaourjaKfa)
{% endstep %}

{% step %}
**Choose your tracking preferences**

Select your tracking preferences, then click **Continue**. The recommended settings are already selected.

![](/files/hOt61r9V3nbk3LLuHDlx)
{% endstep %}

{% step %}
**Create a Shopify source in Segment**

In your Segment workspace, go to **Sources** and search for **Shopify (by Littledata)**.

Add the source. Then return to Littledata, tick **I have completed all the steps**, and click **Continue**.

![](/files/rQQGogrHP8ob3MI3IZZo)
{% endstep %}

{% step %}
**Add your Segment write key**

Copy the `writeKey` from your new Segment source and paste it into the setup flow. Then click **Continue**.

{% hint style="info" %}
To find your Segment source write key, log in to your **Segment workspace** and go to **Connections > Sources**. Select your source, open **Settings**, then select **API Keys**.
{% endhint %}

![](/files/9cX6WR2CDukcBS6j5kOK)
{% endstep %}

{% step %}
**Finish the connection**

You can now send data from Shopify to hundreds of Segment destinations.
{% endstep %}
{% endstepper %}


# How it Works: Shopify source for Segment

Learn what you can track with our Shopify app for Segment. Adding Shopify to your Segment sources makes it easy to push your Shopify dataset to Segment.

![Shopify to Twilio Segment](https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-008284fe2b33473e3419e04aa40ffaeaac7b2620%2Fconnection-segment.png?alt=media)

Littledata's Shopify to Segment connection uses a combination of client-side (browser) and server-side tracking to ensure 100% accurate data about your Shopify store in Segment. Littledata automatically integrates with Shopify and Shopify Plus sites to capture every customer touchpoint, including sales, marketing, customer and product performance data. You can send this data to a connected data warehouse like Snowflake; email and customer communications tools like Klaviyo, Iterable and Braze; analytics destinations such as Mixpanel and Kissmetrics; and many more destinations.

**Client-side (device mode) tracking**

During the [installation process](/integrations/shopify-to-segment/installation):

* A minified tracking script, loaded via Littledata's app embed in your Shopify theme
* Segment's analytics.js V2 library is loaded on all pages, except for the checkout
* Enables sending of device-mode ecommerce events to all Segment destinations
* Segment's anonymous ID and Google Analytics' client ID is passed to our servers to ensure consistent user journey tracking

**Server-side (cloud mode) tracking**

During the Segment connection setup, Littledata also adds a set of webhooks to your Shopify store. When a customer interacts with your store these changes are relayed server-side from Shopify to Littledata to Segment. The advantages to this approach are:

* 100% event capture for adds to cart, checkout steps, sales and refunds/returns
* Customer data (e.g. email) securely relayed server-side
* No extra scripts on the sensitive and secure checkout pages
* Accurate marketing attribution, even when customers use ad-blockers or cookie opt-outs
* Supports cloud-mode destinations such as [Facebook Conversions API](https://segment.com/docs/connections/destinations/catalog/facebook-pixel-server-side)

{% hint style="info" %}
Using a headless Shopify setup? Follow the setup steps for [headless Shopify tracking](/sources/shopify/headless-shopify/working-with-a-headless-shopify-setup) with Littledata.
{% endhint %}

## What you can track

These are the events that Littledata sends from Shopify to Segment. These events will show up as tables in your warehouse, and as regular events in your other Segment destinations.

{% hint style="success" %}
For a more detailed schema and parameters, reach out to <help@littledata.io>.
{% endhint %}

### Device-mode events

Below is a table of events that Littledata sends to Segment through the analytics.js library. These events will show up as tables in your warehouse, and as regular events in your other device-mode Destination

| Event Name                | Description                                                       |
| ------------------------- | ----------------------------------------------------------------- |
| Cart Viewed               | User has viewed the /cart page                                    |
| Session Started\*         | User has started a session                                        |
| Page Viewed               | User has viewed a page                                            |
| Product List Viewed       | User has viewed a product as they scroll down the collection page |
| Product Clicked           | User has clicked a product within a product list                  |
| Product Viewed            | User has viewed a product page                                    |
| Product Image Clicked     | User has clicked a product image                                  |
| Product Shared            | User has shared a product via social links                        |
| Products Searched         | User has searched for products (with search query)                |
| Registration Viewed       | User has viewed the /account/register page                        |
| Thank You Page Viewed\*\* | User has viewed the thank you page, if available                  |

\*Session started is triggered when a first visit of a user occured on a browser session. The next time it will be sent for the same user will be only after he closes the current browser. Opening more tabs of your store will **not** trigger an extra session start for the same browser.

\*\* This is less reliable than the de-duplicated `Order Completed` event sent from Littledata's servers, but you can use it in device-mode destinations to trigger a conversion. `payment_method` and `shipping_method` properties are not available with this event.

You can *opt out* of any events in the [data pipeline settings](/advanced/developer/data-pipeline-settings).

The source also respects [GDPR-compliant cookie consent](/partner-recipes/cookie-consent-integrations/shopify-customer-consent-api) via a cookie banner, or popular consent management platforms such as [OneTrust](/partner-recipes/cookie-consent-integrations/integrating-onetrust-shopify).

### Server-side events

Server-side events are tracked by Littledata servers from Shopify and passed onto any destination in cloud mode.

| Event Name              | Description                                                                                                                             |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| Product Added           | User has added a product to the cart, and left it in the cart for more than 10 seconds                                                  |
| Product Removed         | User has removed a product from the cart                                                                                                |
| Checkout Started        | User has started checkout                                                                                                               |
| Checkout Step Viewed    | User has viewed a step in the checkout                                                                                                  |
| Checkout Step Completed | User has completed a step in the checkout                                                                                               |
| Customer Created        | Customer record was created on Shopify, normally after the first step of the checkout o                                                 |
| Payment Info Entered    | User has entered payment information on step 3 of the Shopify checkout                                                                  |
| Coupon Applied          | User has applied a coupon. Sent with Checkout Step Completed or Order Completed                                                         |
| Order Completed         | Customer has completed an order \*\*                                                                                                    |
| Post Purchase Upsell    | Customer accepts the upsell. Will contain only the newly added products.                                                                |
| Order Cancelled         | Admin has cancelled an order (including the `cancel_reason`)                                                                            |
| POS Order Placed        | User has placed an order via Shopify POS                                                                                                |
| Customer Enabled        | User confirms their email address (whether single or double opt-in) and their Shopify customer account has `verified_email` set as true |
| Fulfillment Created     | Order fulfillment is created (including `status`, `tracking_numbers` and `tracking_urls` where the shipping integration allows)         |
| Fulfillment Updated     | Order fulfillment status has changed (including `status`, `tracking_numbers` and `tracking_urls` where the shipping integration allows) |

\*\* Order Completed event may be delayed by up to 40 seconds to wait for tags applied after the order was created

### User identity

In Littledata's app you can choose which of the following fields you want to send as the `userId` for known customers:

* **Shopify customer ID** (default) - Recommended if you have a simple Shopify setup with minimal integrations.
* **Hashed email** - The MD5 email hash is useful if you have other marketing platforms sending traffic where you know the email of the visitor (e.g. email marketing like Bronto or Marketo), but not their Shopify customer ID. We use an unsalted MD5 hash (`createHash` method) to match your other sources.
* **Email** - The email identifier is recommended when other platforms use the email and can’t hash it, and you are comfortable with the privacy implications.
* **None** (no identifier) - Choose “none” if user identity is already handled by your Segment implementation and you only need the extra events powered by Littledata's Shopify source.
* [**Shopify Customer metafield**](/integrations/shopify-to-segment/customer-metafields-as-userid-for-segment) - If you have your own customer identifier, and can add it to the Shopify customer record as a metafield, you can send this to Segment.

For Segment Unify we also send `shopify_customer_id` as an [externalID](https://segment.com/docs/unify/identity-resolution/externalids) for advanced matching.

### Identify calls

For every event where there is an identifiable Shopify customer (from both the client and the server) we also send an [Identify call](https://segment.com/docs/connections/spec/identify) to build a customer profile in [Unify](https://segment.com/docs/unify) and trigger updates in CRM systems connected to Segment. This identification happens when the customer logs into the storefront, on the last step of the checkout, with the order, and also after purchase with any customer update in Shopify admin.

This is especially helpful for identity resolution in common destinations such as [Klaviyo](https://segment.com/docs/connections/destinations/catalog/klaviyo) and [Braze](https://segment.com/docs/connections/destinations/catalog/braze).

Littledata includes the following traits with an Identify call:

| Property Name                | Description                                                                                                                                                | Property Type |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `userId`                     | The chosen user identifier. This defaults to the Shopify Customer ID.                                                                                      | Double        |
| `createdAt`                  | Date customer record was created.                                                                                                                          | Date          |
| `customerLifetimeValue`      | Total spend of customer on the Shopify store.                                                                                                              | Double        |
| `default_address.street`     | The customer's default street address.                                                                                                                     | String        |
| `default.address.postalCode` | The customer's ZIP / post code.                                                                                                                            | String        |
| `default_address.state`      | The customer's state address.                                                                                                                              | String        |
| `default_address.country`    | The customer's country.                                                                                                                                    | String        |
| `description`                | Customer notes.                                                                                                                                            | String        |
| `email`                      | Customer's email address.                                                                                                                                  | String        |
| `email_consent_state`        | If the user has consented to email marketing (mapping to [EmailMarketingState](https://shopify.dev/docs/api/customer/unstable/enums/EmailMarketingState)). | String, Null  |
| `email_opt_in_level`         | Level of user's opt in email marketing (mapping to [MarketingOptInLevel](https://shopify.dev/docs/api/customer/unstable/enums/MarketingOptInLevel)).       | String, Null  |
| `firstName`                  | Customer's first name.                                                                                                                                     | String        |
| `lastName`                   | Customer's last name.                                                                                                                                      | String        |
| `phone`                      | Customer's phone number.                                                                                                                                   | String        |
| `purchaseCount`              | Number of orders by this customer.                                                                                                                         | Integer       |
| `sms_consent_state`          | If the user has consented to SMS marketing (mapping to [SmsMarketingState](https://shopify.dev/docs/api/customer/unstable/enums/SmsMarketingState)).       | String, Null  |
| `sms_opt_in_level`           | Level of user's opt in to SMS marketing (mapping to [MarketingOptInLevel](https://shopify.dev/docs/api/customer/unstable/enums/MarketingOptInLevel)).      | String, Null  |
| `state`                      | Shopify customer state - enabled, disabled, invited to create an account or customer declined.                                                             | String        |
| `tags`                       | Custom tags applied to the customer,                                                                                                                       | String        |
| `verified_email`             | Whether the customer has verified their email.                                                                                                             | Boolean       |

### Support for email marketing destinations

Email marketing platforms such as [Klaviyo](https://segment.com/docs/connections/destinations/catalog/klaviyo/#server-side-track), [Iterable](https://segment.com/docs/connections/destinations/catalog/iterable/#track) and [Hubspot](https://segment.com/docs/connections/destinations/catalog/hubspot/#server) require an `email` property with any server-side event in order to associate then with a customer (they cannot use an anonymous ID). Littledata's adds that `email` property whenever an email address is set in the user `traits()` object (in device-mode) or from the Shopify customer record (in cloud-mode).

Littledata also supports a [direct integration for Klaviyo](/integrations/shopify-to-segment/shopify-segment-klaviyo) with enhanced identity resolution for abandonment retargeting.

### Alias calls

To support seamless customer tracking in analytics destinations such as [Mixpanel](https://segment.com/docs/connections/destinations/catalog/mixpanel/#alias), [Vero](https://segment.com/docs/connections/destinations/catalog/vero/#alias) and [Kissmetrics](https://segment.com/docs/connections/destinations/catalog/kissmetrics/#alias), Littledata ensures the pre-checkout `anonymousId` is added as an alias of the `userId` (used from checkout step 2 onwards).

### Event properties

These are the properties which may be included in the events listed above.

| Property                                    | Description                                                                                                                               | Property Type |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
| `affiliation`                               | Comma-separated list of order tags. Untagged orders have the value `Shopify`                                                              | String        |
| `cart_id`                                   | ID of the Shopify cart                                                                                                                    | String        |
| `checkout_id`                               | ID of the checkout session                                                                                                                | String        |
| `integrations.Google Analytics.clientId`    | The user's Google Analytics Client ID                                                                                                     | String        |
| `integrations.Google Analytics.sessionId`   | The user's Google Analytics Session ID                                                                                                    | String        |
| `integrations.Actions Amplitude.session_id` | The user's Amplitude Session ID                                                                                                           | Number        |
| `integrations.Facebook Pixel.fbp`           | The user's Facebok Pixel ID                                                                                                               | String        |
| `integrations.Facebook Pixel.fbc`           | The user's Facebok click ID                                                                                                               | String        |
| `integrations.Braze.braze_id`               | The user's Braze client ID                                                                                                                | String        |
| `integrations.TikTok Pixel.ttp`             | The user's TikTok Pixel ID                                                                                                                | String        |
| `integrations.TikTok Pixel.ttclid`          | The user's TikTok click ID                                                                                                                | String        |
| `context.ip`                                | The user's IP address                                                                                                                     | String        |
| `coupon`                                    | Comma-separated string of discount coupons used, if applicable                                                                            | String        |
| `currency`                                  | The currency of the order                                                                                                                 | String        |
| `discount`                                  | Value of the discount applied                                                                                                             | Float         |
| `email`                                     | Shopify default email address, or email submitted on a storefront form                                                                    | String        |
| `lifetime_revenue_littledata`               | Lifetime revenue of the customer in Shopify                                                                                               | String        |
| `location_id`                               | Location ID of the Point of Sale                                                                                                          | Integer       |
| `order_id`                                  | The ID of the order, defaulting to the Shopify order name                                                                                 | String        |
| `payment_method`                            | The payment method chosen for checkout                                                                                                    | String        |
| `presentment_currency`                      | The user's local currency                                                                                                                 | String        |
| `presentment_total`                         | The order total in local currency                                                                                                         | String        |
| `products`                                  | A list of all the product at that step of the funnel                                                                                      | Array         |
| `profit`                                    | Estimated profit of the order, sent with Order Completed when [Profit Signal](/sources/profit-signal/how-to-use-profit-signal) is enabled | Float         |
| `purchase_count_littledata`                 | Total purchase count for the customer                                                                                                     | Integer       |
| `revenue`                                   | Product revenue (excluding discounts, shipping and tax) \*                                                                                | Float         |
| `sent_from`                                 | Unique property to identify events sent by Littledata                                                                                     | String        |
| `shipping`                                  | Shipping cost                                                                                                                             | Float         |
| `shipping_method`                           | Shipping method chosen for checkout                                                                                                       | String        |
| `shopify_customer_id_littledata`            | Shopify’s identifier for the customer                                                                                                     | Integer       |
| `source_name`                               | The source of the order (e.g. web, android, pos)                                                                                          | String        |
| `step`                                      | Checkout step                                                                                                                             | Integer       |
| `subscription_revenue`                      | The revenue associated with a Subscription Event                                                                                          | Float         |
| `subtotal`                                  | Total after discounts but before taxes and shipping                                                                                       | Float         |
| `tax`                                       | The amount of tax on the order                                                                                                            | Float         |
| `total`                                     | Total value of the order                                                                                                                  | Float         |
| `userId`                                    | Chosen user identifier, defaulting to Shopify Customer ID                                                                                 | String        |
| `consent.categoryPreferences`               | Consent state of the user                                                                                                                 | Object        |
| `categoryPreferences.Analytics`             | User accepted or not analytics tracking                                                                                                   | Boolean       |
| `categoryPreferences.Advertising`           | User accepted or not marketing tracking                                                                                                   | Boolean       |
| `categoryPreferences.Functional`            | User has preferences for tracking                                                                                                         | Boolean       |
| `categoryPreferences.DataSharing`           | User accepted or not sale of data                                                                                                         | Boolean       |
| `market_handle`                             | The handle of the Shopify Market for this event. Fixed as `unassigned_market` for orders not attributed to a market.                      | String        |
| `market_id`                                 | The internal Shopify Market ID for this event. Fixed as `0` for orders not attributed to a market.                                        | String        |

\*`revenue` is available only with the Order Completed event, and only if the store opts in via the Littledata application. Revenue is a reserved property in many Segment destinations. Opting in overrides the `total` property sent to Google Analytics.

### Product properties

Each product in the `products` array, or Product Viewed and Product Added events, will have the following properties:

| Property             | Description                                                        | Property Type |
| -------------------- | ------------------------------------------------------------------ | ------------- |
| `brand`              | The brand of the product (Shopify vendor)                          | String        |
| `category`           | The category of the product (defaults to all)                      | String        |
| `compare_at_price`   | The product price before any discount                              | String        |
| `coupon`             | Coupon code associated with the product                            | String        |
| `image_url`          | The URL of the first product image                                 | String        |
| `list_id`            | The ID of the product collection (for List Views and Clicks)       | String        |
| `list_position`      | The product position in the collection (for List Views and Clicks) | Integer       |
| `name`               | Product name                                                       | String        |
| `price`              | The product price                                                  | Float         |
| `product_id`         | Shopify product ID                                                 | String        |
| `quantity`           | The quantity of this product                                       | Integer       |
| `product_properties` | Custom properties of purchased products                            | Array         |
| `shopify_product_id` | Also Shopify product ID                                            | String        |
| `shopify_variant_id` | The Shopify variant ID                                             | String        |
| `sku`                | The product SKU                                                    | String        |
| `url`                | The URL of the product page                                        | String        |
| `variant`            | The product variant name                                           | String        |

### Subscription Events

All [recurring orders in the Shopify checkout](/sources/shopify/tracking-subscription-orders-in-the-shopify-checkout), from any subscription app, are tracked as Order Completed events.

Additional subscription lifecycle events via Littledata's [Recharge connection](https://www.littledata.io/shopify/recharge) are available in cloud mode destinations.

| Event Name                 | Description                       |
| -------------------------- | --------------------------------- |
| Subscription Created       | Customer created a subscription   |
| Subscription Updated       | Customer updated a subscription   |
| Subscription Cancelled     | Customer cancelled a subscription |
| Subscription Skipped       | Customer skipped an order         |
| Subscription Charge Failed | A recurring charge failed         |

These events include event properties in addition to the [standard event properties](#event-properties).

| Event property             | Property Type | With event                 |
| -------------------------- | ------------- | -------------------------- |
| `subscriptionId`           | string        | All                        |
| `items`                    | array         | All                        |
| `status`                   | string        | All                        |
| `order_interval_frequency` | number        | All                        |
| `order_interval_unit`      | string        | All                        |
| `value`                    | number        | All                        |
| `cancel_reason`            | string        | Subscription Cancelled     |
| `cancel_comment`           | string        | Subscription Cancelled     |
| `error_type`               | string        | Subscription Charge Failed |

## Using Analytics.js + Littledata

If you need to track device-mode events which are not covered above you can access the `analytics` object from within the browser, and use [Segment's `analytics.track` method](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/#track). Try using the [Segment Inspector Chrome extension](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/#segment-inspector) to check these are tracking.

You should not need to call `analytics.identify` or `analytics.alias` - this is already handled by Littledata.

To access third-party libraries loaded by Segment on the page, you should use an `analytics.ready()` [callback](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/#ready). Littledata may wait for page load and cookie consent before loading Analytics.js, so those libraries may not be loaded by the time your additional script runs.

## Segment Consent Management

Littledata's integration is compatible with [Segment Consent Management.](https://segment.com/docs/privacy/consent-management/consent-in-segment-connections/)

Read more about this in our dedicated [help article](/integrations/shopify-to-segment/segment-consent-management).

## Advanced settings

You can customize Littledata's Shopify source from the [data pipeline settings](/advanced/developer/data-pipeline-settings) in the Littledata admin. The general settings affect how we handle details such as orders, products and pageviews. The following settings can be changed within the Segment connection, in the **tracking customization tab**:

**cookiesToTrack**

Any cookie set on a landing page (e.g. a session identifier or marketing campaign name) can be sent on to Segment with an identify call.

**CDNForAnalyticsJS**

If you have a proxy CDN setup to load Segment's AnalyticsJS library from your own domain you can specify it here.\
\
**Regional Endpoints**\
\
This settings allows you to change whether processed events are sent to Segment's **European** (Dublin) or **North American** ingestion endpoints. This enables your data to be split between the two servers, so it can be stored and processed by Segment more efficient.\
\
This setting affects both server-side and client-side tracking, therefore all your tracked events will be delivered to the selected endpoint. The setting allows you to select between US (North America) and EU (Europe), and all your data will be sent there.\
\
**For more information about how regional endpoints work for Segment, please reffer to** [**this article**](https://www.twilio.com/docs/segment/guides/regional-segment)**.**\\

View all available [data pipeline settings >>>](/advanced/developer/data-pipeline-settings)

For a more detailed schema and parameters, reach out to <help@littledata.io>.

## Market parameters in Littledata events

All events sent to Segment include the Shopify Market handle by default. Because Segment acts as a hub for your marketing stack, this flows through to every connected destination — whether that's a data warehouse, an email platform like Klaviyo or Braze, or an analytics tool like Mixpanel. This means you can segment audiences, filter reports, and trigger market-specific flows across your entire stack without any additional data enrichment. This requires Shopify Markets to be active on your store, but does not require any per-market destination configuration within Littledata.


# Connect Segment to Meta Conversions API

In addition to our direct [Shopify to Meta Conversions API](/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api) connection, Littledata's [Shopify source](/integrations/shopify-to-segment) supports the Meta-specific identifiers needed for the cloud-mode [Meta Conversions API](https://segment.com/docs/connections/destinations/catalog/facebook-pixel-server-side/#server-event-parameter-requirements) destination in Segment.

You need to have both the frontend Meta Pixel code and the server-side tracking (CAPI) set up on your website. To make this all work via Segment, here are the extra setup steps you will need to get Meta Ads tracking working end-to-end.

### Add Meta Pixel to all the landing pages

This is needed to track the page views and set the Meta cookies. Pixel is added automatically via Segment's tracker when you set up Segment's [Meta Pixel destination](https://segment.com/docs/connections/destinations/catalog/facebook-pixel). Alternatively, you can add the Meta Pixel tracking code yourself in the Shopify theme files.

### Enable User matching

For the Match Rate between frontend and server-side tracking to be high, you need to pass the same External ID from the browser and the server. It can be `userId` or, if it is not set, alternatively `anonymousId`. Here are the steps to accomplish that in Segment's Meta Pixel destination.

1. Go to the Meta Pixel connection settings ![segment fb pixel settings](https://res.cloudinary.com/littledata/w_512,h_508,c_fit/littledata-blog-images/2021/12/segment-fb-pixel-settings-e1638372162843.png)
2. Turn on "**Enable Advanced Matching**"
3. Turn on "**Use User ID or Anonymous ID as External ID"**

### Match Product Categories to Meta Content Types

Segment tries to match the content type of events based on `product_group`, but Shopify’s Meta sales channel sets the product’s content type as `product`, resulting in a product catalog that can't be matched to events. To solve this you need to manually map product categories to the `product` content type.

1. Go to the Meta CAPI destination settings![segment fb capi settings](https://res.cloudinary.com/littledata/w_512,h_365,c_fit/littledata-blog-images/2021/09/settings.png)
2. Click on **Map Categories to FB Content Types** ![map product category](https://res.cloudinary.com/littledata/w_512,h_257,c_fit/littledata-blog-images/2021/09/mapping.png)
3. Add all product types from the store to map to `product`. **Note**: Any uncategorized products will be included in category **all** so please add that mapping as well.

### Map Segment price to the Meta 'value' field

Events sent via Littledata to Segment include multiple value properties, so you need to select `properties.price` to map to Meta’s `value` property.

1. Go to the Meta CAPI connection settings in Segment ![segment settings](https://res.cloudinary.com/littledata/w_512,h_365,c_fit/littledata-blog-images/2021/09/settings.png)
2. Click Value Field Identifier settings![value field identifier](https://res.cloudinary.com/littledata/w_512,h_146,c_fit/littledata-blog-images/2021/09/value-field.png)
3. Select `properties.price` and click **Save**

### Limitations

Littledata's Segment integration offers support the following Meta Pixel / CAPI events:

* View content
* Add to cart
* Initiate checkout
* Add payment info
* Purchase

Other events sent by Littledata may appear as not supported or not delivered in the Segment dashboard.


# How to use Customer metafields as userID for Segment

See how you can add the customer metafields as userId for the Segment destination

### Why use customer metafields?

Customer metafields can be used by companies that have custom non-Shopify identifier for their customers, for example a **Single Sign-On** (**SSO) system** that unifies the customer identifiers across multiple apps or sites.

### How do I link the customer metafield definition with Littledata?

After you've created the customer metafield definition, go to the **Littledata dashboard**, click on the **Segment** connection settings , and open the **Tracking Customization** tab. Here you’ll find the **User ID** setting:

![](/files/vLbRppu08m13nTTPFE6q)

{% hint style="info" %}
When you select this setting, no `userId` will be sent on client-side events because Customer metafields can’t be accessed from the web page.
{% endhint %}

Select **Customer metafield**. After you choose this option, an input field will appear where you can enter the **namespace** and **key** from your Customer metafield definition:

![See where to define the Customer metafield](/files/EGHy0EICyCWceofJmrDT)

After you save the setting, all server-side events sent by Littledata will include the **userId** property using the value from your Shopify customer metafield.

![Validate Customer metafield change](/files/kKbNOaIsnpzvwQzUo5OB)

![Segment raw event including the new Customer metafield definition](/files/R8MdMYPYPpx0FuhwQ797)

### Troubleshooting

To use this feature, make sure the Customer metafield is created and defined in Shopify, then enter the same namespace and key in the Littledata app.

If the metafield is not created in Shopify but you enable it in Littledata, the **userId** will still be sent - but only on server-side events - and will fall back to the **Shopify customer ID**.

To link the metafield to your customers, you must add a value for that metafield on each customer profile you want associated with the identifier. For example:

![Customer profile linked to metafield](/files/pfTuQ6EPocQMUZ05YtWB)


# How to uninstall the Segment.com app

Learn how to uninstall the Segment.com app. Before you uninstall, reach out to our customer support team for possible solutions!

**Step 1.** Go to **Shopify Admin -> Settings -> Apps and sales channels.** Select the **Segment app** and click on **Uninstall.**

![](/files/xiML5TOLDsmMW3ihAPDk)

**Step 2. S**elect the reason why you are uninstalling and click on **Uninstall.**

![](/files/C8GKCo6FwJo5x97MKocn)

Once you finish with this final step, you have completed the uninstall process!


# Using Segment Consent Management with Shopify

This article explains how Littledata works with Segment's Consent Management.

### What is Segment Consent Management?

[Segment Consent Management](https://segment.com/docs/privacy/consent-management/consent-in-segment-connections/) accepts signals from your Consent Management Platform (CMP) to capture and enforce user consent preferences, routing events only to destinations approved by the user.

Segment requires every event from your sources to include end-user consent preferences, captured by your CMP or application logic, in the form of the [consent object](https://segment.com/docs/privacy/consent-management/consent-in-segment-connections/#consent-object).

### How does Littledata work with Segment Consent Management?

Littledata uses Shopify's Customer Privacy API to track customer consent. Most [Shopify cookie banners](/partner-recipes/cookie-consent-integrations/shopify-customer-consent-api) and some Consent Management Platforms (CMPs) support this Customer Privacy API.

For **Consent Mode** to work, you must have a cookie banner. You can set it up from your Shopify Admin by going to **Settings** -> **Customer** **Privacy** -> **Cookie** **Banner**.

{% hint style="success" %}
If your store uses another CMP, your CMP will need to update the [customer privacy API](https://shopify.dev/docs/api/customer-privacy) with the given consent, or use a plugin for [OneTrust](/partner-recipes/cookie-consent-integrations/integrating-onetrust-shopify).
{% endhint %}

### Mapping of Shopify consent types to Segment

Shopify’s Customer Privacy API supports four consent types, and Littledata maps these onto Segment Consent.

| Segment Consent Type | Shopify Consent Type |
| -------------------- | -------------------- |
| Advertising          | marketing            |
| DataSharing          | sale\_of\_data       |
| Functional           | preferences          |
| Analytics            | analytics            |

For all consent types a `true` value equals a 'yes' value on Shopify.

| Segment Consent value | Shopify Consent value |
| --------------------- | --------------------- |
| `true`                | yes                   |
| `false`               | no                    |

This `consent` object is sent with all events within the event `context` object.

### Configuring Segment destinations to use consent

You must [configure the Segment destinations](https://segment.com/docs/privacy/consent-management/configure-consent-management/) to decide which ones are Advertising, Analytics, Functional or DataSharing.

You can ignore step 2 (integrating your CMP) because Littledata has already done this for the [Shopify source](https://segment.com/docs/connections/sources/catalog/libraries/website/shopify-littledata/).

### Blocking all client-side events based on consent

If you prefer not to collect non-consenting customer data in Segment, then you can exclude client-side events using source middleware for **Segment’s AnalyticsJS library**.

This example middleware script would drop events from being triggered if `context.consent.categoryPreferences.Advertising` is not `true`.

```
window.analytics = window.analytics || [];
// Temporary implementation before the real script loads
if (!window.analytics.addSourceMiddleware) {
  window.analytics.addSourceMiddleware = function () {
   const e = Array.prototype.slice.call(arguments);
   e.unshift('addSourceMiddleware');
   window.analytics.push(e);
   return window.analytics;
  };
}
window.analytics.addSourceMiddleware(({ payload, next }) => {
    if(payload?.obj?.context?.consent?.categoryPreferences?.Advertising) {
        next(payload);
    }
});
```


# How to use Segment's debugger to see Littledata events

If you're familiar with the Segment platform, you will know that one of its most popular features is the Source Debugger.

The Source Debugger provides a real-time flow of the calls received from your Segment source, in which you can see if the events reaching your Segment workspace have a valid format and are correctly fired.

{% hint style="success" %}
If you're looking for a particular event that Littledata sends to your Segment source, reach out to <help@littledata.io>.
{% endhint %}

#### How to see the Littledata events in the Segment Debugger

To see events received by your Shopify by Littledata source in Segment, open the Sources tab and select **Shopify (by Littledata)**, then click on Debugger. This will open the real-time stream, which includes client-side and server-side events:

![](/files/qNVt2yGLrN6dup9bQkl9)

You can click on any event to see what properties and parameters are received with the payload:

![](/files/hy7HC7XRsVMMt78IIzov)

{% hint style="success" %}
You can use the **Pretty** view to see the call that was sent to your source, or **Raw** for a detailed view of the event.
{% endhint %}

For example, here is how a Product Viewed event looks like in the Debugger:

![](/files/WeMt1GlyX821dwZGASDf)

The stream can be paused by toggling from **Live** to **Pause** in the top left corner of the Debugger. The events will continue to reach your source even when the Debugger is paused.

The Debugger can only show up to 500 events at once.

There is also a search bar which allows you to search for a specific payload or event by name or information that is available in the payload.

![](/files/f6qQFDYWEjLBWF6WvZYv)


# FAQ: Shopify to Segment connection

Frequently asked questions regarding the Littledata Segment Shopify connection. Learn more about our Segment connection on the Shopify app store!

Littledata's [Segment connection](/integrations/shopify-to-segment) fixes tracking automatically and sends data from Shopify to Segment. Here are Frequently Asked Questions about the integration.

<details>

<summary>Is your Segment connection listed in the Shopify app store?</summary>

Yes. [Segment by Littledata](https://apps.shopify.com/segment-com-by-littledata) is available in the Shopify app store. Install the app directly from the app store, and reach out to <help@littledata.io> for any Shopify-related queries.

</details>

<details>

<summary>What does Littledata's Shopify to Segment connection do?</summary>

The Segment connection lets you use your Shopify store as a Segment source. It automatically tracks every ecommerce touch point on your Shopify store, including:

* Browsing behavior
* Checkout steps
* Sales, refunds & upsells
* Customer lifetime value

Our app sends both [track and identify calls](/integrations/shopify-to-segment/how-it-works) to Segment with all the required product and customer fields to make analysis, retargeting and personalization possible. See [exactly what we track](/integrations/shopify-to-segment/how-it-works).

</details>

<details>

<summary>How do I install the app?</summary>

You can follow this [quick setup guide](/integrations/shopify-to-segment/installation). The setup can be completed in 10 minutes without any code changes. You'll need a Segment account and a Shopify store to complete the process.

</details>

<details>

<summary>Is there a free trial?</summary>

Yes, absolutely! Littledata's Segment connection includes a free 30-day trial on all plans. The trial is fully functional, so you have access to all features and benefits during the trial period.

</details>

<details>

<summary>Do I also need the Shopify to Google Analytics app?</summary>

We recommend you send the data from Segment on to their [Google Analytics destination](/integrations/shopify-to-segment/send-data-from-segment-to-google-analytics), but if you want continuity of tracking or other customization you can also use Littledata's [Google Analytics connection](/integrations/shopify-to-google-analytics) alongside the Segment connection with no technical limitations.

You may need our dedicated Google Analytics connection in the following cases:

* when you find marketing attribution in GA4 is not working as expected
* when you need more [user properties in GA4](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4#custom-parameters)
* when you need to use the [GTM data layer](/advanced/developer/gtm-and-google-analytics-data-layer-for-shopify) to configure events not supported in Segment via Google Tag Manager

</details>

<details>

<summary>Do you offer custom setup and priority support?</summary>

Yes, Littledata's [Plus plans](https://www.littledata.io/plus) are a popular option for Shopify Plus merchants and other stores intent on major growth. These plans give you access to guided custom implementations and priority support.

</details>

<details>

<summary>Can I import historic customer data?</summary>

With an annual [Littledata Plus plan](https://www.littledata.io/plus) you can import all Shopify orders and refunds from before you started using Segment, to sync with destinations that support timestamped events (e.g. a data warehouse). This enables you to build a complete customer history in your chosen destination.

</details>

<details>

<summary>How does the app deal with customer-level data?</summary>

By default Littledata doesn’t store personally-identifiable (PII) customer data; only aggregate data like city or operating system - read [our privacy policy](https://blog.littledata.io/privacy-policy). We do push PII data like email and address from Shopify to Segment (see section on [Identify calls](/integrations/shopify-to-segment/how-it-works)), but you can use [Segment's Protocols feature](https://segment.com/product/protocols) to filter it out to comply with your data protection policies.

</details>

<details>

<summary>What Segment destinations are supported?</summary>

In theory all device and cloud mode destinations can receive data from the Shopify source, but we've made special adaptations for:

* [Google Analytics 4](/integrations/shopify-to-segment/send-data-from-segment-to-google-analytics)
* [Klaviyo](/integrations/shopify-to-segment/shopify-segment-klaviyo)
* [Facebook Conversions API](/integrations/shopify-to-segment/connect-segment-to-facebook-conversions-api)
* [Iterable](https://support.iterable.com/hc/en-us/articles/204795719-Sending-Data-from-Segment-to-Iterable-#order-completed)
* [Mixpanel](https://segment.com/docs/connections/sources/catalog/libraries/website/shopify-littledata/#alias-calls)

</details>

<details>

<summary>Is there more technical documentation?</summary>

Yes:

* see a [full list of what events and properties are included](/integrations/shopify-to-segment/how-it-works) in this Segment source.
* see our [full tracking plan](https://docs.google.com/spreadsheets/d/1aljowRhMU9_7uGXmcipbP1Y14S4cOSdXGQA2Vx7BHko) and import this into Segment Protocols.
* see [what might be blocking marketing attribution](/advanced/troubleshooting/troubleshooting-marketing-attribution-for-shopify) of events.

</details>


# Using Shopify + Segment as an alternative to Fivetran ELT

For brands wanting to get Shopify customer data into a data warehouse, Segment + Littledata can be a good alternative to an Extract, Load and Transform (ELT) tool like Fivetran.

### How does Segment sync with a data warehouse?

As order events stream into Segment from Littledata's Shopify source, the customer and orders tables in your warehouse will be kept in sync with Shopify.

On a Business plan, Segment offers [hourly warehouse sync.](https://segment.com/docs/connections/storage/warehouses/)

### Which tables can be extracted?

Littledata can import all the historic orders from Shopify into Segment. This also updates the customer records in Segment.

In your warehouse you will have two tables - customers and orders - and from there you can infer exactly which products were brought and when.

The customer table will[ have traits](/integrations/shopify-to-segment/how-it-works#identify-calls) as the columns and orders will have order [event properties](/integrations/shopify-to-segment/how-it-works#event-properties) as the columns.

### How does Littledata extract orders from Shopify?

For brands on an [annual Plus plan](https://www.littledata.io/plus), Littledata can set up an order import from Shopify to Segment, typically taking a few days to transfer.

Once the historic orders are in sync, our server connection with Shopify will stream them in realtime into Segment.

### How is this better than Fivetran?

Fivetran [will extract the raw order and customer tables](https://fivetran.com/docs/connectors/applications/shopify) from Shopify but with native values from Shopify’s API.

Littledata transforms into [Segment Ecommerce schema](https://segment.com/docs/connections/spec/ecommerce/v2/) which is more usable, including unnesting fields.

Here's a quick comparison:

| Feature              | Fivetran                               | Littledata + Segment                                 |
| -------------------- | -------------------------------------- | ---------------------------------------------------- |
| Sync frequency       | Daily (or less frequent)               | Real-time and hourly sync (with Segment Business)    |
| Data schema          | Native Shopify API fields              | Segment Ecommerce schema (unnested, analytics-ready) |
| Historic data import | Yes, but raw format                    | Yes, with enrichment and mapping to Segment schema   |
| Event enrichment     | No                                     | Yes, with ecommerce context and calculated traits    |
| Attribution tracking | No                                     | Built-in multi-touch attribution via Segment         |
| Identity resolution  | No                                     | Yes, via Segment Personas                            |
| Maintenance          | User responsible for connector updates | Managed, auto-updates for ecommerce changes          |

### Learn more

* See [how the Shopify to Segment connection works](/integrations/shopify-to-segment/how-it-works)
* View our Segment [tracking plan & event schema](https://docs.google.com/spreadsheets/d/1aljowRhMU9_7uGXmcipbP1Y14S4cOSdXGQA2Vx7BHko)
* [Get started with the connection](/integrations/shopify-to-segment/installation) on your store
* Read [Segment's source documentation](https://segment.com/docs/connections/sources/catalog/cloud-apps/shopify-littledata)


# Send data from Segment to BigQuery

In this article we will show you how to store your Segment data in BiqQuery. To do this, you need to follow a few steps:

1. Enable BigQuery for your Google Cloud project
2. Create a GCP service account for Segment to connect with
3. Create a warehouse in the Segment app

#### Create a Project and Enable BigQuery

1. Go to Google [Cloud Platform](https://console.cloud.google.com)

* If you don’t have a project already, [create one](https://support.google.com/cloud/answer/6251787?hl=en\&ref_topic=6158848)
* If you have an existing project, you will need to [enable the BigQuery API](https://cloud.google.com/bigquery/quickstart-web-ui). Once you’ve done so, you should see BigQuery in the “Resources” section of Cloud Platform

{% hint style="info" %}
Make sure [billing is enabled](https://support.google.com/cloud/answer/6293499#enable-billing) on your project, or Segment will not be able to write into the cluster.
{% endhint %}

3. Copy the project ID. You will need it when you create a warehouse source in the Segment app.

![](/files/WqrS24Mf1aDSp7hVJUvo)

#### Create a Service Account for Segment

Refer to [Google Cloud’s documentation about service accounts](https://cloud.google.com/iam/docs/creating-managing-service-accounts) for more information.

1. From the Navigation panel on the left, go to IAM & admin > Service accounts

   ![](/files/gsDyk6LwsOTdrbn7YMnc)
2. Click Create Service Account along the top
3. Enter a name for the service account (for example: “segment-warehouses”) and click Create
4. When assigning permissions, make sure to grant the following roles:

* BigQuery Data Owner
* BigQuery Job User

![](/files/OSLfGL50PCriKdLGwaGn)

![](/files/4x6fJuMml5ZHcrRjNs8v)

5. [Create a JSON key](https://cloud.google.com/iam/docs/creating-managing-service-account-keys). The contents of the downloaded file will be used to create your warehouse in the next section.

![](/files/7TdtHLvKlbjWnUQLRIki)

#### Create the Warehouse in Segment

1. In Segment, go to Workspace > Add destination > Search for “BigQuery” - it can be found in Storage Destinations

   ![](/files/Qtsfz588z4Y8lqxr90dN)
2. Select BigQuery
3. Add a name for the destination
4. Enter your project ID in the Project field

   ![](/files/ZyLdkf5ebY5GxgAc3Hym)
5. Copy the contents of the credentials (the JSON key) into the Credentials field *Optional*: Enter a [region code](https://cloud.google.com/compute/docs/regions-zones) in the Location field (the default will be “US”)

   ![](/files/YMzcYB4sUrHQ4GA8d4op)
6. Click **Connect**
7. If Segment can connect with the provided Project ID and Credentials, a warehouse will be created and your first sync should begin shortly

Once the data will reach BigQuery, under your project, you will be able to see a new dataset with multiple tables and partitioned tables (special tables that are divided into segments that make it easier to manage and query your data).

![](/files/v9J6r3S7ecycZRL3JjwA)


# How to send data from Segment to Google Analytics

Littledata's Segment app for Shopify stores makes it easy to track your site events and send the data to Segment. But how do you connect that data to GA?

Littledata's [Shopify source for Segment](/integrations/shopify-to-segment/how-it-works) makes it easy to track events on your site and send this data to Segment. But how do you connect that data to Google Analytics as a Segment destination? And how do you send events to Google Analytics 4 (GA4)?

There are two ways to send data to Google Analytics:

1. Connect directly to GA4 via Littledata
2. Connect to GA4 via Segment (adding Segment's Google Analytics 4 cloud destination *and* web destination)

### 1. Connecting directly to GA via Littledata

Littledata's [Shopify to GA4 connection](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4) is a complete tracking solution for GA4, and works alongside our Segment connection. You can add the GA4 connection directly from your Littledata dashboard.

Our Google Analytics (GA4) tracking for Shopify works automatically with server-side tracking to capture every order and a unique tracking method to stitch sessions together. This improves traffic reporting, channel reporting and marketing attribution, with the added benefit of custom dimensions for tracking customer lifetime value (LTV), purchase count, Shopify User ID, and more. Read more about [what you can track](/integrations/shopify-to-google-analytics/how-it-works-shopify-to-ga4) with Littledata for GA4.

Connecting to Google Analytics directly from Littledata is a paid add-on for Segment customers.

### 2. Connecting to GA4 via Segment

Some merchants will prefer to send data from Segment to Google Analytics. Setting up Google Analytics 4 as a destination in your Segment workspace requires an extra few steps.

#### Setting up the destinations in Segment

1. Add Segment's [Google Analytics 4 web destination](https://segment.com/docs/connections/destinations/catalog/actions-google-analytics-4-web). This will load the `gtag` library, and collect the pageviews (which [cannot be send server-side)](https://segment.com/docs/connections/destinations/catalog/actions-google-analytics-4/#migrating-from-universal-analytics-to-google-analytics-4)
2. Add Segment's [Google Analytics 4 cloud destination](https://segment.com/docs/connections/destinations/catalog/actions-google-analytics-4). This will map the server-side events on to GA4 (see below)

#### Mapping events to GA4

After you add Google Analytics 4 cloud destination to your workspace, including the Measurement ID and the API secret key to the destination's setting, you will have to map each Segment event to a corresponding GA4 event. Here is a quick guide on how to do that.

**Step 1**

In the Mappings tab of your GA4 destination, press the "+ New Mapping" button.

![mapping GA4 ecommerce events](/files/kLp6LXeIbtzz3XFligkZ)

**Step 2**

Segment already offers a number of preset events which you can use. You just have to select a predefined event and hit **Save**. You will have to map individually each one of the[ server-side events Littledata tracks.](/integrations/shopify-to-segment/how-it-works#server-side-events)

{% hint style="success" %}
You can map [the client-side events that Littledata tracks](/integrations/shopify-to-segment/how-it-works#device-mode-events) by following the steps outlined below.
{% endhint %}

Here is an example of the mapping for the Purchase event:

* Click on the **New Mapping** button and search for the purchase event:

![](/files/C5IVB2mA8f23HGzvO57h)

* Keep the **Select events to map and send** step as is\*\*:\*\*

![](/files/QQ6LTMSNL0MsJm9WJyHu)

* In the **Add Test Event** section, click on **Load Test Event from Source,** and paste the following mock event:

```
{
  "anonymousId": "7d2f31cf-12cd-4fe7-8b61-796b082f792d",
  "context": {
    "externalIds": [
      {
        "collection": "users",
        "encoding": "none",
        "id": "5451621433524",
        "type": "shopify_customer_id"
      }
    ],
    "integration": {
      "name": "shopify_littledata",
      "version": "9.1"
    },
    "ip": "109.166.139.0",
    "library": {
      "name": "analytics-node",
      "version": "6.2.0"
    },
    "page": {
      "url": "https://george-littledata.myshopify.com/57897812148/orders/b07de23de195ff866426b18bd8e6a95c/authenticate?key=edebaf51b8746e8b44714c6c9649209e"
    },
    "traits": {
      "address": {
        "city": "Bucharest",
        "country": "Romania",
        "postalCode": "030333",
        "state": "București"
      },
      "email": "mockEmail@littledata.io",
      "firstName": "John",
      "lastName": "Doe"
    },
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
    "userConsent": {
      "analytics": "no",
      "marketing": "no",
      "preferences": "no",
      "sale_of_data": ""
    }
  },
  "event": "Order Completed",
  "id": 5190210224308,
  "integrations": {
    "Google Analytics": {
      "clientId": "635000679.1691589098",
      "sessionId": "1691589165"
    }
  },
  "messageId": "node-e9241c5a0bfe61b173cae1fa1f13e1ff-b97ef265-0df8-42f3-9825-79ca1420b6b1",
  "originalTimestamp": "2023-08-09T13:55:11.696Z",
  "properties": {
    "action_source": "system_generated",
    "affiliation": "Shopify",
    "app_id": 580111,
    "cart_id": "ed496915e493c6f840aa326d3ebc546d",
    "category": "Shopify (Littledata)",
    "checkout_id": 30049366999220,
    "currency": "GBP",
    "email": "johndoe@littledata.io",
    "fbp": "fb.1.1691589233972.1542748812",
    "lifetime_revenue_littledata": "0.00",
    "order_id": "#1332",
    "presentment_amount": "1248.99",
    "presentment_currency": "GBP",
    "products": [
      {
        "brand": "george-littledata",
        "category": "Metallica",
        "compare_at_price": "1346.00",
        "image_url": "https://cdn.shopify.com/s/files/1/0578/9781/2148/products/NewFourHorsementTshirt.jpg?v=1667494039",
        "name": "Tricou cu Metallica",
        "presentment_amount": "1234.00",
        "presentment_currency": "GBP",
        "price": 1234,
        "product_id": "7306213753012",
        "quantity": 1,
        "shopify_product_id": "7306213753012",
        "shopify_variant_id": "42003742982324",
        "sku": "",
        "url": "https://george-littledata.myshopify.com/products/tricou-cu-metallica",
        "variant": "Default Title"
      }
    ],
    "purchase_count_littledata": 0,
    "sent_from": "Littledata app",
    "shipping": 14.99,
    "shopify_customer_id_littledata": 5451621433524,
    "source_name": "web",
    "subtotal": 1234,
    "tax": 0,
    "total": 1248.99
  },
  "receivedAt": "2023-08-09T13:55:11.967Z",
  "receivedDate": "2023-08-09T13:55:11.144Z",
  "sentAt": "2023-08-09T13:55:11.698Z",
  "shopID": "qZMKeB4Y6HRRgKkxs",
  "timestamp": "2023-08-09T13:55:11.965Z",
  "transaction": true,
  "type": "track",
  "userId": "5451621433524",
  "writeKey": "SbjsudVDtq96preF33MZ6UzxSttXrtRZ"
}
```

* In the **Select Mappings** section you will need to modify the following:

1. **Client ID -** Search for and select the **integrations.Google Analytics.clientId** value.

![](/files/9Sqk2cmhkf25h2fUpib0)

2. **User ID -** Search for and select the **userId** value.
3. Next, click on the **Show All Fields** button:

![](/files/p6odYX0JWS9rA5ty1LaK)

4. And look for the session\_id. Select the **integrations.Google Analytics.sessionId.**

![](/files/NDZOMyQ7gImQHgEapg4g)

5. Make sure you are entering **session\_id** as the key name.

![](/files/scYs8aJXpwP3raSSE1HB)

* And finally, in the **Send test event section,** you will see an example of how this event will look. Click on **Test Mapping** and you should see the **Test succeeded!** message.

![](/files/FmBhN3pZFVqs0f4WrI41)

![](/files/RCGfctwys85EjsPb62Yi)

* Click on **Save** and then make sure the mapping for the Purchase event is enabled.

![](/files/bicDBhiLkBLhmQtgfYlT)

**Step 3**

After you have mapped all your server-side events, you have to make sure that they are enabled. By default, after you finish mapping, they will be set to Disabled.

![GA4 event tracking for Shopify](/files/sFjlLk1HJR9JzVAg2azJ)




---

[Next Page](/llms-full.txt/1)

