How it works: Headless Shopify
If you're running a headless Shopify storefront, ensuring accurate data collection can be challenging. Littledata’s Advanced tracking script provides seamless, client-side tracking that works alongside your existing setup—so you get reliable analytics and marketing data, no matter how your store is built.
This feature is available only for Pro, Plus and Enterprise customers. For this to work, you also need your headless store and checkout to have the same domain.
How it works
Littledata’s Advanced Tracking Script ensures seamless and accurate tracking for headless Shopify stores by capturing key marketing and analytics identifiers and securely passing them to our data pipeline. This allows us to correctly attribute customer actions across sessions and devices, ensuring reliable server-side tracking.
Setup requirements
For this solution to work, your store must meet the following criteria:
-
Headless Shopify storefront – Works with any frontend framework (Hydrogen, Next.js, etc.)
-
Checkout has to be on same root domain – Your storefront and checkout must share a domain (e.g.,
store.domain.com
andcheckout.domain.com
).
Shopify-hosted checkout won’t work – If checkout remains on store.myshopify.com, our tracking script will not function properly and tracking quality will be degraded.
Supported destinations
Once set up, our script enhances tracking for the following server-side integrations:
-
Google Analytics 4 (GA4)
-
Google Ads
-
Meta Conversions API (CAPI)
-
TikTok Events API
-
Pinterest Conversions API
This solution complements your storefront tracking by capturing all relevant marketing identifiers that are often missed, ensuring complete and consistent data across both environments.
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 |
What you can track
Here is a full list of events you can track. All these events are tracked server-side, to ensure a complete and more accurate funnel:
Event name | Connection |
---|---|
begin_checkout | Google Analytics 4 |
add_shipping_info | Google Analytics 4 |
add_payment_info | Google Analytics 4 |
purchase | Google Analytics 4* |
conversion | Google Ads |
Checkout Started | Segment |
Checkout Step Viewed | Segment |
Checkout Step Completed | Segment |
Payment Info Entered | Segment |
Order completed | Segment* |
Initiate Checkout | Meta Conversions API |
Add Payment Info | Meta Conversions API |
Purchase | Meta Conversions API* |
Checkout | Pinterest Conversions API |
Initiate Checkout | Tiktok Events API |
Add Payment Info | Tiktok Events API |
Complete Payment | Tiktok Events API* |
*Includes subscriptions, upsells, drafts and orders from 3rd party integrations