Customer Privacy API

ae179dpl
New Member
2 0 1

I'm trying to build a proper cookie consent form for our shop using the Customer Privacy API (https://shopify.dev/docs/themes/consent-tracking-api). I know this only works for Euopean customers so I'm using a VPN to obtain a European IP address and tunnel my traffic through the VPN. I'm located in Canada.

Every single time, no matter if I'm using a VPN or not, the shouldShowGDPRBanner() method always returns false (it should be true for European customers). The userCanBeTracked() method always returns true (this should be false for European customers). Essentially, it doesn't look like Shopify is properly detecting my location, therefore the GDPR banner would never load. This is always done using incognito/private browsing windows so that there are no prior cookies tracking our consent.

I have enabled the options for Limit tracking for customers in Europe and Limit the third-party sale of your California customers’ data in the shop's settings.

Has anyone had any success using a VPN to test out the GDPR tracking options outside of Europe? If so, could you provide me with a link to the VPN service that worked for you, or any alternative way you got this working?

Any help with this is greatly appreciated.

Replies 3 (3)
CaseJnr
Shopify Partner
8 0 1

@ae179dpl  Did you ever figure this out?

ae179dpl
New Member
2 0 1

Not yet. I put this project on hold as we're completely revamping our codebase to use Shopify 2.0. When I revisit the cookie consent portion of the revamp, I'll post back if I have any updates.

James170
New Member
1 0 0

I am having this problem also - seems like shouldShowGDPRBanner is always set to false and not behaving according to the Shopify documentation. Would appreciate some help!