Skip to main content

getShopifyCookies

Parses cookie string and returns Shopify cookies. For tracking values, consider using getTrackingValues instead, which reads from modern Shopify cookies.

Gets the values of _shopify_y and _shopify_s cookies from the provided cookie string. If the Shopify cookies doesn't exist, this method will return an empty string for each missing cookie.

Anchor to cookies
cookies
string
required

Shopify cookies names

Anchor to _shopify_s
_shopify_s
string
required

Shopify session token: Value of _shopify_s cookie.

Anchor to _shopify_y
_shopify_y
string
required

Shopify unique user token: Value of _shopify_y cookie.



Was this page helpful?