Discussing APIs and development related to customers, discounts, and order management.
I am working on an analytics app, and using the new WebPixel api to track user events.
To track a single user, I use the browser.cookie.set("mysessionid", some_generated_id) function to set a session id if it is not already being set.
There is a issue with reading this value consistently, and I've tracked it down to the fact that the set cookies also have a path, which is set from whatever page the cookie was set on, making it impossible to read the cookie from a different path
( from chrome dev tool - two cookies with same name, different path. Depending on path of current page, my pixel code will read one or the other )
The api function does not enable me to set a path - so I am either using this wrong or there is a path variable needed in the api call. Any ideas?
In order to investigate a bug report we will require further information on how the app in question is interacting with the API such as the request body and headers, as well any response errors and response headers (x-request-id, cursor) from the error. Our API team can then take a look using internal tools and logs. If you can submit this issue using the Report an Issue Form here https://help.shopify.com/en/questions/partners#/contact/report-an-issue it will help expedite the process as this will enable us to authenticate access where necessary. Thank you.
KB77 | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
@hrstrand you need to add the root domain to access the cookies across the domain and create shared cookies.