Consent tracking API - cookie_not_present error

apts007
New Member
2 0 4

Hello,

In my app, I've implemented Consent tracking API as in the documentation example. It doesn't work.

When calling Shopify.trackingConsent.setTrackingConsent method, there is a 400 error when requesting /set_tracking_consent.json . The error message is: cookie_not_present "cookie not present". I've found it is related to the Shopify's '_tracking_consent' cookie. When should this cookie be created? Should my app set it? If so, can you point me to a manual on how to set it? 

Can you give a detailed instructions how to deal with this problem? The documentation is minimal and does not address it.

 

Replies 5 (5)
simonski
Shopify Partner
130 9 45

I also get this error in the console on every page with my minimal theme. I have the beeclever GDPR consent manager installed. How to fix this? I have two errors with this in the console. Anybody has some thoughts about this?

brant
New Member
1 0 1

Not 100% sure, but if you go into Online Store › Preferences › Customer privacy, you'll be able to enable limited tracking for GDPR and CCPA. This might kickstart that required cookie.

simonski
Shopify Partner
130 9 45

@brant Thank you so much for your answer!!! That's it! Unfortunately, the beeclever GDPR Cookie consent tool i'm using is not yet using this new shopify cookie API, so if I activate this option you mentioned in preferences, the error is gone, but also my cookie tool is not showing up anymore and I have no possibility to run the tag manager and analytics. I guess beeclever is already working on a solution, I'll get into contact with them.

Thank you!!!

PatrickAlessi
New Member
6 0 0

_tracking_consent cookie is NOT created by default. It is only created if the store owner enables the restricted tracking in the admin. When enabled, the cookie is set.

I think your app should only look for it, if it is set. If it is not set, it should ignore it and can’t use the Consent API.

Pandectes
Shopify Partner
19 0 3

I know there has passed some time from the last message on this thread but it is a good chances to let you know that GDPR Cookie Bar +ePrivacy Page is compliant with Shopify's Cookies and customer tracking and handles all processes in the background that is related to that as long as the Data Subject Requests.