Solved

manage scripts based on cookie banner settings

Phillip1337
Shopify Partner
5 3 1

Hi, I am using no third party app but the integrated shopify option to show my cookie banner.
So far so good but how can I access the settings the visitor enabled/disabled in that banner?
I haven't noticed any cookie or local/session storage with this data.

What I thought is that shopify itself manages the blocking of cookies when they are inserted by an app (haven't tested it though) but what about custom scripts I call in my theme? How do I block them if the visitor doesn't want them?
(screen in germany)

Phillip1337_0-1713351678051.png

 

Accepted Solution (1)

Phillip1337
Shopify Partner
5 3 1

This is an accepted solution.

I solved it "myself" with the help of shopify chat support. I was looking for this -> https://shopify.dev/docs/api/customer-privacy
With this API I can get each saved cookie setting and change my code according to it.

View solution in original post

Reply 1 (1)

Phillip1337
Shopify Partner
5 3 1

This is an accepted solution.

I solved it "myself" with the help of shopify chat support. I was looking for this -> https://shopify.dev/docs/api/customer-privacy
With this API I can get each saved cookie setting and change my code according to it.