Is there a way to remove or disable ‘shpxid’ tracking parameters being injected into the url when backlinked? These appears when visitors come from external links (IG, Klaviyo etc) to visit our Shopify store.
At the moment, we do attach the shpxid parameter during redirects from an alias or marketing-link so we can continue tracking the visit with the shopper’s existing cart and attribute the session correctly; I believe that the storefront should remove the parameter from the visible URL once the page loads though.
Since this behaviour is baked into the platform it can’t easily be disabled, but my understanding is that it shouldn’t create errors on a correctly configured domain.
Would you be able to reproduce the issue you’re seeing with the 302 redirect responses, capture the full response headers for that 302 status, and share an x-request-id value that accompanies the 302?
With that identifier I can trace the request on our end to see if we can pinpoint what’s triggering the redirect there and to see if this is expected behaviour/something we can flag to investigate on our end.
Hope to hear from you soon, we’ll get this looked into for sure.
No worries, @Binjuice. Glad to hear you were able to find a workaround! If you are open to sharing it here, please feel free to do so. No worries if not, just wanted to mention this in case your solution helps other folks encountering the same behaviour!
Thanks for sharing this Shopify-specific issue. For others facing this, one common workaround is to configure redirect rules on your alias domain (if you manage it separately, like through Cloudflare) to strip the shpxid parameter before it hits Shopify. This prevents the messy URLs in the browser bar. As Alan noted, the tracking will still work on the backend, but the user sees a clean link.
It would be really nice if Shopify stripped the shpxid URL parameter from the URL shown in the browser’s address bar, but this is unfortunately NOT the case.
A simple Google search for “shpxid” (including quotes) will show many posts where people copy-pasted the URL from their browser, including the shpxid URL parameter.
If I read your post correct, this may lead to miss-attribution of visitor sessions?
But far more importantly, it looks like the redirect chain may be messing with the Google’s automated canonical choices (shown as ‘Google chose different canonical than user’ in the Google Search Console), which affects the indexing of pages.