Add To Cart - Facebook Pixel not firing

bjobar
Tourist
3 0 1

Hello,

 

when people add items to their cart my Facebook Pixel is not firing this event. 

 

When the initiate checkout, the Facebook Pixel catches up again.

 

I already read some posts in this community and every time they talk about the "ajax-cart-template.liquid". I don't have that liquid either. I wanted to add the "addtocart" event manually but don't seem to find the path of my cart pages to paste it into the <body> section. 

 

Additional information:

I have plugins installed like

"Sticky AddToCart"

or Upsell Plugins like "Candy Rack – One Click Upsell"

and "Best Custom Product Options by Relentless"

 

Kind regards

Replies 28 (28)
Rae
Shopify Staff (Retired)
Shopify Staff (Retired)
1166 95 322

Hi, @bjobar

 

This is Rae from Shopify. Thanks for reaching out about the 'AddToCart' event on your pixel, and welcome to the Shopify Community. 

 

In order to help investigate this further, can you please confirm how you added your pixel to your Shopify site? Did you code the pixel in, or add it to the 'Online Store > Preferences'  section of your admin by following these steps

 

Also, what theme are you using at the moment? You can find the name of your theme under 'Online Store > Themes'  in your admin.

 

If your theme has a pop out cart, or a 'drawer' cart, this could be why the event is not firing. These cart styles don't exist as their own page, but instead, they appear on the side of the site and can be popped open and close, without the page switching, or the URL changing. Due to this, the 'AddToCart' event may not fire when using this type of cart.

 

However, depending on which theme you're using, you may be able to edit the cart to be a 'page' style instead. To check if this is the case, open your Shopify admin and click on 'Online Store > Themes'  and select 'Customize'  on your live theme. In the theme editor, click 'Theme Settings'  at the top lefthand side of the page. Then, if you see a 'Cart'  section, select this. In this section, check to see whether your theme offers the ability to switch the cart from a pop out/'drawer' to a 'page' style instead. If so, please go ahead and make this change. Once that's done, you can follow these steps to test your pixel again to see if the 'AddToCart' event fires correctly. 

 

Please keep me posted on how this goes. If you're still having troubles, just reply to me here with the name of your theme and your store's URL and I'll be glad to take a closer look on my end. 

Rae | 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

AsthaUpadhyay
Shopify Expert
129 3 13

Hi,

This is quite strange that you are not getting Add to cart recorded into your Fb pixel.
Just want to ask you that have you installed the pixel by hard coding it into your theme file or have you installed it from "Online Store >> Preferences"

Because if you will install it by hard coding, then you will have to do it for all your files but if you go for installing from preferences setting, then Add to cart always gets recorded.

Thanks

CedCommerce | Digital Marketing Services

Digital Marketing Analyst
Skype: live:.cid.9de4dafff918787
bjobar
Tourist
3 0 1

Thanks for your answers.

 

So I am using the Debut Theme. I have made a couple of own tweaks to it and gone into the code.

When it comes to the pixel I installed it under "Online Store > Preferences".

 

Regardings this: "In the theme editor, click 'Theme Settings' at the top lefthand side of the page. Then, if you see a 'Cart' section, select this."

 

I dont see a "Cart" Section - but I know that when I add something to my cart it redirects me to another page. Not a pop up or similar. The only popup there is on selected products once you add them it shows a notification in the top right corner.

 

Now it says that Facebook registered 1 AddToCart within the last 7 days when Shopify registered more than 20 - My main traffic is from Facebook Marketing Ads so this is still broken I would say.

 

Kind regards

AsthaUpadhyay
Shopify Expert
129 3 13

Hello,

Please provide us your website url so that i can check and tell you exact issue.

thanks

CedCommerce | Digital Marketing Services

Digital Marketing Analyst
Skype: live:.cid.9de4dafff918787
bjobar
Tourist
3 0 1

@AsthaUpadhyay wrote:

Hello,

Please provide us your website url so that i can check and tell you exact issue.

thanks


Hello AsthaUpadhyay,

 

thanks for taking the time.

 

The website is: www.jubela.de 

 

The thing is that I edited the code from time to time myself to fit to my needs. I have basic html/coding knowledge so I was able to change some stuff without help. Now it comes back haunting me ^^ 

 

Kind regards

Rae
Shopify Staff (Retired)
Shopify Staff (Retired)
1166 95 322

Hi, @bjobar!

 

I wanted to follow up on this thread to check in on your question, make sure everything has been resolved, and confirm that your Facebook pixel is now working correctly. 

 

I checked out the URL that you shared above, and when I visited your site and added something to my cart, the 'AddtoCart' event fired correctly on my end. With this in mind, is your pixel now consistently and accurately firing this event? 

 

If you're still noticing issues with the pixel, or if there's anything else I can assist with, please let me know and I'll be happy to help out further. 

 

Thanks!

Rae | 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

Raphael546
New Member
4 0 0

Hey @Rae ,

 

I have a similar problem, not all events on the product page get recorded. While reading through your earlier responses, I noticed you talked about the page/cart selection part. Not sure if that could be the problem, but I made a second product section in my code, so I could edit the product page code separately for different products. The main product I sell on the store also uses this customized product page.

 

