Snapchat

Overview

Snapchat is a multimedia messaging app offering person-to-person photo sharing, 24-hour "Stories," and "Discover" letting brands show ad-supported, short-form content. Integrating Lytics with Snapchat allows you to be more precise with your ad spend by targeting the right users with the right message.

Authorization

If you haven't already done so, you will need to set up a Snapchat account before you begin the process described below.

If you are new to creating authorizations in Lytics, see the Authorizations documentation for more information.

Snapchat offers two authorization methods. The audience export uses Snapchat Sign In. The Conversions API export can use either method, but the Conversions API Token is recommended — it does not expire and is not subject to the OAuth throughput limit.

Snapchat Sign In (OAuth)

  1. Select Snapchat from the list of providers.
  2. Select the Snapchat Sign In method for authorization.
  3. Enter your Snapchat credentials in the login popup.
  4. In the Label text box, enter a name for the authorization
  5. (optional) In the Description text box, enter a description for this authorization
  6. Click Save Authorization.

Conversions API Token

Use this method for the Conversions API export. The token is a long-lived access token generated by an Organization Admin in Snapchat Ads Manager under Business Details → Conversions API Tokens — see Snapchat's Conversions API: Get Started documentation. It does not expire and does not need to be refreshed.

  1. Select Snapchat from the list of providers.
  2. Select the Conversions API Token method for authorization.
  3. Paste the token generated in Snapchat Ads Manager into the Conversions API Token field.
  4. In the Label text box, enter a name for the authorization
  5. (optional) In the Description text box, enter a description for this authorization
  6. Click Save Authorization.

Export Audience

Starting an export will create an Snapchat Customer List Audience audience by exporting a Lytics audience to Snapchat. Lytics can match on email address or mobile ad ID. After the initial load, the job will run continuously, adding or removing users from the Snapchat audience as users enter or leave the Lytics audience.

Integration Details

  • Implementation Type: Server-side Integration
  • Implementation Technique: REST API Integrations, Audience Trigger Integration
  • Frequency: Real-time Integration, with an optional one-time backfill of the audience after setup.
  • Resulting data: A Lytics audience will be exported to Snapchat.

Fields

By default, Lytics exports the following fields to Snapchat:

Lytics User FieldDescriptionSnapchat FieldType
emailEmailschemastring
emailSHA256 Emailschemastring
email/mobile ad idMobile Ad IDschemastring
phone numberPhone Numberschemastring

You can also export any Lytics user field to a custom Snapchat field, so long as the field type is a string.

Configuration

Follow these steps to set up and configure an export job for Snapchat in the Lytics platform. If you are new to creating jobs in Lytics, see the Destinations documentation for more information.

  1. Select Snapchat from the list of providers.
  2. Select the Export Audiences job type from the list.
  3. Select the Authorization you would like to use or create a new one.
  4. Enter a Label to identify this job you are creating in Lytics.
  5. (Optional) Enter a Description for further context on your job.
  6. Select the audience to export.
  7. From the Organization input, choose the Snapchat Organization to export to.
  8. From the Ad Account input, choose the Snapchat Ad Account to use.
  9. In the Snap Audience text box, choose the Snapchat Customer List Audience to export to, or enter a name for a new Customer List Audience",
  10. (Optional) From the Email Field input, choose the field that contains the user's email.
  11. (Optional) From the SHA256 Email Field input, choose the field that contains the SHA256 hash of user's email.
  12. (Optional) From the Mobile Ad ID Field input, choose the field that contains the mobile device identifier.
  13. (Optional) From the Phone Number Field input, choose the field that contains the user's phone number.
  14. (Optional) Select the Existing Users checkbox to add users who already exist in the selected Lytics audience.
  15. (Optional) From the Duplicate Exports input, select up to 50 additional audiences to send to Snapchat with the same configuration. Each additional audience will be sent as its own job in Lytics.
  16. Click Complete to start the job.

Snapchat: Conversions API Export

Send server-side conversion events to Snapchat using their Conversions API (CAPI). Reporting conversions server-side complements the Snap Pixel, improves measurement when browser signals are limited, and can improve the performance of your ad campaigns.

