Cannot "accept" via Shopify's Privacy and Consent API.

Cannot "accept" via Shopify's Privacy and Consent API.

Shopify Partner
2 0 0

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?

Replies 3 (3)

Shopify Staff
2873 312 821

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 or the Shopify Web Design and Development Blog

3 0 0

We can overcome that on Shopify native stores by setting this setting like that "Collected after consent".


Shopify Partner
2 0 0

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.