# How server-side tracking works

## Client-side (browser) tracking

During the automatic [installation process](https://github.com/littledata/helpcenter-content/blob/main/posts/littledata-shopify-install-guide/README.md), 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.md).
* A minified tracking script, loaded via Littledata's [app embed](/advanced/developer/littledata-app-embed-how-it-works.md) 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 authorised 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.md)
* [Google Ads](/integrations/google-ads/google-ads-how-it-works.md)
* [Meta Ads](/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api.md)
* [TikTok Ads](/integrations/tiktok/how-it-works.md)
* [Pinterest](/integrations/shopify-to-pinterest/how-it-works.md)
* [Klaviyo](/integrations/shopify-klaviyo/how-it-works-shopify-to-klaviyo.md)
* [Attentive](/integrations/attentive/how-it-works-shopify-to-attentive.md)

## 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        |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.littledata.io/get-started/how-server-side-tracking-works.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
