With Snapchat’s recent release of its tracking pixel, what used to be a mere picture sharing app has evolved into a competitive performance advertising platform. This launch allows Snapchat advertising campaigns to be optimized and analyzed for better performance by tracking and monitoring how users are interacting with your ads outside of the app.

The Snapchat Pixel is the latest development in Snap Inc’s direct response advertising efforts for eCommerce and app-based advertisers. It is a snippet of code that delivers meaningful feedback about users who interact with their ad.

Keep reading to learn more about the Snapchat Pixel and how you can install Snapchat’s conversion tracking on your Magento or Shopify eCommerce site.

What is the Snapchat Pixel?

The Snapchat pixel is a Javascript code placed on to the backend of your website that tracks the actions of users who see your ad. The pixel allows advertisers to implement highly-targeted campaigns and analyze how these campaigns perform with consumers across different devices.

This new feature allows you to track specific actions on your ads, create custom audience lists to run campaigns, and measure your goals beyond what happens during a single session or on a single device (limitations of most analytics platforms such as Google Analytics).

This will allow you to better track eCommerce purchases and other conversions driven by your Snapchat ads across devices and browsers.

Why is the Snapchat Pixel important?

This new development is part of Snapchat’s performance-based advertising model geared towards advertisers receiving real-time feedback on their ads. With the new conversion tracking pixel, Snapchat is positioning their app as a viable advertising platform, similar to platforms like Instagram and Facebook.

The pixel allows marketers to track and analyze campaign data in real time within 28 days after a user has engaged with an ad. Advertisers will be able to see which ads are successful and use that information to create more fine-tuned campaigns.

Because of this, the pixel is a great tool for driving conversions and direct response goals overall, measuring responses over multiple sessions and devices.

How does the Snapchat Pixel work?

The pixel is a Javascript tag that hashes all data using privacy-friendly SHA256 and sends it back to Snapchat’s advertising platform. Whenever a conversion event is completed by a user a small snippet of javascript or an image tag reports back to the advertising platform.

The Pixel captures data for Self Service Ad Formats, such as Filters and Snap Ads. You can use the same Pixel across multiple websites; however, you can only create one Pixel ID per ad account.

Once the base pixel is set up on your website you can also implement the available conversion parameters (purchase value, currency, quantity etc.), so they can be used in reporting and optimizations down the road.

Unlike Google Ads and Facebook advertising platforms that report events based on the date of the last click or view, conversion events are reported on the day it took place. The default post-swipe attribution window is 28 days, while the post-view attribution window is 1 day. However, these windows are flexible:

graph of flexible lookback windows for post views and post swipes. For example, 0 days of post views corresponds with 1 day post swipe.

Image Provided by Snapchat Business Centre

While the current feature set is limited, upcoming developments for Snapchat’s pixel tracking include remarketing technology, with each page featuring the pixel having the ability to backfill audiences. Another feature on Snapchat’s roadmap is the ability to support audience building, specific measurement metrics based on URL matches, and other rules.

How to install the Snapchat Pixel

Step 1: Sign Up for Snap Pixel

a) Start by logging into your Snapchat Ads Manager. In the top navigation, select the “Snap Pixel” option under “Manage”.

b) Select “Create my Snap Pixel”.

welcome-to-snap-pixel-page

c) Select “Set Up My Snap Pixel”. This will trigger a pop up that includes the pixel’s code.

set-up-my-snap-pixel-page

d) Copy the pixel’s code found in the pop up, and add it to your website’s header tag. Do not use the code below.

set-up-my-snap-pixel-code

Step 2: Configuring Attribute Website Actions

Events Attribution:

To attribute website actions for Snapchat users, the pixel uses phone numbers, email, or mobile ad IDs. One of the parameters below must be provided if users are logged in to your website(s). If the parameter is not defined then you can leave it empty.

These values will be hashed automatically using the SHA 256 algorithm, so there is no need to hash it yourself.

graph of events attribution for user parameters, description, and value.

Image Provided by Snapchat Business Centre

Standard Event Types:

There are many predefined event types that are compatible with the Snapchat pixel:

Chart of predefined events types that are compatible with Snapchat Pixel, and their description.

Image Provided by Snapchat Business Centre

Optional Event Parameters:

Every event can have the optional parameters listed below. Note that these parameters are not yet supported for reporting.

table of event parameters, their description, and their value.

Image Provided by Snapchat Business Centre

Tracking Snapchat Purchase Conversion Value in Magento

You can receive valuable, real-time information about users’ purchases on your Magento website by tracking Snapchat purchase conversion rates.

Embed this Snapchat purchase conversion script below.

Preparing Pages

  • On your transaction success page (commonly ending in ‘checkout/onepage/success/’) ensure you have your base SnapChat Pixel code firing with at least one user parameter such as email or phone number
  • Fire the Snapchat purchase conversion event script below after your base pixel

Code:

