Snapchat CAPI

What is Snapchat?

Snapchat is a multimedia messaging app developed by Snap Inc., widely used for sharing images, videos, and messages that disappear after being viewed. In addition to its social media features, Snapchat provides advertising tools through its Ads Manager platform, allowing businesses to track conversions and target audiences effectively. The platform uses unique identifiers and pixel tracking to enhance ad attribution and campaign measurement. MetaRouter’s Snapchat sync enables efficient server-side tracking and identity resolution using Snapchat’s Conversions API.

Product Type: Advertising

Integration Type: Starter Kit & ID Sync


Capabilities

  • Captures ScCid from URL parameters and stores it for cross-device tracking.
  • Syncs user identifiers with Snapchat via the Conversions API.
  • Adds the Snapchat ScCid and _scid identifiers to server-side event payloads for attribution.
  • Enables event-level tracking by making two API calls to Snapchat using the configured Pixel ID and generated ID.

Considerations

  • The Snapchat sync mimics Snapchat’s ID generation and makes two requests to Snapchat’s API endpoints: https://tr.snapchat.com/cm/i and https://tr.snapchat.com/p.
  • A PixelID from Snapchat Ads Manager is required to configure the sync.

Sync Details

  • IDs:

    • ScCid – A campaign tracking identifier captured from the ScCid URL parameter, used to attribute events back to Snapchat ads.
    • _scid – A generated identifier that mimics Snapchat’s own ID, used for tracking users across events.
  • Description:

    • The sync captures ScCid from the URL parameter.
    • Each value is stored in first-party storage for a configured duration (default 37 days).
    • Values are refreshed when new data is detected.
    • The identifiers are added to server-side event payloads for attribution or targeting.
  • Server-side Event Payload:
    Upon completion of all vendor's sync, the server-side events will incorporate all resolved identifiers as described above. The following object will be appended to the context.providers property within the event's JSON payload.

    {
      "snapchatCAPI": {
        "ScCid": "URL parameter value from ScCid",
        "_scid": "the cookie value that exists or gets generated"
      }
    }
    
    
  • Cookie Name:

    • Cookie: _meta_snapchatCAPI_ScCid
    • IndexedDB: [your storage prefix]_snapchatCAPI_ScCid
    • For a general guide on ID Sync validation, see here.

Sync Setup Guide

1. Gather Credentials

To configure the Snapchat sync, you will need a PixelID generated from your Snapchat Ads Manager account. If you do not have access to this value, contact your Snapchat account representative or support team.

2. Add a Snapchat Sync in MetaRouter

To gather the ScCid and generate the _scid value, you must add a Snapchat sync.

  1. From the Pipelines page, find the pipeline associated with the web property you’d like to add a sync to. Hover over the three dot dropdown and select “Build AJS File.”
  2. In the Identity Syncs section, select the Snapchat sync.
  3. Fill out the following fields:
    1. Cookie Lifetime (in days) – Defines how long the synced identifier will remain active. Example: 90 (default is 37).
    2. PixelID – Your Snapchat Ads Manager pixel ID. Example: 755b9495-f364-06b4-a3a1-aa449b4e4491.
  4. Scroll down and click the Save and Build File button.
  5. Deploy your AJS file to propagate changes to your web property.