What Web Pixels actually are
In 2022, Shopify introduced the Web Pixels API as part of its move toward a more performant, privacy-compliant checkout experience. Web Pixels is a sandboxed execution environment for tracking and analytics scripts. Instead of third-party scripts running directly on your storefront pages and blocking the main thread, they run in an isolated iframe that cannot affect page rendering performance.
The intent was correct. A pixel that runs in a sandbox cannot cause layout shifts, cannot block the page from becoming interactive, and cannot slow down the Largest Contentful Paint time. These are exactly the metrics Google measures for Core Web Vitals rankings.
The problem is adoption. Many third-party Shopify apps have not updated to use the Web Pixels API. They still inject scripts directly into themes using the legacy method: script tags in the theme code or Liquid templates. These scripts run on the main thread, where they compete with the rendering work that determines your Core Web Vitals scores.
How to tell if you have the problem
Work With John
Your site should be your best salesperson. If it is not, that is a fixable problem.
I work with US service businesses and B2B brands to build SEO systems that produce consistent, compounding leads. I will tell you exactly what is broken. No pitch.
Book a free strategy callOpen your Shopify store in Chrome. Open DevTools (F12). Go to the Network tab. Filter by "script" type. Reload the page and watch what loads.
Count how many third-party scripts load before your page becomes interactive. Each script that loads before the page is interactive adds to your Total Blocking Time and contributes to poor INP scores. Scripts loading from facebook.net, doubleclick.net, klaviyo.com, hotjar.com, or similar domains that are not in a sandbox are the candidates to investigate.
Then run your homepage through Google's PageSpeed Insights on mobile. Look at the "Eliminate render-blocking resources" and "Reduce JavaScript execution time" opportunities. If these appear with significant savings, third-party script loading is contributing to the problem.
Which scripts should be in Web Pixels
Any script that exists for tracking, analytics, or advertising should run in the Web Pixels sandbox. This includes: Facebook Pixel, Google Ads conversion tracking, Pinterest Tag, TikTok Pixel, Klaviyo tracking, Hotjar, and any other pixel that fires events based on user actions.
Scripts that legitimately need to run on the main thread are those that affect the UI directly: live chat widgets, product configurators, subscription management widgets. These cannot be sandboxed without breaking their functionality.
How to fix scripts that are outside the sandbox
First, audit your installed apps and their script injection method. In your Shopify Admin, go to Apps and then App permissions. Each app that lists "Read and write storefront content" or similar has the ability to inject scripts. This does not mean they are injecting them badly, but it identifies who to check.
For apps you suspect are injecting scripts outside the sandbox: check their documentation or support for "Web Pixels" or "Customer Events" support. Shopify rebranded the Web Pixels API as "Customer Events" in 2023. Apps that support Customer Events are using the sandbox correctly.
For apps that have not updated: contact support and ask when they plan to migrate to Customer Events. If the app is not actively maintained or the company cannot give a timeline, consider replacing it with an alternative that does support the standard.
The theme.liquid check most Shopify owners skip
Open your theme code in the Shopify theme editor or Shopify Admin under Online Store then Themes then Edit Code. Open theme.liquid. Look at the head section and the body section for any script tags from third parties that you or a previous developer added directly to the theme.
Any script tag in theme.liquid that is not from Shopify itself and is not clearly needed for core theme functionality is a candidate for removal or migration to an app that uses the Web Pixels API. Over years of Shopify store management, these scripts accumulate. A store that has been running for three years may have scripts in theme.liquid from abandoned tracking setups, old apps that were uninstalled but whose scripts were not removed, and A/B testing tools that are no longer active.
Removing a script tag from theme.liquid takes 30 seconds. The performance improvement from removing 3-4 unnecessary main-thread scripts can move a mobile PageSpeed score from 45 to 65 without any other changes.
If you need a full technical SEO and performance audit for your Shopify store, our ecommerce SEO service covers every layer of this infrastructure.
