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.
Prerequisites
Before configuring Snapchat Conversions API in Signal, you need a Snapchat Business account, a Snap Pixel, and an API access token. Follow the steps below to set everything up.
Step 1: Create a Snapchat Business Account
If you don’t already have one:
- Go to business.snapchat.com and click Create an Account.
- Sign in with your Snapchat account (or create one).
- Enter your business name, email, and business details.
- Complete the setup wizard and create an ad account.
Step 2: Create a Snap Pixel and Set Up Conversions API
The Snap Pixel serves as the container for your conversion events, even when using server-side delivery.
- In Snapchat Ads Manager, go to Events Manager (under the Assets menu).
- Click New Event Source > Web.
- Name your event source (e.g. “Datafly Signal”).
- Select Conversions API as the connection method.
- Click Confirm to create the Pixel.
- Note the Pixel ID from the event source details page.
If you already have a Snap Pixel from a previous client-side installation, you can reuse the same Pixel ID. Snapchat supports receiving events via both client-side and server-side methods on the same Pixel, with automatic deduplication.
Step 3: Generate an API Access Token
The Conversions API access token authenticates server-to-server requests.
- In Snapchat Ads Manager, go to Events Manager.
- Select your Snap Pixel / event source.
- Go to the Conversions API tab.
- Click Generate Token (or Manage Tokens).
- Copy the generated access token.
Alternatively, you can generate a token via the Snapchat Marketing API OAuth flow:
- Go to the Snapchat Developer Portal.
- Click Create App under the Marketing API section.
- Fill in your app details and submit for review.
- Once approved, use the OAuth 2.0 flow to generate an access token with
snapchat-marketing-apiscope.
Store the access token securely. Tokens generated via Events Manager do not expire unless revoked. Tokens from the OAuth flow may have a limited lifetime and require refresh.
Step 4: Note Your Snap App ID
If you are tracking app-related events or need the Snap App ID for configuration:
- Go to the Snapchat Developer Portal.
- Navigate to your app under My Apps.
- Note the Snap App ID from the app details page.
The snap_app_id is only required if you are tracking mobile app events. For web-only conversion tracking, the pixel_id and access_token are sufficient.
Configure in Signal
Now that you have your Pixel ID and access token, configure the integration in Signal.
Configuration Fields
| Field | Required | Description |
|---|---|---|
pixel_id | Yes | Your Snap Pixel ID. Found in Snapchat Ads Manager > Events Manager. |
access_token | Yes | Conversions API access token. Generated in Events Manager or via OAuth. |
snap_app_id | No | Your Snap App ID. Only required for mobile app event tracking. |
Management UI Setup
- Go to Integrations > Add Integration > Snapchat Conversions API.
- Enter your
pixel_idandaccess_token. - Optionally enter
snap_app_idif tracking mobile app events. - 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"]
}'API Endpoint
POST https://tr.snapchat.com/v2/conversionEvents are sent as JSON with authentication via the Authorization: Bearer header.
Identity Signals
Snapchat uses multiple identity signals to match server events to Snapchat user profiles.
Automatic Signals
These are sent automatically by Signal — no configuration needed:
| Signal | Field | Description |
|---|---|---|
sccid | click_id | Snapchat click ID. Automatically captured from the ScCid URL parameter when a user clicks a Snapchat ad. This is the primary attribution signal. |
scid | hashed_sc_cookie | Snapchat cookie ID. Signal self-generates this as a UUID and stores it as a first-party cookie (_scid). Provides cross-session identity. |
ip_address | hashed_ip_address | Visitor’s IP address, hashed with SHA-256 before sending to Snapchat. |
user_agent | user_agent | Visitor’s User-Agent string, forwarded from the original request. |
When a user clicks a Snapchat ad, the ScCid parameter is appended to the landing page URL:
https://example.com/landing?ScCid=abc123def456Datafly.js automatically captures the ScCid from the URL and persists it as a first-party cookie for the duration of the attribution window.
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. Snapchat also accepts hashed_ip_address which is automatically SHA-256 hashed by Signal.
Event Mapping
| Datafly Event | Snapchat Event | Notes |
|---|---|---|
page (page view) | PAGE_VIEW | Sent for every page view |
Order Completed / Product Purchased | PURCHASE | Requires price, currency |
Product Added | ADD_CART | Includes item details |
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 Signal:
{
"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"
}Testing Your Integration
Step 1: Send Test Events
- Enable the integration in Signal and trigger events on your website.
- Check the Signal event debugger to confirm events are being delivered.
- Verify the delivery status shows successful responses (
{"status": "SUCCESS"}) from Snapchat.
Step 2: Verify in Events Manager
- In Snapchat Ads Manager, go to Events Manager.
- Select your Snap Pixel / event source.
- Go to the Overview tab. You should see events arriving with the “Server” source indicator.
- Click on individual events to inspect the payload and match quality.
Step 3: Check Event Match Quality
- In Events Manager, review the Match Quality indicator for your event source.
- Snapchat rates match quality based on the identity signals provided.
- To improve match quality, add more user identity signals via
_df.identify().
Remove any test configurations before going to production. Events sent during testing will be counted in your conversion reporting.
Troubleshooting
| Problem | Solution |
|---|---|
| Events not appearing in Events Manager | Verify the pixel_id is correct. Check the access token is valid. Confirm the event source is set to Conversions API mode. |
{"status": "FAILED", "reason": "Invalid pixel_id"} | The Pixel ID is incorrect or the Pixel has been deleted. Check in Events Manager. |
{"status": "FAILED", "reason": "Authentication failed"} | The access token is invalid or expired. Generate a new token in Events Manager. |
| Low match quality | Add hashed_email and hashed_phone_number via _df.identify(). Ensure ScCid (click ID) is being captured from URLs. |
| Events showing as “Unmatched” | No identity signals could be matched to a Snapchat user. Ensure at least click_id or hashed_email is present. |
| Duplicate events | Ensure unique event_tag values are sent with each event. Snapchat deduplicates based on this field within a 48-hour window. |
429 Too Many Requests | Reduce rate_limit_rps or batch events if volume is very high. |
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. For most deployments, the default settings are sufficient.
For full API documentation, see Snapchat Conversions API documentation.