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.
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.
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