When working with Shopify web pixels and Google Analytics 4 (GA4), many store owners and marketers encounter a confusing issue: their website URLs start showing additional sandbox information that wasn’t there before. This not only clutters analytics reports but can also cause problems with tracking accuracy and reporting consistency.
If you’ve ever come across URLs like this:
https://www.website.com/web-pixels@37576d17wbba9276ep40878d8dm82cfbb0f/custom/web-pixel-68813029@5/sandbox/modern/collections/
– you’re not alone. This is a common issue reported by users who are using Shopify web pixels in a sandbox environment. The problem becomes noticeable when GA4 automatically tracks page views and includes the full sandboxed path instead of the clean, user-facing URL.
In this article, we’ll cover everything you need to know about this issue:
- What web pixels and sandboxes are in Shopify
- Why sandbox URLs appear in your GA4 reports
- The impact of sandbox URLs on your analytics
- How to fix the issue by disabling automatic page tracking
- Step-by-step implementation using Google Tag Manager (GTM)
- Best practices for cleaner data in GA4
What is a Web Pixel in Shopify?
A web pixel in Shopify is a snippet of code that lets you collect data about user interactions on your store. Pixels are widely used for marketing, retargeting, analytics, and conversion tracking. For example, the Facebook Pixel or Google Analytics tracking code are common examples.
Shopify has introduced a standardized way to manage and install pixels through its Customer Events API and Web Pixels Manager. This allows developers and marketers to deploy pixels without directly editing the theme code.
The benefits include:
- Centralized pixel management
- More secure, sandboxed environment for scripts
- Compatibility with privacy and consent requirements
What is the Sandbox in Shopify Web Pixels?
When Shopify runs third-party code (like your web pixels), it does so in a sandboxed environment. This sandboxing isolates the pixel code from your main website code, ensuring that:
- Malicious or buggy code won’t break your storefront.
- Pixels run in a controlled environment with limited access.
- Shopify maintains performance and security for all stores.
The downside of this sandboxing is that it modifies URLs to indicate that the code is running in a sandbox. For example:
/web-pixels@37576d17wbba9276ep40878d8dm82cfbb0f/custom/web-pixel-68813029@5/sandbox/modern/
Instead of clean, user-friendly URLs, GA4 ends up logging these long, messy URLs in its reports.
Why Do Sandbox URLs Show Up in GA4?
By default, GA4 uses Enhanced Measurement to automatically track page views, scrolls, outbound clicks, site searches, and other events.
When GA4 runs in a Shopify pixel sandbox, its automatic page_view tracking captures the sandboxed URL instead of the clean, canonical URL of your storefront.
So instead of tracking:
https://www.website.com/collections/
You end up with:
https://www.website.com/web-pixels@37576d17wbba9276ep40878d8dm82cfbb0f/custom/web-pixel-68813029@5/sandbox/modern/collections/
This creates multiple problems:
- Data Fragmentation – Reports show inflated or duplicate pages because each sandboxed version looks like a unique URL.
- SEO & Attribution Issues – Attribution models may misinterpret user journeys.
- Hard-to-Read Reports – Messy URLs make it difficult to quickly analyze top pages.
The Fix: Turning Off Automatic Page Tracking in GA4
The solution is to disable GA4’s automatic page tracking (from Enhanced Measurement) and implement manual page_view events that only use clean URLs.
This ensures GA4 records your actual site URLs instead of sandboxed ones.
Step 1: Turn Off Automatic Page Views in GA4
- Log in to your Google Analytics 4 property.
- Go to Admin → Data Streams.
- Select your Web Data Stream.
- Under Enhanced Measurement, click the gear icon.
- Toggle off Page views.
This stops GA4 from automatically tracking page views (which is where the sandbox issue originates).
Step 2: Send Clean Page Views Manually
Now, you need to send your own page_view events that use the real page path and URL.
If you’re using Google Tag Manager (GTM), this is straightforward:
- In GTM, create a GA4 Configuration Tag (if not already set up).
- Create a new GA4 Event Tag.
- Event Name:
page_view - Parameters:
page_location:{{Page URL}}page_path:{{Page Path}}
- Event Name:
- Trigger: All Page Views
This way, GA4 only receives your true storefront URLs, not the sandboxed versions.
Step 3: Verify the Implementation
Once implemented:
- Use GTM Preview Mode or GA4 DebugView to check if events are firing correctly.
- Confirm that GA4 now records clean URLs (without
/web-pixels/.../sandbox/). - Compare data before and after to ensure consistency.
Why Shopify’s Official Link is Broken
Shopify previously had documentation pointing to a guide about “Cleaner Page URLs” when using GTM and GA4 with custom pixels. Unfortunately, the link is currently broken, leaving many users confused.
Thankfully, the workaround is well-known among the Shopify developer and analytics community: disable automatic GA4 page tracking and send your own clean events.
Best Practices for Cleaner Analytics Data
- Always Validate URLs – Periodically check your GA4 reports to ensure URLs are clean.
- Use Canonical URLs – Ensure your site has proper canonical tags to reinforce clean URL usage.
- Tag Events Properly – Beyond page_view, manually define other key events (add_to_cart, purchase, etc.) for accuracy.
- Test Before Publishing – Always test in GTM Preview mode before publishing changes.
- Document Your Setup – Keep internal notes so your team knows why automatic tracking is disabled.
The Bigger Picture: Why This Matters
Accurate analytics is the foundation of data-driven decision-making. If your data is polluted with sandbox URLs, you risk:
- Making wrong assumptions about which pages are performing well.
- Misallocating ad spend because conversions seem tied to incorrect URLs.
- Losing trust in your reporting.
By cleaning up sandbox URLs and implementing manual tracking, you:
- Ensure consistent, accurate reporting.
- Make data easier to analyze.
- Maintain full control over what GA4 records.
Final Thoughts
The issue of web pixel sandbox URLs appearing in GA4 reports is frustrating but solvable. It happens because GA4’s automatic Enhanced Measurement captures sandboxed paths instead of storefront URLs.
The fix is simple:
- Disable automatic page views in GA4.
- Implement your own clean
page_viewevents using Google Tag Manager.
This approach not only resolves the immediate issue but also gives you more control over your analytics setup. Cleaner data means better insights, and better insights lead to smarter marketing decisions.
If you’re struggling with messy URLs in GA4 due to Shopify web pixels and sandboxing, follow the steps above and take control of your tracking setup today.