Could it be that the facebook pixel doesn't track the products that use the customized product page template? And if yes, how do I relink those products to the pixel? I got a tutorial on relinking pages with the pixel from a fb staff member, but even with that I somehow can't figure out how to do it -.-

 

I would really appreciate if you could help me with that. My store url is www.chromotech.de. Thank you so much!

 

Best regards,

 

Raphael 

 

 

Rae
Shopify Staff (Retired)
Shopify Staff (Retired)
1166 95 322

Hi, @Raphael546

 

Thank you for reaching out about this and sharing these details. 

 

To confirm, is your Facebook Pixel ID added to your Shopify admin under 'Online store > Preferences > Facebook Pixel', as mentioned in these steps? Or, is the pixel coded in to your theme? 

 

Also, can you please confirm which events on your product page aren't being recorded? The standard events that can be tracked with a Facebook pixel are mentioned here. For example, 'ViewContent'  is one of the events that may occur on a product page. Is this event being tracked on your product pages currently? 

 

Once I have these details, I'll be glad to help take a closer look into this. 

 

I hope to hear back from you soon! 

Rae | 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

Raphael546
New Member
4 0 0

Hey @Rae,

 

thanks for getting back to me. I installed the pixel under preferences > facebook pixel, it's not manually added to the code. 

 

For the events, on my product and home page, no event seems to get triggered. When I checked with the facebook pixel helper, the pixel first started firing when I reached the cart, there it added the view content event. 

 

Right now my events do get tracked though, I installed an app called win ads, which lets you add multiple pixels to your store. The app now tracks the events that previously didn't get tracked. So when you take a look at the store from now on, it will show the events getting triggered. If possible I would like to have the events tracked also without the app, because it's rather expensive to use. 

 

Should I uninstall it for now, so you can take a look at the issue?

 

Also, I checked to see whether the theory with the multiple product pages was right, and indeed, when I reverted back to a theme duplicate where I didn't have the multiple product templates, the pixel was firing normally. So the problem seems to come, atleast in part, from the several different product templates I use on the store. I used the first half of this tutorial for adding the second product page:https://community.shopify.com/c/Shopify-Design/Product-pages-Get-customization-information-for-produ...

 

Reverting all products back to the original product template doesn't fix the problem though. Once I select a different template for a product, the pixel stops firing permanently on all home and product pages across the store.

 

I hope that was clear, and thank you for your help!

 

Best regards,

 

Raphael 

Rae
Shopify Staff (Retired)
Shopify Staff (Retired)
1166 95 322

Hi, @Raphael546

 

Thanks for following up on this and sharing these additional details. 

 

I just checked out your site using the URL you shared in your previous reply. On this product page, I was able to see the 'ViewContent' event tracked correctly with my Facebook Pixel Helper. You mentioned that you're using an app currently which is allowing these events to be tracked. So, I wanted to confirm if you're able to see the 'ViewContent' event on this page on your end with this app installed, too? Equally, if you remove this app from your site, does the 'ViewContent' event still appear on your end when visiting a product page? 

 

Can you also please confirm which theme you're using on your site? You can find this information in your Shopify admin under 'Online store > Themes'

 

Thank you for completing that additional troubleshooting on a duplicate theme copy, too. With this information in mind, it does sound like the issue may be coming from the customized product page template. To confirm, are you using this template to offer additional product options? If so, you may want to consider using an app for this feature instead, and reverting your product template back to normal so that the events on your Facebook pixel are tracked correctly. However, if you would like to keep the customized product page template, you may need to use a third-party app to track pixel events moving forward, or reach out to Shopify Experts to see if your pixel can be added to your theme's code instead. 

 

You mentioned that reverting your product page template didn't resolve the issues with the pixel firing, and that the pixel actually stopped firing permanently. To confirm, did you test this in a new browser window with a cleared cache? Or, did you try removing the pixel from the 'Online store > Preferences' section of your admin and re-adding it, before testing this again? 

 

In the meantime, I'm also interested to hear if @AsthaUpadhyay has any suggestions regarding this?

 

I look forward to hearing back from you! 

Rae | 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

Raphael546
New Member
4 0 0

Hey @Rae ,

I deinstalled the app last tuesday the 9th, the View Content Events were still showing even after deinstalling it. That problem seems to be resolved.

During the time I had the app installed, all of my PUR events were doubled, likely because the app tracked the event on top of the facebook pixel under the preferences section. I deinstalled the app because of that, and the problem seemed to be resolved. Wednesday, I had the right amount of PUR events again. But for some reason, it started to duplicate events again yesterday. The app is still deinstalled, nothing changed in that regard.

For some reason I also have uneven purchase events, which shouldn't be possible if all of my purchase events were counted double. So either the pixel only doubled certain PUR events, or, what I consider more likely, the PUR events weren't doubled the whole time. If the second theory is correct, the events would have to have been doubled again starting yesterday, and would have to have stopped at some time today. I am really confused as to how that's possible.

I'll include some screenshots of my ads manager from wednesday, thursday and friday.

