Facebook pixel

Highlighted
Tourist
34 0 1

does anyone know why the facebook pixel event add to cart is not triggered?

0 Likes
Highlighted

Hello 

In addition to tracking your website visitors, Facebook pixel lets you track nine different “Standard Events” that people make on your website.

  1. View Content
  2. Search
  3. Add-to-cart
  4. Add-to-wishlist
  5. Initiate checkout
  6. Add payment into
  7. Make purchase
  8. Lead
  9. Complete Registration

If you want to track any of these Standard Events, as you stated “Add-to-cart” you’ll need to add some additional code to your website’s header section, just above the </head> tag.
Your website’s original code: Paste the Facebook pixel code between the <head> and </head> tags of your web page.
Your Facebook pixel base code: what you installed in the previous step of this guide
Your standard event code: Within your Facebook pixel code, above the </script> tag, paste the Standard Event code. You’ll need to add the Standard Event’s code to every page you want to track.

6.png


AddToCart either on a new page load or on the click of an Add To Cart button. There are multiple ways to handle clicks on buttons.
Here’s how the code will look:

<!-- Somewhere there is a button that performs Add to Cart -->
<button id="addToCartButton">Add To Cart</button>

<!-- Add Pixel Events to the button's click handler -->
<script type="text/javascript">
var button = document.getElementById('addToCartButton');
button.addEventListener(
'click', 
function() { 
fbq('track', 'AddToCart', {
content_name: 'Really Fast Running Shoes', 
content_category: 'Apparel & Accessories > Shoes',
content_ids: ['1234'],
content_type: 'product',
value: 4.99,
currency: 'USD' 
}); 
},
false
);
</script>

So please check if the code has been installed at standard event way on your website.

 

Want to modify or incorporate custom changes on store, Hire us.
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Free Review and advice for sale on store | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | SEO & Digital Marketing | Site Speed Optimization | Performance Site Audit
0 Likes