# Snapchat Conversions API (Actions)

## Destination Info

* Accepts [Page](/docs/segment/connections/spec/page), [Alias](/docs/segment/connections/spec/alias), [Group](/docs/segment/connections/spec/group), [Identify](/docs/segment/connections/spec/identify), [Track](/docs/segment/connections/spec/track) calls.
* Refer to it as **Snap Conversions Api**, **Snap Conversions API**, **Snapchat Conversions API** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)
* This integration is **partner owned.** Please reach out to the partner's support for any issues.

The Snapchat Conversions API destination is a server-to-server integration with the [Snapchat Conversions API](https://marketingapi.snapchat.com/docs/conversion.html#conversions-api) that allows advertisers to pass web, app, and offline events from Segment directly to Snap. Data shared through the Snapchat Conversions API is processed similarly to events passed through the Snap Pixel or App Ads Kit (SDK). By passing events, advertisers can access post-view and post-swipe campaign reporting to measure performance and incrementality. Depending on the data shared and timeliness of integration, it's also possible to use events passed through the Conversions API for solutions like custom audience targeting, campaign optimization, Dynamic Ads, and more.

## Benefits of the Snapchat Conversions API

The Snapchat Conversions API destination provides the following benefits:

* **Clear mapping of data.** Actions-based destinations enable you to define the mapping between the data Segment receives from your source and the data Segment sends to Snap.
* **Prebuilt mappings.** Mappings for Snap event types, like `PURCHASE` and `ADD_CART`, are prebuilt with the prescribed parameters and available for customization.
* **Streamlined stability and security.** Integrate and iterate without client-side limitations, like network connectivity or ad blocker issues.
* **Privacy-focused.** Support compliance with rapidly evolving requirements with automatic PII hashing and flexible controls that let you adapt what data you share.
* **Data normalization.** Data is normalized before it is hashed to ensure the hashed value matches across sources and is in line with [Snap data requirements](https://marketingapi.snapchat.com/docs/conversion.html#conversions-api-concepts).
* **Maximum event measurement.** Capture more events with improved accuracy across different browsers, apps, and devices to get a unified view of your customer's journey from page view to purchase.

## Getting started

1. From the Segment web app, click **Catalog**, then click **Destinations**.
2. Search for "Snapchat Conversions API" in the Destinations Catalog, and select the destination.
3. Click **Add destination**.
4. Select the source that will send data to Snapchat Conversions API and follow the steps to name your destination.
5. On the **Settings** tab, authenticate with Snap using OAuth. Click **Connect to Snapchat Conversions API**. Follow the prompts to authenticate using OAuth, with a Snapchat login that is a member of the Snapchat Ads account you want to connect.
6. Add your [Snap Pixel ID](https://businesshelp.snapchat.com/s/article/pixel-website-install?language=en_US) *if you plan to send web or offline events*. *If you plan to send app events,* add your [Snap App ID](https://businesshelp.snapchat.com/s/article/snap-app-id?language=en_US​) and App ID.
7. Enable the destination and click **Save**.
8. Follow the steps in the Destinations Actions documentation on [Customizing mappings](/docs/segment/connections/destinations/actions/#customize-mappings).

> \[!WARNING]
>
> To send events to Snap, you **must** add a Pixel ID for web and offline conversions or a Snap App ID and App ID for mobile conversions. If missing, events will fail.

## Destination Settings

| Field       | Description                                                                                                                                                            | Required | Type   |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------ |
| App ID      | The unique ID assigned for a given application. It should be numeric for iOS, and the human interpretable string for Android. \*\*Required for app events\*\*.         | No       | string |
| Pixel ID    | The Pixel ID for your Snapchat Ad Account. \*\*Required for web and offline events\*\*.                                                                                | No       | string |
| Snap App ID | The Snap App ID associated with your app. This is a unique code generated in Snapchat Ads Manager and included in your MMP dashboard. \*\*Required for app events\*\*. | No       | string |

## Available Presets

Snapchat Conversions API has the following presets

| Preset Name         | Trigger                                                                                                            | Default Action          |
| ------------------- | ------------------------------------------------------------------------------------------------------------------ | ----------------------- |
| Share               | Event event = "Product Shared"                                                                                     | Report Conversion Event |
| Start Checkout      | Event event = "Checkout Started"                                                                                   | Report Conversion Event |
| Snap Browser Plugin | Event type = "track", Event  type = "identify", Event  type = "group", Event  type = "page", Event  type = "alias" | Snap Browser Plugin     |
| Add Billing         | Event event = "Payment Info Entered"                                                                               | Report Conversion Event |
| View Content        | Event event = "Product Viewed"                                                                                     | Report Conversion Event |
| Login               | Event event = "Signed In"                                                                                          | Report Conversion Event |
| App Open            | Event event = "Application Opened"                                                                                 | Report Conversion Event |
| Add to Cart         | Event event = "Product Added"                                                                                      | Report Conversion Event |
| Search              | Event event = "Products Searched"                                                                                  | Report Conversion Event |
| Purchase            | Event event = "Order Completed"                                                                                    | Report Conversion Event |
| App Install         | Event event = "Application Installed"                                                                              | Report Conversion Event |
| Page View           | Event type = "page"                                                                                                | Report Conversion Event |
| List View           | Event event = "Product List Viewed"                                                                                | Report Conversion Event |
| Add to Wishlist     | Event event = "Product Added to Wishlist"                                                                          | Report Conversion Event |
| Sign Up             | Event event = "Signed Up"                                                                                          | Report Conversion Event |

## Available Actions

Build your own Mappings. Combine supported [triggers](/docs/segment/connections/destinations/actions/#components-of-a-destination-action) with the following Snapchat Conversions API-supported actions:

> \[!NOTE]
>
> Individual destination instances have support a maximum of 50 mappings.

* [Report Conversion Event](#report-conversion-event)
* [Snap Browser Plugin](#snap-browser-plugin)

### Report Conversion Event

Report events directly to Snapchat. Data shared can power Snap solutions such as custom audience targeting, campaign optimization, Dynamic Ads, and more.

Report Conversion Event is a **Cloud** action.

| Field                                 | Description                                                                                                                                                                                                                                                                                                                                                                                 | Required | Type    |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
| Event Name                            | The conversion event type. For custom events, you must use one of the predefined event types (i.e. CUSTOM\_EVENT\_1). Please refer to the possible event types in \[Snapchat Marketing API docs]\(https://marketingapi.snapchat.com/docs/conversion.html#conversion-parameters).                                                                                                            | No       | STRING  |
| Event ID                              | If you are reporting events via more than one method (Snap Pixel, App Ads Kit, Conversions API) you should use the same event\_id across all methods. Please refer to the \[Snapchat Marketing API docs]\(https://marketingapi.snapchat.com/docs/conversion.html#deduplication) for information on how this field is used for deduplication against Snap Pixel SDK and App Adds Kit events. | No       | STRING  |
| Event Timestamp                       | The Epoch timestamp for when the conversion happened. The timestamp cannot be more than 7 days in the past.                                                                                                                                                                                                                                                                                 | No       | STRING  |
| Action Source                         | This field allows you to specify where your conversions occurred.                                                                                                                                                                                                                                                                                                                           | No       | STRING  |
| User Data                             | These parameters are a set of identifiers Snapchat can use for targeted attribution. You must provide at least one of the following parameters in your request.                                                                                                                                                                                                                             | No       | OBJECT  |
| App Data                              | These fields support sending app events to Snapchat through the Conversions API.                                                                                                                                                                                                                                                                                                            | No       | OBJECT  |
| Custom Data                           | The custom data object can be used to pass custom properties.                                                                                                                                                                                                                                                                                                                               | No       | OBJECT  |
| Data Processing Options               | The Data Processing Options to send to Snapchat. If set to true, Segment will send an array to Snapchat indicating events should be processed with Limited Data Use (LDU) restrictions.                                                                                                                                                                                                     | No       | BOOLEAN |
| Data Processing Country               | A country that you want to associate to the Data Processing Options. Accepted values are 1, for the United States of America, or 0, to request that Snapchat geolocates the event using IP address. This is required if Data Processing Options is set to true. If nothing is provided, Segment will send 0.                                                                                | No       | NUMBER  |
| Data Processing State                 | A state that you want to associate to the Data Processing Options. Accepted values are 1000, for California, or 0, to request that Snapchat geolocates the event using IP address. This is required if Data Processing Options is set to true. If nothing is provided, Segment will send 0.                                                                                                 | No       | NUMBER  |
| Event Source URL                      | The URL of the web page where the event took place.                                                                                                                                                                                                                                                                                                                                         | No       | STRING  |
| Products                              | Use this field to send details of mulitple products / items. This field overrides individual 'Item ID', 'Item Category' and 'Brand' fields. Note: total purchase value is tracked using the 'Price' field                                                                                                                                                                                   | No       | OBJECT  |
| \[Deprecated] Brand                   | \[Deprecated] Use Products field.                                                                                                                                                                                                                                                                                                                                                           | No       | STRING  |
| \[Deprecated] Click ID                | Deprecated. Use User Data sc\_click\_id field.                                                                                                                                                                                                                                                                                                                                              | No       | STRING  |
| \[Deprecated] Client Deduplication ID | Deprecated. Use Event ID field.                                                                                                                                                                                                                                                                                                                                                             | No       | STRING  |
| \[Deprecated] Currency                | Deprecated. Use Custom Data currency field.                                                                                                                                                                                                                                                                                                                                                 | No       | STRING  |
| \[Deprecated] Description             | Deprecated. No longer supported.                                                                                                                                                                                                                                                                                                                                                            | No       | STRING  |
| \[Deprecated] Device Model            | Deprecated. Use App Data deviceName field.                                                                                                                                                                                                                                                                                                                                                  | No       | STRING  |
| \[Deprecated] Email                   | Deprecated. Use User Data email field. If not hashed, Segment will hash this value.                                                                                                                                                                                                                                                                                                         | No       | STRING  |
| \[Deprecated] Event Conversion Type   | Deprecated. Use Action Source field.                                                                                                                                                                                                                                                                                                                                                        | No       | STRING  |
| \[Deprecated] Event Tag               | Deprecated. No longer supported.                                                                                                                                                                                                                                                                                                                                                            | No       | STRING  |
| \[Deprecated] Event Type              | Deprecated. Use Event Name field.                                                                                                                                                                                                                                                                                                                                                           | No       | STRING  |
| \[Deprecated] Identifier for Vendor   | Deprecated. Use User Data idfv field.                                                                                                                                                                                                                                                                                                                                                       | No       | STRING  |
| \[Deprecated] IP Address              | Deprecated. Use User Data client\_ip\_address field.                                                                                                                                                                                                                                                                                                                                        | No       | STRING  |
| \[Deprecated] Item Category           | Deprecated. Use products field.                                                                                                                                                                                                                                                                                                                                                             | No       | STRING  |
| \[Deprecated] Item ID                 | Deprecated. Use products field.                                                                                                                                                                                                                                                                                                                                                             | No       | STRING  |
| \[Deprecated] Level                   | Deprecated. No longer supported.                                                                                                                                                                                                                                                                                                                                                            | No       | STRING  |
| \[Deprecated] Mobile Ad Identifier    | Deprecated. Use User Data madid field.                                                                                                                                                                                                                                                                                                                                                      | No       | STRING  |
| \[Deprecated] Number of Items         | Deprecated. Use Custom Data num\_items field.                                                                                                                                                                                                                                                                                                                                               | No       | STRING  |
| \[Deprecated] OS Version              | Deprecated. Use App Data version field.                                                                                                                                                                                                                                                                                                                                                     | No       | STRING  |
| \[Deprecated] Page URL                | Deprecated. Use Event Source URL field.                                                                                                                                                                                                                                                                                                                                                     | No       | STRING  |
| \[Deprecated] Phone Number            | Deprecated. Use User Data phone field. If not hashed, Segment will hash this value.                                                                                                                                                                                                                                                                                                         | No       | STRING  |
| \[Deprecated] Price                   | Deprecated. Use Custom Data value field.                                                                                                                                                                                                                                                                                                                                                    | No       | NUMBER  |
| \[Deprecated] Search String           | Deprecated. Use Custom Data search\_string field.                                                                                                                                                                                                                                                                                                                                           | No       | STRING  |
| \[Deprecated] Sign Up Method          | Deprecated. Use Custom Data sign\_up\_method field.                                                                                                                                                                                                                                                                                                                                         | No       | STRING  |
| \[Deprecated] Event Timestamp         | Deprecated. Use Event Timestamp field.                                                                                                                                                                                                                                                                                                                                                      | No       | STRING  |
| \[Deprecated] Transaction ID          | Deprecated. Use Custom Data order\_id field.                                                                                                                                                                                                                                                                                                                                                | No       | STRING  |
| \[Deprecated] User Agent              | Deprecated. Use User Data client\_user\_agent field.                                                                                                                                                                                                                                                                                                                                        | No       | STRING  |
| \[Deprecated] uuid\_c1 Cookie         | Deprecated. Use User Data sc\_cookie1 field.                                                                                                                                                                                                                                                                                                                                                | No       | STRING  |

### Snap Browser Plugin

Enriches all Segment payloads with Snap click\_id Querystring and \_scid Cookie values

Snap Browser Plugin is a **Web** action. The default Trigger is `type = "track" or type = "identify" or type = "page" or type = "group" or type = "alias"`

This action does not have any fields.

## FAQ and Troubleshooting

### Update conversion tracking defaults

By default, all mappings are sent as `WEB` conversions. If you want to send events as mobile or offline conversions, update the Event Conversion Type in each mapping to be `MOBILE_APP` or `OFFLINE`.

### Invalid token error

If you're experiencing 400 Bad Requests errors related to an invalid token, follow [these instructions](/docs/segment/connections/destinations/catalog/actions-snap-conversions/#getting-started) to reauthorize your account:

1. On the **Settings** tab, authenticate with Snap using OAuth.
2. Click **Connect to Snapchat Conversions API**.
3. Follow the prompts to authenticate using OAuth with a Snapchat login. Use a Snapchat login that is a member of the Snapchat Ads account you want to connect.

### Deduplication with the Snap Pixel or App Ads Kit (SDK)

There are many ways to send conversion data to Snap, including through the Snap Pixel, App Ads Kit or Conversions API. Snap recommends sending redundant data across sources to ensure the best optimization, targeting, and measurement capabilities. The Client Deduplication ID, Transaction ID, and Mobile Ad Identifier are used by Snap to deduplicate events across sources. Please see below for guidance on when to use each field for deduplication.

* **Web**: Snap Conversions API and PixeI
  * Use the Client Deduplication ID for unique events
  * Use Transaction ID and Price for `PURCHASE` events
* **Mobile**: Any combination of Snap Conversions API, MMP, or App Ads Kit
  * Use a Mobile Ad Identifier
  * Use Transaction ID for `PURCHASE` events
* **Offline**: Snap Conversions API and UI Upload
  * Use the Client Deduplication ID for unique events
  * Use Transaction ID and Price for `PURCHASE` events

The Client Deduplication ID allows for a 48-hour deduplication window. The Transaction ID is only eligible for `PURCHASE` events and allows for a 30-day deduplication window. See Snapchat's [Marketing API documentation](https://marketingapi.snapchat.com/docs/conversion.html#deduplication) and [Business Help Center](https://businesshelp.snapchat.com/s/article/event-deduplication?language=en_US) for more information.

> \[!NOTE]
>
> Segment does not have client-side destinations for the Snap Pixel or Snap App Ads Kit (SDK). If you choose to integrate client-side, these must be implemented natively. See Snapchat's [Install Snap Pixel](https://businesshelp.snapchat.com/s/article/pixel-website-install?language=en_US) and [App Ads Kit](https://businesshelp.snapchat.com/s/topic/0TO0y000000YmidGAC/app-ads-kit?language=en_US) for implementation details.

### Latency

It may take up to 1-hour for events to appear in the Snapchat [Events Manager](https://businesshelp.snapchat.com/s/article/events-manager?language=en_US).

### Other events

If you want to send a Snap Event Type that Segment doesn't have a prebuilt mapping for, you can use the Report Conversion Event action to send the event. For example, if you want to send a `START_TRIAL` event:

1. Create a mapping for Report Conversion Event.
2. Set up your Event Trigger criteria for trial starts.
3. Input a literal string of "START\_TRIAL" as the Event Type.

The Snapchat Conversions API only supports sending Event Types that are in the [predefined `event_type` list](https://marketingapi.snapchat.com/docs/conversion.html#conversion-parameters). This includes custom events. You must use `CUSTOM_EVENT_1`, `CUSTOM_EVENT_2`, `CUSTOM_EVENT_3`, `CUSTOM_EVENT_4`, or `CUSTOM_EVENT_5` as the Event Type. Events sent with an invalid event type will fail with an `Unrecognized event type` error.

### Single or multiple products or items

It's possible to send details of either single or multiple products/items in a single conversion event.

* **Single product/item**: Use the "Item ID", "Item Category" and "Brand" fields.
* **Multiple products/items**: Use the "Products" field which accepts an array of products / items.

### Specifying the total value of a purchase

The "Price" field should be used when specifying the total value of a purchase, and should contain a numeric value only: for example, 99.5.

### Required parameters and hashing

To match visitor events with Snapchat ads, Snap requires that one or a combination of the following parameters are sent to the Conversions API:

* Email
* Phone Number
* Mobile Ad Identifier
* IP Address and User Agent

When possible, Snap also recommends passing other parameters to improve performance. Please see Snapchat's [Marketing API documentation](https://marketingapi.snapchat.com/docs/conversion.html#parameters-for-event-type-platform) for more details. These parameters can be configured under each Mapping.

In addition, Segment creates a SHA-256 hash of the following fields before sending to Snap:

* Email
* Mobile Ad Identifier (IDFA or AAID)
* Identifier for Vendor (IDFV)
* Phone Number
* IP Address

> \[!WARNING]
>
> If you hash identifiers upstream before sending to Segment, Segment still hashes that data before sending to Snap. This results in a double hash that won't be able to be matched on. Please ensure your fields are not hashed prior to sending through the Snapchat Conversions API destination.

## Support

The Snap team owns and maintains the Snapchat Conversions API destination.

* For general Segment questions, including issues with event data not being sent to the Snapchat Events Manager, please contact [Segment support](https://segment.com/help/).
* For questions regarding campaign setup and performance, audience targeting, or additional API functionality, please contact your Snap representative.
