Snapchat Conversions API
Datafly Signal delivers events to Snapchat server-to-server using the Snapchat Conversions API (CAPI). This provides reliable conversion tracking for Snapchat ad campaigns without depending on the Snap Pixel client-side script.
API Endpoint
POST https://tr.snapchat.com/v2/conversionEvents are sent as JSON with authentication via the Authorization: Bearer header.
Configuration
| Field | Required | Description |
|---|---|---|
pixel_id | Yes | Your Snap Pixel ID. Found in Snapchat Ads Manager > Events Manager. |
access_token | Yes | Conversions API access token. Generate in Snapchat Ads Manager > Events Manager > Conversions API setup. |
Management UI Setup
- Go to Integrations > Add Integration > Snapchat Conversions API.
- Enter your
pixel_idandaccess_token. - Select consent categories (typically
advertising). - Click Save.
Management API Setup
curl -X POST http://localhost:8084/v1/admin/integrations \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"source_id": "src_abc123",
"vendor": "snapchat",
"name": "Snapchat Conversions",
"enabled": true,
"config": {
"pixel_id": "your_pixel_id",
"access_token": "your_access_token"
},
"consent_categories": ["advertising"]
}'Identity Signals
Snapchat uses multiple identity signals to match server events to Snapchat user profiles.
| Signal | Field | Description |
|---|---|---|
_scid | hashed_sc_cookie | Snapchat browser cookie ID. Datafly Signal self-generates this as a UUID and stores it as a first-party cookie. |
ScCid | click_id | Snapchat click ID. Automatically extracted from the ScCid URL parameter when a user clicks a Snapchat ad. |
ip_address | hashed_ip_address | Visitor’s IP address, hashed with SHA-256. |
user_agent | user_agent | Visitor’s User-Agent string, forwarded from the original request. |
User-Provided Signals (Hashed)
When user data is available via _df.identify(), the following fields are SHA-256 hashed before sending to Snapchat:
| Signal | Hashing | Description |
|---|---|---|
hashed_email | SHA-256, lowercase, trimmed | User’s email address |
hashed_phone_number | SHA-256, E.164 format | User’s phone number (e.g. +15551234567) |
All PII hashing is performed server-side by the Delivery Worker. Raw PII never leaves your infrastructure.
Event Mapping
| Datafly Event | Snapchat Event | Notes |
|---|---|---|
page (page view) | PAGE_VIEW | Sent for every page view |
Product Added | ADD_CART | Includes item details |
Order Completed / Product Purchased | PURCHASE | Requires price, currency |
Checkout Started | START_CHECKOUT | Includes price, currency |
Product Viewed | VIEW_CONTENT | Includes item details |
Signed Up | SIGN_UP | User registration |
Products Searched | SEARCH | Includes search_string |
Product Added to Wishlist | ADD_TO_WISHLIST | Includes item details |
Lead Generated | SAVE | Lead form submission |
| Custom events | CUSTOM_EVENT_1 through CUSTOM_EVENT_5 | Map via Pipeline transformation |
Example: Purchase Event
Datafly.js call:
_df.track("Order Completed", {
order_id: "ORD-001",
total: 129.99,
currency: "USD",
products: [
{ product_id: "SKU-A", name: "Widget", price: 49.99, quantity: 2 },
{ product_id: "SKU-B", name: "Gadget", price: 30.01, quantity: 1 }
]
});Snapchat Conversions API payload sent by Datafly:
{
"pixel_id": "your_pixel_id",
"event_type": "PURCHASE",
"event_conversion_type": "WEB",
"timestamp": 1706540000000,
"event_tag": "evt_abc123def456",
"page_url": "https://example.com/checkout/confirmation",
"user_agent": "Mozilla/5.0 ...",
"hashed_ip_address": "d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5",
"hashed_email": "836f82db99121b3481011f16b49dfa5fbc714a0d1b1b9f784a1ebbbf5b39577f",
"hashed_phone_number": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6abcd",
"click_id": "ScCid_abc123",
"price": 129.99,
"currency": "USD",
"transaction_id": "ORD-001",
"number_items": 3,
"item_ids": ["SKU-A", "SKU-B"]
}Example: Page View
{
"pixel_id": "your_pixel_id",
"event_type": "PAGE_VIEW",
"event_conversion_type": "WEB",
"timestamp": 1706539000000,
"event_tag": "evt_789ghi012jkl",
"page_url": "https://example.com/products/widgets",
"user_agent": "Mozilla/5.0 ...",
"hashed_ip_address": "d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5",
"hashed_sc_cookie": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}Event Conversion Type
The event_conversion_type field indicates the source of the conversion. For all browser-originated events collected by Datafly.js, this is set to WEB.
Snapchat supports WEB, MOBILE_APP, and OFFLINE conversion types. Datafly Signal currently supports WEB for events originating from Datafly.js.
API Response
A successful response from Snapchat:
{
"status": "SUCCESS",
"reason": ""
}An error response:
{
"status": "FAILED",
"reason": "Invalid pixel_id"
}Rate Limits
| Setting | Default |
|---|---|
rate_limit_rps | 50 |
rate_limit_burst | 100 |
Snapchat’s Conversions API has a rate limit of approximately 500 requests per second per pixel. If you have very high event volume, increase rate_limit_rps accordingly, but stay within Snapchat’s published limits.