Hi @hrstrand did you find a solution for this?
Topic summary
Issue: Using the Web Pixel API’s browser.cookie.set to store a session ID creates cookies scoped to the page path, leading to duplicate cookies with the same name but different paths. This causes inconsistent reads depending on the current page path.
Details: Chrome DevTools shows two cookies with identical names on different paths. The API currently doesn’t expose an option to set the cookie path.
Requests/Guidance: A Shopify staff member asked for a formal bug report with request/response details (including headers like x-request-id, cursor) via the Report an Issue form to investigate. Another participant suggested setting the cookie on the root domain to enable shared access across the domain.
Key terms: Cookie path limits where a cookie is available within a site’s URL structure; root domain sharing refers to setting the cookie domain so it’s accessible across subpaths/subdomains.
Status: No confirmed solution yet. The thread remains open; one user asked if a fix was found.