Skip to main content

_shopify_y and _shopify_s cookies will no longer be set

What's changing?

Starting on January 1st, 2026 Shopify will no longer set the following cookies on merchant storefronts:

  • _shopify_s
  • _shopify_y

Required updates

While accessing internal cookie values is never recommended as they frequently change, any code that currently accesses the cookie values will need to be adapted to use documented APIs.

_shopify_y

If you're accessing this value via document.cookie you'll have to use Web Pixels and particularly the clientID property of any Standard or DOM event (See API reference).

This example shows a Custom Pixel, but this would work with a Web Pixel App Extension as well.

  • Go to Admin > Settings > Customer Events > Custom Pixels
  • The following JavaScript within a web pixel would log the ID formerly known as _shopify_y on every page view, assuming proper user consent is given:
analytics.subscribe('page_viewed', (event) => {
  console.log("The client's ID is ", event.clientId);
});

_shopify_s

Shopify will not offer a replacement value. However, as part of the browser APIs (or Web Pixels API’s browser interface) it is possible to create a session-length cookie, which is equivalent functionality.

Was this section helpful?