TL;DR: What ISO 3166-2 region codes require GDPR compliance?
I'm trying to implement my own GDPR compliance using Google Tag Manager. This documentation has a header titled "Region-specific behavior." It says:
To set default consent states that apply to visitors from particular areas, specify a region in the template. Using region values enables template users to comply with regional regulations without losing information from visitors outside those regions. When a region is not specified in a
setDefaultConsentState
command, the value applies to all other regions.For example, the following sets default status for analytics_storage to denied for visitors from Spain and Alaska, and sets analytics_storage to granted for all others:
const setDefaultConsentState = require('setDefaultConsentState'); setDefaultConsentState({ 'analytics_storage': 'denied', 'region': ['ES', 'US-AK'] }); setDefaultConsentState({ 'analytics_storage': 'granted' });
It provides zero information on where to find these region codes.
A clue is given in the API documentation. It says, "Region codes are expressed using country and/or subdivisions in ISO 3166-2 format." Just like the previous page, it doesn't provide a link to the list.
Thankfully, Wikipedia is one of the first results when you Google that format, and it does provide all the information.
Now you have every value you could use, but it's still up to you to reduce the list to GDPR codes. What region codes should be used for GDPR?
I know @TimSeguine 's comment to my question got a lot of upvotes, but according to the Law Stack Exchange, their statement is incorrect. Be that as it may, there is a good legal reason to always show the banner, just not for the reason given. If you're curious, check the link for more details.