I’ll introduce the reserved words that Shopify uses as URL parameters and how to use namespaces when developing customizations.
Background: URL Parameter ?sid=1 Disappears on Shopify Sites
I received a consultation about URL parameter ?sid=1 disappearing when added to Shopify sites, so I investigated it.
Testing ?sid=1&__sid=2
I used one EC site made by Shopify from Ecommerce templates and online store template examples - Shopify for testing.
https://www.mollyjogger.com/?sid=1&_sid=2&__sid=3
When accessing this URL, sid=1 disappeared and was redirected to:
https://www.mollyjogger.com/?_sid=2&__sid=3
Others: _sid, q, variant, etc.
It would be nice if Shopify’s official documentation listed URL parameters, but there didn’t seem to be any.
From just my brief investigation, Shopify uses the following URL parameters:
_pos
_sid
_ss
q
variant
Solution: Use Namespace for Custom URL Parameters in Shopify
I think adding double underscores __ or adding a namespace would avoid conflicts with reserved words for URL parameters that Shopify uses.
That’s all from the Gemba about developing with consideration for URL parameters that Shopify uses.
