Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I have added Twitter's basic code in Customer events. But when I use Chrome's Twitter plug-in tool to detect the pixel, I always get this error. How to fix it?
Btw, there is no problem adding the code directly to [theme.liquid]. I want to know why?
P.S. error message:
1. Warning. No Referrer found. This is expected if you are loading this page directly. If this occurs after redirecting from a Twitter Ad or other page, this may indicate an error.
2. An iFrame was detected. Remove the tag from the iFrame to properly track URLs.
The tracking snippet needs to run before the event fires. When you add it through a property in the cms the load order is defined by the app or platform, in code the conversion metric will follow after the library is loaded.
Thanks for your answer. Can you please tell me how to adjust my Twitter code?
window.addEventListener('load', (e) => {
if(window.twitter == null) {
window.twitter = [];
}
window.twitter();
})
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025