Updated: December 19, 2025
Issue
In GA4 reports, the URLs appear garbled, with a structure like:
/wpm@10e09e41w77fb031apd6c28ceam532d5d9a/custom/web-pixel-118849878@4/sandbox/modern/page-name
Reason
This happens because GA4 is installed via Shopify Custom Pixel, which runs in Sandbox mode. URLs in Sandbox are irregular, causing GA4 reports to display these garbled paths.
Solution
To fix this, you should disable default page tracking and use custom events to send clean URLs.
Step 1: Disable Default Page Tracking
Since Custom Pixel runs in Sandbox, the default page tracking will capture irregular URLs.
To prevent this, set send_page_view to false in GA4 so that default page views are not sent, but Google Tags still load.
In GTM, click「Tags」——「New」——「Choose a tag type to begin setup…」——「Google Analytics」——「Google Tag」, name it “Disable Default PageView”, and then make the following settings:
Step 2: Use Custom Events to Track Actual Pages
Copy the following code into Shopify’s Custom Pixel:
analytics.subscribe('page_viewed', (event) => {
window.dataLayer.push({
'event': 'page_viewed',
'page_location': event.context.window.location.href,
'page_title': event.context.document.title,
});
});
Step 3: Configure GTM Variables
In GTM, click「Variable」——「New」——「Choose a variable type to begin setup…」——「Data Layer Variable」, name it “dlv_page_location”, and then make the following settings:
Similarly, create the data layer variable dlv_page_title.
Step 4: Create a Custom Trigger
In GTM, click「Trigger」——「New」——「Choose a trigger type to begin setup…」——「Custom Event」, name it “page_viewed”, and then make the following settings:
Step 5: Create GA4 Event Tag
In GTM, click「Tags」——「New」——「Choose a tag type to begin setup…」——「Google Analytics」——「Google Analytics: GA4 Event」, name it “GA4-Event-PageView”, and then make the following settings:
With this setup, GA4 reports will display clean, readable URLs, excluding Sandbox paths.




