2

I am trying to add Facebook Pixel to my Magento2 Store,

I added the Pixel code to the header, but can't find a way to add the event tracking code after <body> in selected pages (Exemple: in checkout page for Purchase tracker)

I added all the tracking code in the header (inside the Pixel code) but it gives incorrect results since all pages will be tracked for selected events

<script>
  fbq('track', 'PageView');
  fbq('track', 'Purchase');
  fbq('track', 'Lead');
  fbq('track', 'CompleteRegistration');
  fbq('track', 'AddToCart');
  fbq('track', 'InitiateCheckout');
  fbq('track', 'ViewContent');    
</script>
0

The Simplest way to add this facebook pixel code is to Download the ready made Module and Use.

For ex:

You have Apptrian Extensions - Click Here

Or

You have BSS Commerce Extensions - Click Here

Please check, Hope this will solve your problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.