How to add META Pixel code for tracking 'Initiate Checkout' and 'Purchases'?

How to add META Pixel code for tracking 'Initiate Checkout' and 'Purchases'?

yanilla
New Member
7 0 0

I am setting up my META Pixel to work with shopify store and track information such as page view, content view, add to cart, initiate checkout, and purchases. I have successfully setup my Pixel, and I can track 'page view', 'content view', and 'add to cart'. 

 

Is there a way of tracking 'Initiate Checkout' and 'Purchases' without having ShopifyPlus and access to 'checkout.liquid'?

 

I am using the code provided by my Pixel e.g;

 

<script>
fbq('track', 'Purchase', {
value: 0.00,
currency: 'GBP',
});
</script>

 

Where should I paste this to track 'purchases' to my PIXEL and, where should I paste the code for tracking 'initiate checkout'?

Reply 1 (1)

EYCB
Shopify Partner
70 5 13

Hey Yanilla,

For tracking 'Purchases' events, you will need to add the tracking code to the "thank you" page that is displayed after a customer completes a purchase. Look for the "thank you" message on the page, and add the tracking code right before or after that message.

coddvila_0-1674842022707.png


"<p>Thank you for your purchase!</p>
<script>
fbq('track', 'Purchase', {
value: {{ total_price | money }},
currency: '{{ shop.currency }}', });
</script>"

Add the code in the additional scripts go to the settings -> checkout and accounts and find additional scripts and paste into them.

Check if it works for you.

banned