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 Mode | Web | Mobile | Server |
---|---|---|---|
Device mode | Supported | - | - |
Cloud mode | - | - | - |
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:
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:
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 Parameter | Snap Pixel User Parameter |
---|---|
email | user_email |
phone | user_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 event | Snap Pixel event |
---|---|
Order Completed | PURCHASE |
Checkout Started | START_CHECKOUT |
Product Added | ADD_CART |
Payment Info Entered | ADD_BILLING |
Promotion Clicked | AD_CLICK |
Promotion Viewed | AD_VIEW |
Product Added To Wishlist | ADD_TO_WISHLIST |
Product Viewed | VIEW_CONTENT |
Product List Viewed | VIEW_CONTENT |
Products Searched | SEARCH |
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:
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.