Correct Shopify Cookie Consent implementation

New Member
6 0 0
According to GDPR shopify can not set statisitc and marketing cookies without prior user consent.

When I enable "Limit tracking for customers in Europe” setting - Shopify still places the cookies without consent, but as session cookies. This is still not GDPR compliant - but there is nothing we can do about that at the moment.

When a user gives consent the cookies will, according to Shopify documentation, be upgraded from session cookie to permanent cookie.
But I can not get this to work.

I will not be using shopify api to control other apps, but I'm only trying to control how and when shopify is placing cookies.
First question: Do I need to place this code on all pages - and is it correct?




name: 'consent-tracking-api',
version: '0.1',
error => {
if (error) {
throw error; // if you want to raise
new Banner(); // or whatever method your banner uses to initialize




Second Question: Is this the correct code to run when a user consent is given?



function handleAccept(e) {
document.addEventListener("trackingConsentAccepted", function () {
console.log("trackingConsentAccepted event fired");



I'm implementing this with google tagmanager and metomic cookie consent widget.
The second script will run when a user gives consent.

Replies 0 (0)