Send your event data from RudderStack to Snap Pixel.
5 minute read
Snap Pixel is a piece of JavaScript code that lets you measure the cross-device impact of your advertising campaigns. It enables you to understand how many Snapchat users interact with your website after seeing the ads.
In the web device mode integration, that is, using JavaScript SDK as a source, RudderStack loads the Snap Pixel native SDK from the https://sc-static.net/ domain.
Based on your website’s content security policy, you might need to allowlist this domain to load the Snap Pixel SDK successfully.
Get started
Once you have confirmed that the source supports sending events to Snap Pixel, follow these steps:
From your RudderStack dashboard, add the source. From the list of destinations, select Snap Pixel.
Assign a name to the destination and click Continue.
Connection settings
To set up Snap Pixel as a destination, you need to configure the following settings:
Pixel ID: Enter your Snap Pixel ID. Refer to the FAQ section for more information on obtaining your Snap Pixel ID.
Hashing Method: Snap Pixel lets you pass a user parameter (email or phone) in both hashed and non-hashed format during the snippet’s intialization. If you choose SHA-256, RudderStack will hash-encode the parameter before passing it to Snap Pixel.
Mapping to trigger the Snap Pixel events for the respective events set here: Use this setting to map custom event names to the standard Snap Pixel events.
Client-side Events Filtering: This setting lets you specify which events should be blocked or allowed to flow through to Reddit Pixel. Refer to the Client-side Events Filtering guide for more information.
Customize Client Deduplication Key: Enable this setting to set a custom client deduplication ID in Snap Pixel. Refer to the Setting custom client deduplication key section for more information on this setting.
Use device mode to send events: As this is a web device mode-only destination, this setting is enabled by default and cannot be disabled.
Identify
You can use the identify call to initialize the Snap Pixel code.
RudderStack checks the cookies for the user parameter (email or phone) before loading the Snap Pixel snippet. If the parameter is present, RudderStack loads the snippet. Otherwise, it loads the snippet without passing the user parameter.
Snapchat strongly recommends passing a user parameter (either email or phone) through the Snap Pixel, as it lets you get better insights into your tracked conversions and creates more robust Pixel Custom Audiences. For more information, refer to the Snap Pixel FAQ.
RudderStack maps order_id to Snap Pixel’s transaction_id only in case of the Order Completed event.
Snap Pixel supports up to 5 custom events, listed below:
CUSTOM_EVENT_1
CUSTOM_EVENT_2
CUSTOM_EVENT_3
CUSTOM_EVENT_4
CUSTOM_EVENT_5
Setting custom client deduplication key
RudderStack lets you define the client deduplication key for event deduplication. Enable the Customize Client Deduplication Key setting in the dashboard to use this feature.
The following scenarios describe the different ways RudderStack sets the custom deduplication key:
Scenario 1: Passing the key in the event properties
Suppose you enable the Customize Client Deduplication Key setting and set the Client Deduplication Field to properties.dedup. RudderStack then sets the client deduplication ID with the value associated with properties.dedup, as shown in the following snippet:
In this case, RudderStack sets mydedupid as the client deduplication ID.
Scenario 2: Passing the messageId as the deduplication key
Suppose you enable Customize Client Deduplication Key and leave the Client Deduplication Field empty. In this case, RudderStack sets the event’s messageId as the client deduplication ID.
Scenario 3: Passing wrong/missing field in the dashboard settings
Suppose you enable Customize Client Deduplication Key and set the Client Deduplication Field, but the field is either missing or has a different name in the event. In this case, RudderStack does not set the client deduplication ID.
For example, if you set Client Deduplication Field to properties.dedup and the event contains properties.deduplication instead, then RudderStack sends the event to Snap Pixel without setting the client deduplication ID.
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.