> 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/shopify-to-pinterest/how-it-works.md).

# How it works: Shopify to Pinterest

The events, customer parameters and market parameters Littledata sends from Shopify to Pinterest, in the browser and server-side.

This page lists what Littledata's Pinterest connection tracks for your Shopify store, and how browser and server-side events work together.

### What you can track

Littledata sends these client-side and server-side events to Pinterest by default.

#### Client-side events

| Event name   | Description                                         |
| ------------ | --------------------------------------------------- |
| PageVisit    | When the user views any page                        |
| ViewCategory | When the user lands on a product or collection page |
| AddToCart \* | When the user adds a product to cart                |
| Checkout \*  | 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                                                    |
| ---------- | -------------------------------------------------------------- |
| AddToCart  | When the user adds a product to cart                           |
| Checkout   | When the user places an order, including post-purchase upsells |

{% hint style="info" %}
Pinterest's Checkout event is the same as a purchase event.
{% endhint %}

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

### Enhanced match

[Turn on Enhanced Match](https://help.pinterest.com/en/business/article/enhanced-match) in Pinterest to get the most from Littledata's server-side events.

Littledata adds customer data to server-side events whenever it's available. How much data is available depends on what the shopper has shared, so the enhanced match rate varies by event. For example, your Pinterest event history might look like this:

| Event type | Number of events | Enhanced match |
| ---------- | ---------------- | -------------- |
| AddToCart  | 70               | 0 (0.0%)       |
| Checkout   | 39               | 39 (100.0%)    |

* **Checkout** events reach 100% because the shopper has entered their email, address and other details in the checkout.
* **AddToCart** events can be 0% when the shopper was not logged in, so no customer data was available.

#### Customer data for matching

Littledata sends these customer parameters with server-side events whenever they're available:

| Parameter     | Description         |
| ------------- | ------------------- |
| `em`          | Email               |
| `ph`          | Phone               |
| `fn`          | First name          |
| `ln`          | Last name           |
| `ct`          | City                |
| `st`          | State               |
| `zp`          | Zip code            |
| `country`     | Country code        |
| `external_id` | Shopify customer ID |

#### User agent and IP address

User agent and IP address also help Pinterest match events. The browser adds them to client-side events, and Littledata passes them on to server-side events too.

### How ad clicks are linked to purchases

When someone clicks a Pinterest ad, the link to your store includes an `epik` query parameter. When they land on your store, the Pinterest Tag saves it in the `_epik` cookie.

Littledata reads the `epik` value and sends it as the click ID with server-side events, so Pinterest can link the purchase back to the ad click.

The `epik` parameter is specific to Pinterest. It works like [`fbp` and `fbc` for Meta](https://help.littledata.io/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api) and [`ttp` and `ttclid` for TikTok](https://help.littledata.io/integrations/tiktok/how-it-works). Traffic from organic search, Google Ads and email campaigns doesn't include `epik`.

### Client-side and server-side tracking

The Pinterest Tag tracks events in the browser. It can be blocked by ad blockers and browser privacy controls such as ITP.

Server-side events are sent from Littledata's servers through Pinterest's API for conversions, so they still reach Pinterest when the browser tag is blocked. Pinterest links server events to your ad account and uses them for measurement, reporting and optimization, just like browser events.

### Custom parameters

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

| 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 Pinterest ad performance by Shopify market. For example, you can see which markets drive the most conversions, or build market-specific audiences for retargeting and dynamic product ads. 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="warning" %}
Server-side events sent to Pinterest don't include market parameters.
{% endhint %}

### Related articles

* [Shopify to Pinterest installation guide](https://help.littledata.io/integrations/shopify-to-pinterest/installation)
* [Littledata Pixel](https://help.littledata.io/sources/shopify/littledata-pixel)
* [Shopify Markets](https://help.littledata.io/sources/shopify-markets)
* [How it works: Shopify to TikTok](https://help.littledata.io/integrations/tiktok/how-it-works)
