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>