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:

  1. Go to business.snapchat.com and click Create an Account.
  2. Sign in with your Snapchat account (or create one).
  3. Enter your business name, email, and business details.
  4. 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.

  1. In Snapchat Ads Manager, go to Events Manager (under the Assets menu).
  2. Click New Event Source > Web.
  3. Name your event source (e.g. “Datafly Signal”).
  4. Select Conversions API as the connection method.
  5. Click Confirm to create the Pixel.
  6. 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.

  1. In Snapchat Ads Manager, go to Events Manager.
  2. Select your Snap Pixel / event source.
  3. Go to the Conversions API tab.
  4. Click Generate Token (or Manage Tokens).
  5. Copy the generated access token.

Alternatively, you can generate a token via the Snapchat Marketing API OAuth flow:

  1. Go to the Snapchat Developer Portal.
  2. Click Create App under the Marketing API section.
  3. Fill in your app details and submit for review.
  4. Once approved, use the OAuth 2.0 flow to generate an access token with snapchat-marketing-api scope.
⚠️

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:

  1. Go to the Snapchat Developer Portal.
  2. Navigate to your app under My Apps.
  3. 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

FieldRequiredDescription
pixel_idYesYour Snap Pixel ID. Found in Snapchat Ads Manager > Events Manager.
access_tokenYesConversions API access token. Generated in Events Manager or via OAuth.
snap_app_idNoYour Snap App ID. Only required for mobile app event tracking.

Management UI Setup

  1. Go to Integrations > Add Integration > Snapchat Conversions API.
  2. Enter your pixel_id and access_token.
  3. Optionally enter snap_app_id if tracking mobile app events.
  4. Select consent categories (typically advertising).
  5. 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/conversion

Events 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:

SignalFieldDescription
sccidclick_idSnapchat click ID. Automatically captured from the ScCid URL parameter when a user clicks a Snapchat ad. This is the primary attribution signal.
scidhashed_sc_cookieSnapchat cookie ID. Signal self-generates this as a UUID and stores it as a first-party cookie (_scid). Provides cross-session identity.
ip_addresshashed_ip_addressVisitor’s IP address, hashed with SHA-256 before sending to Snapchat.
user_agentuser_agentVisitor’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=abc123def456

Datafly.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:

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. Snapchat also accepts hashed_ip_address which is automatically SHA-256 hashed by Signal.

Event Mapping

Datafly EventSnapchat EventNotes
page (page view)PAGE_VIEWSent for every page view
Order Completed / Product PurchasedPURCHASERequires price, currency
Product AddedADD_CARTIncludes item details
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 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

  1. Enable the integration in Signal and trigger events on your website.
  2. Check the Signal event debugger to confirm events are being delivered.
  3. Verify the delivery status shows successful responses ({"status": "SUCCESS"}) from Snapchat.

Step 2: Verify in Events Manager

  1. In Snapchat Ads Manager, go to Events Manager.
  2. Select your Snap Pixel / event source.
  3. Go to the Overview tab. You should see events arriving with the “Server” source indicator.
  4. Click on individual events to inspect the payload and match quality.

Step 3: Check Event Match Quality

  1. In Events Manager, review the Match Quality indicator for your event source.
  2. Snapchat rates match quality based on the identity signals provided.
  3. 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

ProblemSolution
Events not appearing in Events ManagerVerify 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 qualityAdd 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 eventsEnsure unique event_tag values are sent with each event. Snapchat deduplicates based on this field within a 48-hour window.
429 Too Many RequestsReduce rate_limit_rps or batch events if volume is very high.

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. For most deployments, the default settings are sufficient.

For full API documentation, see Snapchat Conversions API documentation.