Hi everyone,
We are having a problem with our Facebook pixel not firing on Purchase and Initiate checkout events.
We ve tried a bunch of things (found on this forum) and got in touch with a Meta expert and they are unable to fix it. They are basically saying it is a Shopify issue.
Last solution would be to add code manually on the purchase page but can’t find the page in the code sections.
Can anyone help on this ? Here is the store address : www.utileetordinaire.com
Thank you so much for your help !
Jerome
1 Like
Hello @JeromeLisek
- Make sure that you have entered the correct pixel ID in your Shopify settings and that the code is placed correctly on your website. You can find your pixel ID in your Facebook Business Manager. To place the code, follow the instructions in the Shopify help center.
- Google Tag Manager can help you troubleshoot issues with your Facebook pixel. To use Google Tag Manager, you’ll need to create a new tag and select the “Facebook Pixel” tag type. You’ll then need to enter your pixel ID and configure the tag settings.
- Contact Shopify support. If you’ve tried all of the above and you’re still having problems, you can contact Shopify support for help.
To add code manually on the purchase page, you can use the Shopify Liquid code editor. To do this, follow these steps:
- Go to Online Store > Themes > Edit Code.
- Select the Liquid tab.
- In the Custom Liquid section, add the following code:
{% if page_type == 'checkout_complete' %}
<!-- Your Facebook pixel code goes here -->
{% endif %}
Save your changes and preview your store to make sure the code is working correctly.
1 Like
@JeromeLisek Go to Settings > Checkout > Order status page > now insert your FB purchase/standard event tracking or conversion tracking code.
Hi,
Thank you for your response !
My Pixel was installed correctly from the Facebook & Instagram app on Shopify and fires for all other events including the Addtocart one. We reviewed everything with the Meta expert and ran out of solutions (we even stated with a fresh Pixel).
I installed tag manager but not sure how it works. 
Regarding modifying the code, I can’t the “Liquid tab” you are talking about. What I have is folders on the left including models, sections, extracts, etc … In each of them I have different sections including the extension “.liquid” .
I only found a custom.js page but not sure it is the one and where to paste the code …
Hi ! Thank you !
Can I paste this ?
{% if page_type == 'checkout_complete' %}
<!-- Your Facebook pixel code goes here -->
{% endif %}
No, your purchase event tracking code have to paste. your code was something like this
Oh, Ok, well I had something similar before but without the part on both ends.
It never worked unfortunately 
Hi there, do you know how to set up Facebook pixel on GTM to track purchase events?
Hi, have you solved your issue yet?
Not a proper solution… will not work on iOS devices. and also you need to turn off tracking from Facebook & Instagram Shopify App. Just wait for shopify until they fixed it and its been almost one month Shopify did not give any solution
1 Like
You can not modify and place any code on checkout page unless you are on Shopify Plus Plan. But you can do this on thank you page.
Go to settings
Checkout
Find there “Additional scripts”
Place your Custom Facebook Pixel Code there.
Yeah, I want to add code to the “additional scripts” to track purchase events. But I don’t have the custom facebook pixel code. Do you have it?
Yes, we did on our site but you need to turn off the Facebook & Instagram App first to work it properly and also note that I will not work on iOS devices. As I have mentioned above it not the proper solution, the proper solution is to go with official Facebook App and unfortunately it is not working properly (tracking conversions 60%-70%) because of an issue shopify facing.
This is the facebook custom code.
![]()
just add it to “Additional Scripts”
Okay. Thank you for your help. I can’t use facebook and Instagram app on my store due to I don’t have Shopify payment.
1 Like
The code works well.
May I know what is the Facebook pixel code you added to “theme.liquid” file?
1 Like
Hi there, I already added the same code in the theme liquid file, but can’t track the “add to cart” events. Does it need to add the “add to cart” code to other files?
Create an add to card event from facebook it will provide a code and invoke it that code on “Add to cart” button click.
Remember, do not forget to include lineitems in the facebook code.
It was done. Thank you so much! I have another question about the Facebook catalog missed ID. Do you know how to add Microdata Tags to the store?