Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi,
I added Facebook, TikTok, and Pinterest pixels to my store, (https://pastelmaison.com/) but they are not firing.
Interestingly, when checking the store in preview mode (like from product drafts preview) they work correctly.
Also, wrt Facebook pixel it fires on Safari too.
By checking Chrome Console in developer tools I see this error message, which doesn't appear in the preview mode.
Uncaught TypeError: ShopifyAnalytics.lib.generatePageObject is not a function at prod-custom-checkout-v2.js?shop=f2ebd2.myshopify.com:41:37 at prod-custom-checkout-v2.js?shop=f2ebd2.myshopify.com:184:3 (anonymous) @ prod-custom-checkout-v2.js?shop=f2ebd2.myshopify.com:41 (anonymous) @ prod-custom-checkout-v2.js?shop=f2ebd2.myshopify.com:184
It seems to be caused by trekkie.ready never being called:
var loaded = false; trekkie.ready(function() { if (loaded) return; loaded = true; window.ShopifyAnalytics.lib = window.trekkie;
I tried with the debugger and the function is never called (while it's called in preview mode).
Can anyone help me understand how to fix this?
I know a bit of coding, but I am no Javascript expert, so I am blocked...
Thanks for your help!
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025