Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hi, I'm using Shopify's consent and privacy api for a consent banner. Rejecting works fine but when I accept with
window.Shopify.customerPrivacy.setTrackingConsent(true, console.log);
I get the following error:
{
"code": "ineligible",
"message": "cannot set origin cookies unless shop is blocking GDPR"
}
The API docs don't mention this, could someone please assist?
Hi - this does seem like an unusual error, could there be store admin settings that is causing this? I'll also connect with our dev teams to see if they have any context on this error message.
Liam | Developer Advocate @ 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
We can overcome that on Shopify native stores by setting this setting like that "Collected after consent".
I can't seem to find this an an option, if I got to Online Store > preferences > privacy it tells me it's now managed by /settings/privacy and when I check there, there's no options like you have above.
I've just checked again though and it looks like it's been fixed on shopify's side or something because it appears to work now.
Thanks!