As to your other questions, I use the standard Debut theme, and I didn't test whether reverting the customization and clearing the cache would solve the problem. But considering that it is now tracking too many events, that's probably not relevant anymore 😕

 

Anyways, thank you for your help Rae! I am looking forward to your reply.

 

Best regards,

Raphael

 

wednesdaywednesdaythursdaythursdayfridayfriday

Raphael546
New Member
4 0 0

Update: the events went back to normal after those 2 days, now it works again perfectly. I don't really know how or why, but I am not going to complain either 😉

 

Thank you for your help @Rae, I think the problem is solved now.

Best regards,

Raphael

Rae
Shopify Staff (Retired)
Shopify Staff (Retired)
1166 95 322

Hi, @Raphael546

 

Thanks for this update. I'm glad to hear this issue has been resolved, and the events are being tracked as expected now. 

 

It's possible that the events were being tracked twice due to the third-party app that was downloaded on your site. If the app was coded into your site, uninstalling it may not have stopped the events from being duplicated either, as the app's coding would have remained on your theme. 

 

However, it sounds like the events are being tracked correctly now, so I hope this data remains correct moving forward. If you happen to notice any duplicate events in the future, I recommend reaching out to the developers of the app you were using for more information on how their app works, and if this app could cause the events to be tracked twice. To contact the app developers about this directly, please follow these steps

 

If there's anything else you need a hand with, please let me know. I'm happy to help! 

Rae | 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

Ethiko
New Member
3 0 0

Hi Rae, 

 

My website link is https://ethikoforyou.com/

I believe that my Add to Cart pixel is not firing and my add to carts and purchases are almost equal. I cant be having such an awesome conversion rate! 🙂

I have installed it using the Shopify preferences. I am currently using the Brooklyn theme and the cart is actually a drawer? Is this causing the problem? Should I change it to a page?

Also, how do I check if the pixel is firing or not?

 

regards

Sonia

Rae
Shopify Staff (Retired)
Shopify Staff (Retired)
1166 95 322

Hi, @Ethiko

Thanks for jumping in with these questions. 

I just checked out your site on my end, and it does look like you're currently using a 'drawer' cart. I recommend looking over this information on 'drawer' carts, and the 'AddToCart' pixel event that I shared previously in this thread:

If your theme has a pop out cart, or a 'drawer' cart, this could be why the event is not firing. These cart styles don't exist as their own page, but instead, they appear on the side of the site and can be popped open and close, without the page switching, or the URL changing. Due to this, the 'AddToCart' event may not fire when using this type of cart.

However, with this information in mind, when I viewed your site on my end, the 'AddToCart' event did fire correctly with the 'drawer' cart in use, according to Facebook's Pixel Helper tool. When you use this tool on your end, does the event fire correctly? Additionally, are there any other factors - aside from the conversion rate - that are leading you to believe the event isn't firing on your site?  

If you'd like to test this further with the different cart style options, you can absolutely switch the cart on your Brooklyn theme to a 'page' style instead. To do this, just follow these steps: 

  1. Log in to your Shopify admin. 
  2. Click on 'Online Store > Themes'
  3. Select 'Customize' beside your Brooklyn theme to open up the Theme Editor. 
  4. In the Theme Editor, click 'Theme Settings'
  5. Select the 'Cart' option. 
  6. Change the cart style from a 'drawer' to a 'page' cart here. 
  7. Click 'Save'

Then, you'll be able to visit your live site, add a product into your cart, and test out your Facebook pixel by following these steps, or using Facebook's Pixel Helper

Please keep me posted on how this goes! 

Rae | 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

Nimy12
New Member
2 0 0

Hi @Rae ,

I have added my pixel through preferences.

My problem is a bit different than others, i have a blog post with products from my store (i used Buy button), nor my pixel or my shopify Analitycs recieve the events of ATC, what can i do?

thanks a lot,
Nim

Rae
Shopify Staff (Retired)
Shopify Staff (Retired)
1166 95 322

Hi, @Nimy12

Thanks for reaching out. 

To clarify, is your blog hosted on Shopify, or is it on an external website? 

If you're using a Shopify blog, we don't recommend using buy buttons on the blog, as this can create issues with the checkout process. You can learn more about this here

Feel free to tell me a bit more about where your blog is hosted, and how you're using buy buttons, and I'll be happy to help look into this further. 

Best, 

Rae | 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

Nimy12
New Member
2 0 0
Hi,

The blog is hosted on my Shopify store.
What is the best way to put the products links into the blog? I am using Minimal theme.

Thanks,
Nim
Rae
Shopify Staff (Retired)
Shopify Staff (Retired)
1166 95 322

Hi, @Nimy12

Thanks for confirming. 

We have a great thread here on the Community that outlines a few different ways to add products to blog posts without using buy buttons. I recommend checking that out for more details and some next steps! 

If you have any questions about the methods shared in that thread, please make sure to follow up in that thread directly so that the individuals involved in that conversation can help offer more insight. 

This information should get you on the right track, but feel free to let me know if you have any further questions about your Facebook pixel. 

Cheers, 

Rae | 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