> For the complete documentation index, see [llms.txt](https://help.littledata.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.littledata.io/integrations/tiktok/how-it-works.md).

# How it works: Shopify to TikTok

This page lists what Littledata's TikTok connection tracks for Shopify and Shopify Plus stores, and how browser and server-side events work together.

### What you can track

All events below are tracked by default. You can choose which events to send on the **Tracked events** step when you set up the connection, or later in the [Event Editor](https://help.littledata.io/event-editor/enable-disable-events).

<figure><img src="https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-87afda5db7d2026204b0df18056e79eb78d7dbb1%2Fhc-tiktok-event-editor-events.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Client-side events

| Event name           | Description                                      |
| -------------------- | ------------------------------------------------ |
| Page View            | When the user views any page                     |
| View Content         | When the user lands on a product page            |
| Add To Cart \*       | When the user adds a product to cart             |
| Initiate Checkout \* | When the checkout has been started               |
| Add Payment Info \*  | When the user lands on the payment checkout step |
| Complete Payment \*  | When the user places an order                    |

\* Only for stores with the [Littledata Pixel](https://help.littledata.io/sources/shopify/littledata-pixel) connected.

#### Server-side events

| Event name        | Description                                                    |
| ----------------- | -------------------------------------------------------------- |
| Add To Cart       | When the user adds a product to cart                           |
| Initiate Checkout | When the checkout has been started                             |
| Add Payment Info  | When the user lands on the payment checkout step               |
| Complete Payment  | When the user places an order, including post-purchase upsells |
| Subscribe         | When a recurring subscription order is created                 |

{% hint style="info" %}
Littledata only sends standard ecommerce events that TikTok's Events API supports. Contact us if you'd like to track other events, such as remove from cart, view item list or refunds.
{% endhint %}

For a full list of events, triggers and parameters, see the [TikTok tracking schema](https://docs.google.com/spreadsheets/d/1UQNP5Pbxg3I34fYO_460IPaMmn_f8uMvCH_XcV3BNGE/edit#gid=277331750).

### ttp and ttclid parameters

`ttp` (the TikTok cookie ID) and `ttclid` (the TikTok click ID) are the most important parameters for matching. They work like Meta's [`fbp` and `fbc`](https://help.littledata.io/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api).

They are vital for attribution, so Littledata adds them to server-side events whenever they're available.

### Customer data for matching

To match events across sessions and devices, TikTok needs some customer data. Littledata sends these parameters with server-side events whenever they're available:

* `external_id` (the Shopify customer ID)
* `email`
* `phone`
* `ip`
* `user_agent`

### Client-side (browser) tracking

The TikTok Pixel tracks visitor activity in the browser. Conversions it tracks show up in [TikTok Business Center](https://ads.tiktok.com/help/article/tiktok-business-center). There you can measure your ads, build custom audiences and look at your conversion funnel.

{% hint style="info" %}
Littledata doesn't change your pixel setup in TikTok Business Center.
{% endhint %}

If you use the TikTok Pixel included in this connection, disable data sharing in the TikTok sales channel to avoid duplicate events (see below).

### Server-side tracking

Server-side tracking captures what happens in your store, including checkout steps and purchases, even when the TikTok Pixel is blocked by ad blockers, ITP or iOS restrictions. Littledata sends these events through TikTok's Events API and links them to your TikTok Pixel events.

Server-side events are tied to your TikTok Pixel ID. TikTok processes them like browser events, so they count in measurement, reporting and optimization in the same way.

{% hint style="info" %}
TikTok may show a message that a pixel was set up manually and suggest Shopify's one-click setup. You can ignore it. It just means you're using Littledata's connection instead of the default Shopify one.
{% endhint %}

### Disable data sharing in the TikTok sales channel

If you have the TikTok sales channel installed, turn off its customer data sharing. This avoids duplicate tracking.

{% stepper %}
{% step %}

#### Open the TikTok sales channel

In your Shopify admin, click **TikTok** under **Sales channels**.
{% endstep %}

{% step %}

#### Open Settings

Click **Settings**.
{% endstep %}

{% step %}

#### Go to Data sharing

Click **Data sharing**.
{% endstep %}

{% step %}

#### Disconnect the pixel

Under **Customer Data Sharing**, click **Disconnect** next to your pixel.
{% endstep %}

{% step %}

#### Confirm

In the **Disconnect Pixel tracking?** window, click **Disconnect**.
{% endstep %}
{% endstepper %}

### Custom parameters

Littledata adds these parameters to client-side (browser) events sent to TikTok:

| Parameter       | Description                                                                                                        |
| --------------- | ------------------------------------------------------------------------------------------------------------------ |
| `market_handle` | The handle of the Shopify market for this event. Set to `unassigned_market` for events not attributed to a market. |
| `market_id`     | The internal Shopify market ID for this event. Set to `0` for events not attributed to a market.                   |

### Market parameters in Littledata events

The market parameters let you analyze campaign performance by Shopify market. For example, you can compare conversion rates across regions, build market-specific audiences for retargeting, or plan ad budgets per market. This needs Shopify Markets to be active on your store, but you don't need to set up anything per market in Littledata.

{% hint style="info" %}
Server-side events sent to TikTok don't include market parameters.
{% endhint %}

### Related articles

* [Shopify to TikTok installation guide](https://help.littledata.io/integrations/tiktok/installation)
* [Littledata Pixel](https://help.littledata.io/sources/shopify/littledata-pixel)
* [Enable or disable events](https://help.littledata.io/event-editor/enable-disable-events)