This job supports two authorization methods: a long-lived Conversions API Token (recommended) or Snapchat Sign In (OAuth). The Conversions API Token is generated in Snapchat Ads Manager (see Snapchat's Conversions API documentation) and does not expire. If you use Snapchat Sign In instead, create a new authorization for this job — authorizations created earlier for the audience export do not grant Conversions API access and cannot be used here.

Integration Details

  • Implementation Type: Server-side Integration
  • Implementation Technique: REST API Integration, Audience Trigger Integration
  • Frequency: Real-time Integration, with an optional one-time backfill of the audience after setup.
  • Resulting data: Conversion events for users in the selected Lytics audience are sent to the Snapchat Conversions API.

Once the job is created, the job will:

  1. (Optional) Scan the existing audience, and for each user extract a conversion event based on the job's configuration.
  2. Add each conversion event to a queue. The queue is sent to Snapchat every five seconds or once it reaches 100 events, whichever happens first.
  3. Run continuously. As users enter or exit the Lytics audience, the corresponding conversion events are sent to the Snapchat Conversions API.

Fields

Lytics maps your user fields to the Snapchat user_data and custom_data parameters according to the configuration. Identity fields (em, ph, fn, ln, ge, ct, st, zp, country) are normalized and SHA-256 hashed before sending and are sent as arrays; external_id is normalized and SHA-256 hashed and sent as a scalar. The device and client identifiers (client_ip_address, client_user_agent, madid, idfv, sc_click_id, sc_cookie1) are sent as-is. Values that are already valid SHA-256 hashes are passed through unchanged.

The job constructs the payload according to the configuration. Below is a sample of the payload sent to Snapchat:

{
  "data": [
    {
      "event_name": "PURCHASE",
      "event_time": 1705508777,
      "event_id": "evt-abc-123",
      "action_source": "OFFLINE",
      "event_source_url": "https://shop.example.com/checkout",
      "user_data": {
        "em": ["7391f52ad114cb6d645ca391bcab8e595500c858f3801a82e021d507e4d975d0"],
        "ph": ["9e1919ad78a34fd67a84bfbcf2fea14074065517bea32e92924771c3f92e5462"],
        "fn": ["fdee430d40bd57deeac186cd9790033d0f06f909a8806e7ce6e717ab7c7d5029"],
        "ln": ["fb1e7ec987523d2cb9e022cec1d6ae7c99dc46edfae4fe51254025fe4bea571f"],
        "ge": ["62c66a7a5dd70c3146618063c344e531e6d4b59e379808443ce962b3abd63c5a"],
        "ct": ["1a2290470e0aa7549ab1e04b2453274374149ffee517a57715e5206e4142c233"],
        "st": ["6959097001d10501ac7d54c0bdb8db61420f658f2922cc26e46d536119a31126"],
        "zp": ["6fee7c420f269255b01c51634bbae251032bd82d1fcd95a571e4d49baa035a70"],
        "country": ["79adb2a2fce5c6ba215fe5f27f532d4e7edbac4b6a5e09e1ef3a08084a904621"],
        "external_id": "5fe8455552a34a388f8b0d7e044768565b760acbb7770a55d015dda59fe41757",
        "client_ip_address": "192.168.1.1",
        "client_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)",
        "madid": "AEBE52E7-03EE-455A-B3C4-E57283966239",
        "idfv": "BAEC52E7-09EE-455A-B3C4-E57283966240",
        "sc_click_id": "2.AbCdEf01gHiJkLmNoPqRsTuVwXyZ",
        "sc_cookie1": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
      },
      "custom_data": {
        "currency": "USD",
        "value": 42.50,
        "num_items": 2
      }
    }
  ]
}

Configuration

Follow these steps to set up and configure a Snapchat Conversions API export job in the Lytics platform. If you are new to creating jobs in Lytics, see the Destinations documentation for more information.

  1. Select Snapchat from the list of providers.

  2. Select the Snapchat: Conversions API Export job type from the list.

  3. Select the Authorization you would like to use or create a new one.

  4. Enter a Label to identify this job you are creating in Lytics.

  5. (Optional) Enter a Description for further context on your job.

  6. Select the Audiences that contain the users to export.

  7. In the Pixel ID / Snap App ID text box, enter your Snap Pixel ID (for WEB and OFFLINE events) or your Snap App ID (for MOBILE_APP events) from Snapchat Ads Manager.

  8. From the Event Name input, select the Snapchat event to send. Snapchat only accepts its standard events; to send your own event, map a custom conversion in Snapchat Ads Manager to one of the CUSTOM_EVENT_1CUSTOM_EVENT_5 slots and select that slot here.

  9. From the Action Source input, select where the conversion occurred (WEB, OFFLINE, or MOBILE_APP). Defaults to OFFLINE.

  10. (Optional) From the Event Timestamp Field input, select the Lytics user field that contains the event time. If left empty, the time the event is processed is used. Snapchat rejects events more than 7 days old, so events with an older timestamp are dropped.

  11. (Optional) From the Event Source URL Field input, select the Lytics user field that contains the URL where the event occurred.

  12. From the User Data Mapping input, map Lytics user fields to Snapchat user data identifiers. At least one identifier is required.

  13. (Optional) From the Conversion ID Field input, select the Lytics user field that contains a unique conversion/event ID used for deduplication in Snapchat.

  14. (Optional) From the Currency Field input, select the Lytics user field that contains the ISO currency code for the conversion value.

  15. (Optional) From the Value Field input, select the Lytics user field that contains the monetary value of the conversion.

  16. (Optional) From the Item Count Field input, select the Lytics user field that contains the number of items in the conversion.

  17. (Optional) From the Audience Trigger Events input, select which type of audience trigger events to send. By default both enters and exits are sent.

  18. (Optional) From the Fields to Trigger input, select up to 75 user fields. If any selected field changes for a user in the exported audience, a conversion event will be sent.

  19. (Optional) Select the Existing Users checkbox to immediately push users who currently exist in the selected Lytics audience. Deselecting will only send conversions as users enter or exit the audience.

  20. Click Complete to start the job.