The Snap Pixel is a piece of JavaScript code that lets you measure the cross-device impact of your advertising campaigns. It lets you understand how many Snapchat users interact with your website after seeing the ads.

RudderStack supports Snap Pixel as a destination to which you can seamlessly send your event data.

Getting started

Before configuring Snap Pixel as a destination in RudderStack, verify if the source platform is supported by Snap Pixel by referring to the table below: ̦

Connection ModeWebMobileServer
Device modeSupported--
Cloud mode---
To know more about the difference between cloud mode and device mode in RudderStack, refer to the RudderStack Connection Modes guide.

Once you have confirmed that the source platform supports sending events to Snap Pixel, perform the steps below:

  • From your RudderStack dashboard, add the source. From the list of destinations, select Snap Pixel.
  • Assign a name to the destination and click on Next. You should then see the following screen:
Next

Configuration Settings

To successfully configure Snap Pixel as a destination, you will need to configure the following settings:

  • Snap Pixel ID: Enter your Snap Pixel ID here. To get your Snap Pixel ID, go to your Snap Ads Manager account. Under Events Manager, select View Pixel Details then Setup Pixel. You can find the Pixel ID under Pixel Code, as shown:
Setup Pixel

Hashing Method: Snap Pixel lets you pass a user parameter (email or phone number) in both hashed and non-hashed format during intialization. If SHA-256 is chosen as an option, RudderStack will hash-encode the provided user parameter.

Identify

The Snap Pixel will not be initialized unless the identify call is fired.

RudderStacks checks the cookies for the user parameter (email or phone number) before loading the Snap Pixel snippet. If found, the snippet is loaded. Otherwise, an identify call with the user's email or phone number is required to load the snippet.

In Snap Pixel, the identify call initializes the Snap Pixel code.

A sample identify call is as shown:

rudderanalytics.identify({
email: "alex@example.com",
phone: "+1-202-555-0146"
});

Either or both of the user parameters should be passed in the identify call. The following table lists the parameters along with the relative mapping to the Snap Pixel parameters:

RudderStack User ParameterSnap Pixel User Parameter
emailuser_email
phoneuser_phone_number

Page

When the page call is made, RudderStack sends the following:

snaptr("track", "PAGE_VIEW").

You can make the page call with or without the event payload.

A sample page call is as shown:

rudderanalytics.page();

Track

The track call lets you send Snap Pixel events.

A sample track call is as shown below:

rudderanalytics.track('PURCHASE', {
'currency': 'USD',
'price': 333.33,
'transaction_id': '11111111'
});

You can also send the following RudderStack e-commerce events:

RudderStack eventSnap Pixel event
Order CompletedPURCHASE
Checkout StartedSTART_CHECKOUT
Product AddedADD_CART
Payment Info EnteredADD_BILLING
Promotion ClickedAD_CLICK
Promotion ViewedAD_VIEW
Product Added To WishlistADD_TO_WISHLIST
Product ViewedVIEW_CONTENT
Product List ViewedVIEW_CONTENT
Products SearchedSEARCH

Refer to the Snapchat documentation for more information on the Snap Pixel events.

Snap Pixel supports upto 5 custom events. They are listed in the table below:

Custom Events
CUSTOM_EVENT_1
CUSTOM_EVENT_2
CUSTOM_EVENT_3
CUSTOM_EVENT_4
CUSTOM_EVENT_5

FAQs

Where can I find the Snap Pixel ID?

To get your Snap Pixel ID, go to your Snap Ads Manager account. Under Events Manager, select View Pixel Details then Setup Pixel. You can find the Pixel ID under Pixel Code, as shown:

Pixel Code

Contact us

In case of any issues while configuring or using Snap Pixel with RudderStack, you can contact us or start a conversation in our Slack community.

Contents