Custom Conversions
Custom Conversions enable granular measurement and optimization by filtering standard Pixel or App events based on specific parameter values—without requiring additional client-side code changes.
Intro
Custom Conversions enable granular measurement, reporting, and now optimization (open beta) by filtering standard events based on specific parameter values. By defining rules (for example, Price > 50 or Item Category = 'Premium'), developers can segment standard Pixel or App events into distinct conversion actions without requiring additional code changes on the client side. Custom Conversion Rules should be created within Ads Manager first before sending events.
The parameters you match on come from the event you send via the Snap Pixel or the Conversions API. Rule keys use the Snap Pixel parameter names; if you send events via CAPI v3, some custom_data field names differ from the rule key — see the CAPI Parameter to Rule Key Mapping below.
Base URL: https://adsapi.snapchat.com/v1
Endpoints
Pixel CC Endpoint
Using a Pixel ID
{base_url}/pixels/{pixel_id}/custom_conversions
App CC Endpoint
Using a Snap App ID
{base_url}/mobile_apps/{app_id}/custom_conversions
Custom Conversion Endpoint
{base_url}/custom_conversions/{custom_conversion_id}
Custom Conversion Object
Each Custom Conversion object contains a name, description, event type, and the rules that need to be met.
{
"name": "Some Conversion Name",
"description": "Conversion from Landing Page A",
"event_type": "PURCHASE",
"rules": [
{...},
{...}
]
}
Rule Object
Each rule object contains a key, the values, and the operator.
{
"key": "EVENT_TAG",
"values": ["tag-1", "tag-7"],
"operator": "I_CONTAINS"
}
Custom Conversion Rule Keys
| Key | Type | Key | Type |
|---|---|---|---|
| event_tag | string | item_id | string |
| item_category | string | currency | string |
| search_string | string | sign_up_method | string |
| page_url | string | category | string |
| category_id | string | brand | string |
| delivery_method | string | customer_status | string |
| price | number | number_items | number |
CAPI Parameter to Rule Key Mapping
Custom Conversion rule keys match the Snap Pixel (SDK) parameter names. When you send events through the Conversions API (CAPI v3), several custom_data fields use different names than the rule key you match on. Map the field you send to the rule key you build the rule with:
| Custom Conversion rule key | CAPI v3 custom_data field | Snap Pixel (SDK) field |
|---|---|---|
| customer_status | status | customer_status |
| item_category | content_category | item_category |
| item_id | content_ids | item_ids |
| number_items | num_items | number_items |
| price | value (or contents[].item_price) | price |
| currency | currency | currency |
| search_string | search_string | search_string |
| sign_up_method | sign_up_method | sign_up_method |
| brand | brands | brands |
| delivery_method | contents[].delivery_category | delivery_method |
| event_tag | event_tag | event_tag |
| page_url | event_source_url | page_url |
You send custom_data.status in your CAPI payload, but you build the rule on customer_status. They refer to the same value — the API just uses a different field name than the rule key. The same pattern applies to content_category → item_category, content_ids → item_id, and num_items → number_items.
Custom Conversion Rule Operators
I_* indicates case insensitivity
| Rule | Type | Rule | Type |
|---|---|---|---|
| EQUAL_TO | string or number | NOT_EQUAL_TO | string or number |
| I_CONTAINS | string | I_NOT_CONTAINS | string |
| CONTAINS | string | NOT_CONTAINS | string |
| STARTS_WITH | string | I_STARTS_WITH | string |
| I_EQUAL_TO | string | I_NOT_EQUAL_TO | string |
| LESS_THAN | number | LESS_THAN_OR_EQUALS | number |
| GREATER_THAN | number | GREATER_THAN_OR_EQUALS | number |
End-to-End Example: Segment by Customer Status
This example creates a "New Customer Purchases" conversion by combining a CAPI event with a Custom Conversion rule.
Step 1 — Send the event with status in custom_data (CAPI v3):
{
"event_name": "PURCHASE",
"event_time": 1705423250,
"action_source": "WEB",
"event_source_url": "https://shop.example.com/checkout/success",
"event_id": "order-98765",
"user_data": {
"em": ["<sha256_lowercased_email>"],
"client_ip_address": "199.29.1.2",
"client_user_agent": "Mozilla/5.0 ...",
"sc_cookie1": "F340A595-07F1-4441-8BAA-85459CC674A2"
},
"custom_data": {
"currency": "USD",
"value": "142.52",
"order_id": "order-98765",
"content_ids": ["SKU1234"],
"content_category": "shoes",
"num_items": "1",
"status": "new"
}
}
Step 2 — Create the Custom Conversion, matching on the customer_status rule key:
Method: POST
Endpoint: {base_url}/pixels/{pixel_id}/custom_conversions
{
"custom_conversions": [
{
"name": "New Customer Purchases",
"description": "PURCHASE events where the customer is new",
"event_type": "PURCHASE",
"rules": [
{
"key": "customer_status",
"values": ["new"],
"operator": "I_EQUAL_TO"
}
]
}
]
}
Every PURCHASE event on this pixel whose custom_data.status equals new now counts toward this Custom Conversion, which can then be used for reporting and optimization.
Use a case-insensitive operator (I_EQUAL_TO, I_CONTAINS, …) unless the casing of your sent values and rule values is guaranteed to match — EQUAL_TO is case-sensitive.
Examples
Custom Conversions API Examples
Get Pixel Custom Conversions
- URL
- Example Response
Method: GET
Endpoint: {base_url}/pixels/{pixel_id}/custom_conversions
{
"request_status": "SUCCESS",
"request_id": "c33aa2b9-632a-4bf8-978c-c3f51ec911d8",
"paging": {},
"custom_conversions": [
{
"sub_request_status": "SUCCESS",
"custom_conversion": {
"id": "1234567891",
"event_source": {
"id": "a9650421-b387-4681-8954-a7c754627df6",
"type": "PIXEL"
},
"name": "Some Conversion Name",
"description": "Some optional description",
"event_type": "PURCHASE",
"rules": [
{
"key": "EVENT_TAG",
"values": ["tag-1"],
"operator": "I_CONTAINS"
}
]
}
}
]
}
Create A Pixel Custom Conversion
- URL
- Request
- Example Response
Method: POST
Endpoint: {base_url}/pixels/{pixel_id}/custom_conversions
{
"custom_conversions": [
{
"name": "Some Conversion Name",
"description": "Some optional description",
"event_type": "PURCHASE",
"rules": [
{
"key": "EVENT_TAG",
"values": ["tag-1"],
"operator": "I_CONTAINS"
}
]
}
]
}
{
"request_status": "SUCCESS",
"request_id": "c33aa2b9-632a-4bf8-978c-c3f51ec911d8",
"custom_conversions": [
{
"sub_request_status": "SUCCESS",
"custom_conversion": {
"id": "1234567891",
"event_source": {
"id": "a9650421-b387-4681-8954-a7c754627df6",
"type": "PIXEL"
},
"name": "Some Conversion Name",
"description": "Some optional description",
"event_type": "PURCHASE",
"rules": [
{
"key": "EVENT_TAG",
"values": ["tag-1"],
"operator": "I_CONTAINS"
}
]
}
}
]
}
Get App Custom Conversions
- URL
- Example Response
Method: GET
Endpoint: {base_url}/mobile_apps/{app_id}/custom_conversions
{
"request_status": "SUCCESS",
"request_id": "c33aa2b9-632a-4bf8-978c-c3f51ec911d8",
"paging": {},
"custom_conversions": [
{
"sub_request_status": "SUCCESS",
"custom_conversion": {
"id": "123456789",
"event_source": {
"id": "a9650421-b387-4681-8954-a7c754627df6",
"type": "MOBILE_APP"
},
"name": "Some Conversion Name",
"description": "Some optional description",
"event_type": "PURCHASE",
"rules": [
{
"key": "EVENT_TAG",
"values": ["tag-1"],
"operator": "I_CONTAINS"
}
]
}
}
]
}
Create an App Custom Conversion
- URL
- Request
- Example Response
Method: POST
Endpoint: {base_url}/mobile_apps/{app_id}/custom_conversions
{
"custom_conversions": [
{
"name": "Some Conversion Name",
"description": "Some optional description",
"event_type": "PURCHASE",
"rules": [
{
"key": "EVENT_TAG",
"values": ["tag-1"],
"operator": "I_CONTAINS"
}
]
}
]
}
{
"request_status": "SUCCESS",
"request_id": "c33aa2b9-632a-4bf8-978c-c3f51ec911d8",
"custom_conversions": [
{
"sub_request_status": "SUCCESS",
"custom_conversion": {
"id": "1234567891",
"event_source": {
"id": "a9650421-b387-4681-8954-a7c754627df6",
"type": "MOBILE_APP"
},
"name": "Some Conversion Name",
"description": "Some optional description",
"event_type": "PURCHASE",
"rules": [
{
"key": "EVENT_TAG",
"values": ["tag-1"],
"operator": "I_CONTAINS"
}
]
}
}
]
}
Get A Custom Conversions
- URL
- Example Response
Method: GET
Endpoint: {base_url}/custom_conversions/{custom_conversion_id}
{
"request_status": "SUCCESS",
"request_id": "c33aa2b9-632a-4bf8-978c-c3f51ec911d8",
"custom_conversions": [
{
"sub_request_status": "SUCCESS",
"custom_conversion": {
"id": "123456789",
"event_source": {
"id": "a9650421-b387-4681-8954-a7c754627df6",
"type": "PIXEL"
},
"name": "Some Conversion Name",
"description": "Some optional description",
"event_type": "PURCHASE",
"rules": [
{
"key": "EVENT_TAG",
"values": ["tag-1"],
"operator": "I_CONTAINS"
}
]
}
}
]
}
Delete A Custom Conversions
- URL
- Example Response
Method: DELETE
Endpoint: {base_url}/custom_conversions/{custom_conversion_id}
{
"request_status": "SUCCESS",
"request_id": "c33aa2b9-632a-4bf8-978c-c3f51ec911d8",
"custom_conversions": []
}