Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello guys,
I have added the Meta Pixel script in the Shopify code but a yellow underline can be seen and it says "Assets should be served by the Shopify CDN for better performance". Is there any issue with it?
Secondly, I have added all the pixel events with the help Meta Pixel Setup tool, but whenever I try to add a purchase event through the checkout page, the setup tool just disappears. How to add or setup a purchase event in the Pixel?
Hey, @SyedHassan2509
It sounds like the script you added is not being served by the Shopify CDN and it's recommending you do. There could be a few causes for this error to occur:
1. Ensure that the Meta Pixel script is placed in the appropriate section of your Shopify theme. It's recommended to add scripts in the theme settings or using a script tag in the theme code editor.
2. Consider hosting the script on the Shopify CDN. You can upload the script as a file in your Shopify theme assets and reference it from there.
As far as the setup tool disappearing:
1. If the setup tool is not working as expected, you can manually add the purchase event code snippet to the checkout page. Locate the checkout page template in your Shopify theme and insert the purchase event code snippet provided by Facebook Business Manager. Once you do this, you can verify it works by running a test purchase to ensure proper event tracking. Additionally, use the Facebook Pixel Helper browser extension to verify that the purchase event is firing correctly on the checkout page.
Let me know if this helps!
Dirk | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024