> For the complete documentation index, see [llms.txt](https://docs.chord.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chord.co/activate/event-streaming/destinations/advertising/snap/snap-pixel.md).

# Snap Pixel

**Snap Pixel** is Snapchat's conversion tracking pixel for measuring ad performance and building retargeting audiences. This destination loads the Snapchat Pixel JavaScript SDK in the browser and forwards ecommerce and engagement events to Snapchat Ads. For server events, add the [Snap Conversions API](/activate/event-streaming/destinations/advertising/snap/snap-conversions-api.md) destination. See [Snap](/activate/event-streaming/destinations/advertising/snap.md) for how the two fit together.

## Getting started

Chord loads the Snapchat Pixel for you, so you don't install any script.

You need your Snapchat Pixel ID, found in Snapchat Ads Manager under **Events Manager > Snap Pixel**.

## Settings

* **Destination Name** (required): a name to tell this destination apart.
* **Snap Pixel ID** (required): your Snapchat Pixel ID.
* **Product Content ID Field** (required): which product field to send as `item_id`: `variant_id`, `sku` or `product_id`. Defaults to `sku`. It must match the Item ID in your Snap catalog, and it must be the same on the Snap Conversions API destination. For Shopify stores that use the native catalog sync, use `variant_id`. If the chosen field is missing on a product, Chord falls back through `sku`, `variant_id`, `product_id` and `id`.
* **Consent Requirements** (optional): the consent categories a visitor must accept before Chord sends data to this destination. See [Consent](/activate/event-streaming/consent.md).

## Connect

Add **Snap Pixel** from the destination catalog, using the settings above. See [Connect a destination](/activate/event-streaming/connect-a-destination.md) for the full steps.

## Event mapping

All Snap Pixel events include a `client_dedup_id` parameter set to the Chord `messageId` for deduplication. See [Snap](/activate/event-streaming/destinations/advertising/snap.md) for how the two versions deduplicate.

| Chord event                                                                             | Snap event                                                               | Notes |
| --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | ----- |
| `page`                                                                                  | `PAGE_VIEW`                                                              |       |
| [`Order Completed`](/collect-data/tracking-plan/order-completed.md)                     | `PURCHASE`                                                               |       |
| [`Product Added`](/collect-data/tracking-plan/product-added.md)                         | `ADD_CART`                                                               |       |
| [`Product Viewed`](/collect-data/tracking-plan/product-viewed.md)                       | `VIEW_CONTENT`                                                           |       |
| [`Checkout Started`](/collect-data/tracking-plan/checkout-started.md)                   | `START_CHECKOUT`                                                         |       |
| [`Subscription Created`](/collect-data/tracking-plan/subscription-created.md)           | `SUBSCRIBE`                                                              |       |
| [`Products Searched`](/collect-data/tracking-plan/products-searched.md)                 | `SEARCH`                                                                 |       |
| [`Payment Info Entered`](/collect-data/tracking-plan/payment-info-entered.md)           | `ADD_BILLING`                                                            |       |
| [`Product Added to Wishlist`](/collect-data/tracking-plan/product-added-to-wishlist.md) | `ADD_TO_WISHLIST`                                                        |       |
| [`Signed Up`](/collect-data/tracking-plan/signed-up.md)                                 | `SIGN_UP`                                                                |       |
| `identify`                                                                              | `snaptr("init")` again, with user data. No conversion event is sent      |       |
| *(any other track event)*                                                               | Skipped, with a console warning. Snap accepts only a fixed set of events |       |

## Page events

**Snap SDK call:** `snaptr("track", "PAGE_VIEW", { client_dedup_id })`

No additional attributes are sent with page events.

## Identify events

Re-initializes the Snap Pixel with user data for enhanced matching. The event is skipped if neither email nor phone is available.

**Snap SDK call:** `snaptr("init", pixelId, userData)`

| Chord source (priority order)                                | Snap field          | Notes                  |
| ------------------------------------------------------------ | ------------------- | ---------------------- |
| `properties.email` > `context.traits.email` > `traits.email` | `user_email`        | Omitted if not present |
| `properties.phone` > `context.traits.phone` > `traits.phone` | `user_phone_number` | Omitted if not present |

## Order Completed

Fires a purchase conversion event with order and product data. An Order Completed with no products is skipped, with a console warning, so an empty cart never reports a purchase.

**Snap SDK call:** `snaptr("track", "PURCHASE", orderData)`

| Chord source (priority order)                                                                                     | Snap field       | Notes                                                        |
| ----------------------------------------------------------------------------------------------------------------- | ---------------- | ------------------------------------------------------------ |
| Each product's configured field → `sku` → `variant_id` → `product_id` → `id`                                      | `item_ids`       | Array of products with a resolvable ID; omitted if empty     |
| `properties.products[0].category`                                                                                 | `item_category`  | First product's category                                     |
| `properties.currency` > `properties.meta.i18n.currency`                                                           | `currency`       | Defaults to `"USD"`                                          |
| `properties.value` > `properties.total` > `properties.price`, then the sum of each product's price times quantity | `price`          | Total value after quantity; formatted to 2 decimal places    |
| `properties.order_id` > `properties.orderId` > `properties.id` > `properties.cart_id`                             | `transaction_id` | Used by Snapchat to deduplicate against CAPI Purchase events |
| Count of products with a resolvable ID                                                                            | `number_items`   |                                                              |

## Product Added

Fires an add-to-cart event using the product. Root-level `properties` are preferred (canonical for single-product events); `properties.products[0]` is used as a fallback when root-level product fields are absent.

**Snap SDK call:** `snaptr("track", "ADD_CART", productData)`

| Chord source (priority order)                                                                                     | Snap field      | Notes                                                     |
| ----------------------------------------------------------------------------------------------------------------- | --------------- | --------------------------------------------------------- |
| First product's configured field → `sku` → `variant_id` → `product_id` → `id`                                     | `item_ids`      | Single-element array; event skipped if no ID resolves     |
| `properties.category` > `properties.products[0].category`                                                         | `item_category` |                                                           |
| `properties.currency` > `properties.meta.i18n.currency`                                                           | `currency`      | Defaults to `"USD"`                                       |
| `properties.value` > `properties.total` > `properties.price`, then the sum of each product's price times quantity | `price`         | Total value after quantity; formatted to 2 decimal places |

## Product Viewed

Same attributes as **Product Added** above.

**Snap SDK call:** `snaptr("track", "VIEW_CONTENT", productData)`

## Checkout Started

Same attributes as **Order Completed** above.

**Snap SDK call:** `snaptr("track", "START_CHECKOUT", orderData)`

## Subscription Created

Same attributes as **Order Completed** above.

**Snap SDK call:** `snaptr("track", "SUBSCRIBE", orderData)`

## Products Searched

**Snap SDK call:** `snaptr("track", "SEARCH", searchData)`

| Chord source (priority order)                   | Snap field      | Notes |
| ----------------------------------------------- | --------------- | ----- |
| `properties.query` > `properties.search_string` | `search_string` |       |

## Payment Info Entered

No additional attributes beyond the dedup ID.

**Snap SDK call:** `snaptr("track", "ADD_BILLING", { client_dedup_id })`

## Product Added to Wishlist

Same attributes as **Product Added** above.

**Snap SDK call:** `snaptr("track", "ADD_TO_WISHLIST", productData)`

## Signed Up

No additional attributes beyond the dedup ID.

**Snap SDK call:** `snaptr("track", "SIGN_UP", { client_dedup_id })`

## Custom property forwarding

Chord sends every other property on the event with Order Completed, Product Added, Product Viewed, Checkout Started and Subscription Created, except `email`, `phone`, `phone_number`, `first_name`, `last_name`, `firstName`, `lastName` and `phoneNumber`. This includes properties you add with destination mappings in Chord. If a property has the same name as a field in the tables above, Chord's value wins when Chord computes one. When Chord has no value for that field, such as an event with no products, your mapped value is sent as is. The deduplication ID always comes from Chord.

Other events send only the attributes listed for them.

## Initialization

Chord loads `https://sc-static.net/scevent.min.js` and calls `snaptr("init", pixelId)`, optionally with `user_email` and `user_phone_number` if the first event has them. Before the script loads, a queue buffers any calls to `snaptr`. If the script fails to load, later events are silently dropped.

## CSP requirements

If your site uses a Content Security Policy, allow the following domains:

| Directive     | Domain                  |
| ------------- | ----------------------- |
| `script-src`  | `https://sc-static.net` |
| `connect-src` | `https://sc-static.net` |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.chord.co/activate/event-streaming/destinations/advertising/snap/snap-pixel.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
