🔥 Just Launched! Werra Premium Template for HyväSee it in Action

How to Add Snapchat Pixel to Magento 2: Quick & Easy Steps

By Shivbhadrasinh GohilUpdated on Jan 02, 2025 5 min read

Data-driven insights are key in making marketing decisions.

The Snapchat Pixel is your way to get first-hand user insights to optimize your ads for better conversions.

In this blog post, learn how to add Snapchat Pixel to Magento 2 without a sweat.

What is Snapchat Pixel?

A Snapchat Pixel tracks important user interaction on your Magento 2 website. It is a piece of JavaScript code added to your website’s HTML within the <head> section.

This tracking pixel is loaded and starts tracking the user’s interaction as soon as the page loads. Here are the key insights you can track using the Snapchat Pixel:

  • Track when users visit specific pages on your site.
  • Monitor when users register or sign up for an account.
  • You can create custom events based on your needs.
  • & more.

How to Get a Snapchat Pixel Code?

Log into your Snapchat account and then click on Pixel from the left-side menu. From there, create or select the Pixel Name which you would like to set up.

create pixel or select from the existing one

When you select the Pixel Name, you will see Set up Pixel inside the Pixel Details. Click on that, and when the pop-up appears, select Pixel Code. 

set up events click pixel code

Next, you will have to select the method to connect your website to send the web events, select Manual Setup here.

event set up method - click manual set up

Now, move to the Event Source Setup, and select the Funnel Events you want to track here.

You can select as many events in the different stages as you like. Finish this process by clicking on Next.

event source setup

The base code for Snap Pixel will be displayed. Copy it.

click copy code and copy base code

Continue with the remaining steps, like automated matching, and complete the setup process.

If you’re using Google Tag Manager (GTM) to manage your marketing pixels and scripts, you can also set up Snapchat Pixel tracking via GTM.

How to Add Snapchat Pixel Code to Magento 2?

Now that you have the Snap pixel code, it is time to add it to your Magento 2 backend.

You can manually add this tracking code to your Magento 2 store’s theme header, but it will require coding and technical expertise.

Instead, you can use the Meetanshi’s Magento 2 Snapchat Pixel extension.

magento 2 snapchat pixel extension by meetanshi

The extension is an easy option for adding Snap pixel code without any technical constraints and setting the tracking preference as you like.

Let us see the simple (code-free) steps to do so.

Firstly, download the zip file of the extension and extract it to your Magento store’s root directory.

Then, log in to your SSH and run these commands one after the other:

  • php bin/magento setup:upgrade
  • php bin/magento setup:static-content:deploy –f
  • php bin/magento cache:flush

After installation, it is time to configure.

From your admin dashboard, head to Stores > Configuration > Meetanshi > Snapchat Pixel and enable the extension.

Enter the Snap Pixel JS code in the field. Choose your conversion value preferences from Grand Total and Subtotal. If you’re using any custom checkout, you can define the page paths for tracking conversions.

Optionally, you can choose to exclude the zero value orders from being considered as conversions.

Magento 2 snapchat pixel configuration extension

Save the configuration settings.

You’ve successfully installed Snap Pixel in your Magento 2 store .

You can test the implementation through Snap Pixel Helper extension for Chrome or through the Events Manager dashboard.

Magento 2 Snapchat Pixel

Capture data & convert customers for your Magento 2 store via Snapchat

Start Now

Optimize Your Ads For Maximum ROI

With the insights coming in, start optimizing your ad campaign. You can identify the products getting maximum visits and leverage that, or A/B test different formats to determine what works best for you.

Unlock this tracking Pixel into your store and start growing your business.

Also Learn: How to Add Facebook Pixel to In Your Magento 2 Store 

Shivbhadrasinh Gohil Full Image
Article byShivbhadrasinh Gohil

Shivbhadrasinh is the Co-founder & Chief Marketing Officer at Meetanshi. He leads the marketing team and is the person behind the marketing & branding success of the company. Being a seasoned digital marketer, he has been consulting online businesses for growth since 2010 and has helped 100+ clients with digital marketing success. He loves sharing tips and insights about the latest digital marketing trends aimed at helping online business owners.