Where do I insert the Snap code on my website?

Where do I insert the Snap code on my website?

Naj1
Visitor
3 0 0

Hi, 

 

I have error notification for snap pixel, I communicated snap supports and they advised me to add this code 

 snaptr('init', 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',   {'user_email':user.email});

 

As I'm not developer and have no experiences with coding, I don't know where  to add that code exactly 

 

can someone advice ?

Replies 7 (7)

Moira
Shopify Staff (Retired)
2118 231 340

Hey @Naj1,

 

Great question! Adding Snapchat pixels to Shopify is a great way to track conversions and optimize your ads on the platform. 

 

To create your Snap Pixel you’re going to need to sign up for the Snapchat Ads Manager.

Once you’ve signed up and logged in to Snapchat Ads Manager you’ll need to click on the menu in the top left corner of the screen and select ‘Snap Pixel’.

 

22-11-sttd7-70yyq

 

Then, hit the “Set up My Pixel” button, and you’ll receive your unique Snap Pixel ID.

 

22-11-upgv7-okfm1

 

Copy your Snap Pixel ID and head back to your Shopify admin page.

 

Click onto your Snapchat Ad app welcome page and select the “Setup” tab. Here you’ll see a section called “Drive Product Sales” with a field called “Pixel ID.”

 

Paste your unique Snap Pixel ID into the field, click “Set up Pixel” and it’ll be installed.

 

22-11-6jrow-deowa

 

Now that you’ve added your Snapchat Pixel to your store you’ll be able to track and optimize your Snapchat ads.

 

Manually Adding the Code

 

You can also add the Snapchat pixel code to your store manually. To do this, you’ll first need to create a new pixel in your Snapchat account. Once you have the code, log into your Shopify account and go to Online Store > Themes > Edit code.

 

22-11-pouo8-iis4q

 

In the Layout folder, open the theme.liquid file. Scroll down to the very bottom of the code and paste your Snapchat pixel code just above the tag.

 

22-11-o3uc5-q61go

 

Save your changes and you’re all set!

 

Your Snap Pixel, much like a Facebook Pixel, is integral for your advertising campaigns. It’ll enable you to effectively find and target potential customers using Custom Audiences and will help you to track and optimize conversions when you’re advertising on Snapchat.

 

Let me know how you get on!

Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog

Naj1
Visitor
3 0 0

Thanks @Moira 

 

Your answer is not related to my question

and photos you attached is very clear has been taken very long time ago with long old shopify version   

Moira
Shopify Staff (Retired)
2118 231 340

@Naj1 

 

You mentioned that you would like to add your snap code to your theme, you can do this by heading to Online Store > Themes > Edit code and following the steps I shared above under "Manually Adding the Code".

 

Moira_0-1668976917677.png

These screenshots were taken from my test store last week, does your Shopify Admin appear different?

Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog

Naj1
Visitor
3 0 0

@Moira 

 

Thank you for response 

Appreciating your efforts 

 

 

Have a good day 

Moira
Shopify Staff (Retired)
2118 231 340

Don't hesitate to reach back out if you require any further assistance as you continue to work on your store. 

 

All the best,

Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog

Nadir_ba
Visitor
3 0 0

what do i have to write in  snaptr('init', 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',   {'user_email':user.email});
user.email because i dont know what is the email address in my shopify store

Moira
Shopify Staff (Retired)
2118 231 340

@Nadir_ba,

 

This is not in relation to your email address, it is referring to users on your website. 

 

The purpose of this parameter is to allow Snapchat to track and target users based on their email addresses, which can be useful for remarketing and other types of advertising campaigns.

 

In the code you provided, user.email is a variable that represents the email address of the user. Depending on how your website is set up, this variable could contain the email address of the user who is currently logged in, or it could be retrieved from a form field that the user has filled out.

Moira | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog