Facebook Pixel Does Not Show Add To Cart Event

Topic summary

Issue: Facebook Pixel is not firing the Add to Cart event on a Shopify store using the latest Dawn theme. The user couldn’t find the type=“submit” in main-product.liquid to add onclick=“fbq(‘track’, ‘addtocart’);” as per an external guide.

Update/solution: The submit button location changed in the 2023 Dawn theme. It now resides in card-product.liquid. Adding the onclick code there is the suggested fix.

Context: Facebook Pixel (Meta Pixel) tracks user actions (events) like Add to Cart for ad attribution. Dawn is Shopify’s default theme; theme file structure changes can move button markup.

Outcome: The original poster confirmed the guidance helped.

Open question: Another participant reports multiple type=“submit” elements and asks whether the onclick should be added to all or only one, and if one, which specific submit button. This remains unanswered, so the thread is partially resolved and still open regarding precise implementation when multiple submit buttons exist.

Summarized with AI on December 16. AI used: gpt-5.

Hi folks!

My facebook pixel is not tracking add to carts. I am using the latest Dawn theme. I have already disabled drawer/popup cart and am just using the page option, but it is still not firing.

Following directions from this page however, I cannot find type=“submit” in the main-product.liquid file in order to add the code onclick=“fbq(‘track’, ‘addtocart’);”.

Is it possible this has moved in the 2023 version?

Thanks.

Hi @kmacgillivray Yes it has been moved and you can find the submit button in card-product.liquid, you may add the onclick code in this file.

Hopefully it will help you. If yes then Please don’t forget hit Like and Mark it as solution!

Best Regards

Sahil

1 Like

Thank you!!

Welcome @kmacgillivray , If you need any other assistance then please feel free to ask the same.

Best Regards

Sahil

There are too many type=“submit”. do we have to add the onclick=“fbq(‘track’, ‘addtocart’);” under every type=“submit” statement or just one? if one then which one?