App reviews, troubleshooting, and recommendations
I need session ID for some analytics purpose, need to know where this particular field is stored in browser (cookies/local storage/session storage)
I assume this must be somewhere stored in cookie
What do I mean by session?
Follow the Shopify Analytics link & go to the [Acquisition] section.
1. Online store sessions (The number refers to how many different sessions occurred on your online store within the specified date range. The number of visitors is also displayed. A unique visitor might have more than one session)
i.e. a browsing session
Also attaching an image of cookies. Which field represent session ID
_shopify_s
_shopify_y
Also where can I find the documentation of of what each value in cookie/localStorage/sessionStorage represent (shopify docs are little hard to navigate)
Hi @ajs540 ,
This is Theodore from PageFly - Shopify Page Builder App.
Session IDs are typically stored in browser cookies. These cookies are temporary and vanish when you close your browser.
Shopify cookies named _shopify_s and _shopify_y likely store session data but their exact purpose might not be documented by Shopify.
A session represents your browsing activity on a website. A new session starts when you open your browser and visit a site. The session ID helps the site track your actions throughout that session.
Best regards,
Theodore | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
Hi @ajs540,
You can find the session ID in cookies with key _shopify_y. This value has 1-year life time until you clear browser storage. You can access this value through Javascript using this code
ShopifyAnalytics.lib.user().traits().uniqToken
-> Result
Identical to _shopify_y's value in cookies
I hope my info is helpful to you.
B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.
B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.
B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.
BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025