My name is Lilith, I'm on the Social Care team at Shopify.
Thanks for the screenshots and the details you provided. That was very helpful!
I've looked at the site that you linked in your post and tested my pixel helper to see where your pixel fires and doesn't. After taking a look at the flow of how your products get added to the cart I noticed that you're using an ajax script to keep the visitor on the same page and use the drawer to view the cart.
What happens with this timber drawer ajax custom modification (not supported by Shopify) is that the normal pixel event that fires when someone adds a product to cart and is taken to the cart page, it no longer viable.
When you install the pixel using the Online Store > Preferences section, your pixel's events will work normally when a customer adds a product to the cart and are then taken to the cart page.
If the site processes this add to cart activity differently by using a different code or script, then the basic installation of taking the customer to cart won't be used. Which means that the pixel event tracking code in that same script won't be used.
The great news is that you can fix this!
This will require you to customize some code just like with the ajax template code.
This is not supported by Shopify as it is a more complex modification. However, you can certainly look into hiring a Shopify Expert if you run into any challenges.
What you'll do is add your Facebook Add to Cart event tracking snippet to your custom ajax code in your theme. Alternatively, you can add an inline action event code to the button on your product page.
Here is the link to Facebook's help guide on generating the basic tracking event codes that can be installed.
Here are some additional advanced resources for more customized event tracking on your site if you wish to explore some additional methods to track activity.
Let me know if that helped! I'm happy to answer any questions you think of as you work on your business.
Hey, there! I see why!
The reason that your pixel is firing before you click Add To Cart is that the snippet you added is placed in an incorrect location.
Essentially what your code says right now is:
As soon as the theme begins to load (AKA: the <head> script) track that as an Add To Cart pixel event
As per the instructions in the guides I sent over, you'll want to add that event code to your ajax template or ajax scripts instead.
Since Shopify isn't able to support custom changes such as these to the code and I've got limited information on your site I'd still recommend reaching out to a Shopify Expert. If you're on a tight budget I'd suggest speaking with Apolomultimedia first. They've done some work on my own sites in the past and have had a great experience with them.
Here is a screenshot of which tab or template you should be placing the code in instead.
Let me know if this helped! Feel free to ask questions, I'm more than happy to help guide you in the right direction as you work through the modified Facebook Pixel tracking code installation!
Hi! Just to let you know I have the exact same problem.
The add to cart thing used to be firing and working few weeks ago with Ajaxify cart and is no longer working.
I've been looking in both ajaxify-cart-template.liquid file and my theme.js but without success in implementing it.
Each time I have errors or it is firing multiple times.
I don't know why it use to be working and I'd like to ..
Now I think the easiest way is to put a custom event on add to cart button and register the ATC from here..
EDIT : it works if I put it in my JS code in the itemAddedCallback function, but it is recorded twice if a person adds multiple items to cart.
Hi, Lilith! Could you please look at my page as well? I got the same problem. Everything tracks, page view, checkouts, purchases, but ADD to Carts don't. This happens for several of my shops and accounts, even with the new ones. Before it was all great. In one service they told me that the problem is with Sticky Add to Cart button. Anyway, it would be great if you can look at it. Thank you!
|2 hours ago|
|4 hours ago|
|6 hours ago|
|6 hours ago|
|9 hours ago|