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/conversion

Events are sent as JSON with authentication via the Authorization: Bearer header.

Configuration

FieldRequiredDescription
pixel_idYesYour Snap Pixel ID. Found in Snapchat Ads Manager > Events Manager.
access_tokenYesConversions API access token. Generate in Snapchat Ads Manager > Events Manager > Conversions API setup.

Management UI Setup

  1. Go to Integrations > Add Integration > Snapchat Conversions API.
  2. Enter your pixel_id and access_token.
  3. Select consent categories (typically advertising).
  4. 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.

SignalFieldDescription
_scidhashed_sc_cookieSnapchat browser cookie ID. Datafly Signal self-generates this as a UUID and stores it as a first-party cookie.
ScCidclick_idSnapchat click ID. Automatically extracted from the ScCid URL parameter when a user clicks a Snapchat ad.
ip_addresshashed_ip_addressVisitor’s IP address, hashed with SHA-256.
user_agentuser_agentVisitor’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:

SignalHashingDescription
hashed_emailSHA-256, lowercase, trimmedUser’s email address
hashed_phone_numberSHA-256, E.164 formatUser’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 EventSnapchat EventNotes
page (page view)PAGE_VIEWSent for every page view
Product AddedADD_CARTIncludes item details
Order Completed / Product PurchasedPURCHASERequires price, currency
Checkout StartedSTART_CHECKOUTIncludes price, currency
Product ViewedVIEW_CONTENTIncludes item details
Signed UpSIGN_UPUser registration
Products SearchedSEARCHIncludes search_string
Product Added to WishlistADD_TO_WISHLISTIncludes item details
Lead GeneratedSAVELead form submission
Custom eventsCUSTOM_EVENT_1 through CUSTOM_EVENT_5Map 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

SettingDefault
rate_limit_rps50
rate_limit_burst100
⚠️

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.