<?php
$orderId = Mage::getSingleton('checkout/session')->getLastOrderId();
$order = Mage::getModel('sales/order')->load($orderId);
$total = (float)number_format($order()->getSubtotal(),2);
?>
<script>
snaptr('track', 'PURCHASE', {'currency': 'USD', 'price': <?php echo $total?>, 'transaction_id':'1<?php echo $orderId>' });
</script>

Tracking Snapchat Purchase Conversion Value in Shopify

If you’re on a Shopify website, you can use the Snapchat pixel to track when users make a conversion in real time by adding the following tracking code to the back end of your site.

Embed this Snapchat tracking script by following the instructions below.

  • Prepare Pages
  • From your Shopify admin, click Settings, and then click Checkout.
  • In the Order processing section, find the Additional scripts text box
  • Paste your tracking code in this box
  • If there is already code in this box, paste your tracking code after it. Be sure to insert your pixel id into the string:

[ snaptr('init', 'XXXXXXXXXXXXXXXX', ]

Code:

{% if first_time_accessed %}
<script type='text/javascript'>
(function(win, doc, sdk_url){  if(win.snaptr) return; var tr=win.snaptr=function(){
tr.handleRequest? tr.handleRequest.apply(tr, arguments):tr.queue.push(arguments);};  tr.queue = []; var s='script';  var new_script_section=doc.createElement(s);  new_script_section.async=!0;  new_script_section.src=sdk_url;  var insert_pos=doc.getElementsByTagName(s)[0];  insert_pos.parentNode.insertBefore(new_script_section, insert_pos); })(window, document, 'https://sc-static.net/scevent.min.js'); snaptr('init', 'XXXXXXXXXXXXXXXX', {  'user_email': {{customer.email}}' }); snaptr('track', 'PURCHASE', {'currency': 'USD', 'price': {{ total_price | money_without_currency }}, 'transaction_id':'{ {checkout.order_id }}' }); </script>
{% endif %}

Whether you’re on Magento or Shopify, It’s a good idea to have a trained developer present when installing this code to ensure you don’t run into any problems and the code is compatible with your specific theme and site.

Tracking Snapchat Add to Cart Events in Shopify

Once you have assured that your pixel is correctly firing on all your pages, you can also track “Add to Cart” events in Shopify. Embed this Snapchat tracking script by following the following steps:

  1. Log in to your Shopify admin page, select “Online Store” on the left navigation panel, and select “Themes”.
  2. Within the “Actions” drop down menu, select “Edit Code”
  3. Locate your cart.liquid file and paste the following event code:*

<script type="text/javascript">
snaptr('track', 'ADD_CART', {
'currency': '{{shop.currency}}',
'price': {{ cart.total_price | money_without_currency | remove: ',' }},
'item_ids': [{% for item in cart.items %}'{{ item.variant.id }}'{% unless forloop.last %}, {% endunless %}{% endfor %}],
});
</script>

*Always ensure to test any code edits on your website before pushing changes live.

Step 3: Associate the Pixel with Desired Ads

At this point, you have attached the Snap Pixel to your ad account and to your websites.

When creating an Ad Set, ensure the Snap Pixel toggle is set to “Attached” under “Ad Set Details”. This will allow you to receive conversion reporting for ads. You can also enable this for active ad sets you have made in the past.

Screenshot showing that the snap pixel has been switched on in Snapchat platform.

Image Provided by Snapchat Business Centre

Step 4: Check Your Pixel Is Correctly Installed

Once the Pixel has been installed, you can check its activity on the “Ads Manager”.

In the top navigation panel of “Ads Manager”, select “Snap Pixel” in the “Resources” tab. This is how you verify which domains the Pixel was placed on, and its event types.

This is also where you can monitor if events are firing correctly. However, keep in mind that activity statistics are not currently able to be exported.

Snapchat has also created a pixel helper tool that lets you test the pages you’re pixel is integrated with.

Display of snap pixel monitoring page.

Image Provided by Snapchat Business Centre

Step 5: Launch Campaigns

You will see real-time conversion reports in the “Ad Dashboard”. You can select single conversion metrics in the “Customize Column” to include them in the report. Press Save.

Screenshot of a "customize column" where you can select conversion metrics.

Image Provided by Snapchat Business Centre

For more information, visit the Snapchat Business Centre here.

Pixel tracking is an important part of Snapchat’s developing performance advertising portfolio, introducing measurement solutions advertisers have started to expect. While pixel tracking will introduce many new features related to the pixel, some of the most important for advertisers will be cross-device reporting and buying optimization options; by integrating the Snapchat pixel now, you will be able to hit the ground running as new features are released.

Maximize Your Advertising Results

Northern Commerce strives to utilize the newest and most advanced marketing platforms for our clients. Snapchat Advertising is one of many tools we use to help clients target their audience, create eye-catching content, and maximize results.

Learn more about Northern’s advertising solutions.

Questions? Be sure to leave them in the comments.

Want more marketing tips?

Join our email list to receive Northern resources and updates right in your inbox! You can unsubscribe at any time.

Javascript is required to submit this form.

Northern is one of North America’s fastest growing eCommerce agencies, specializing in industry-leading eCommerce web development, design, and marketing services.