As far as my knowledge goes, and as listed on the Analytics Documentation, GDPR is an opt-in type of consent, similar to PIPL.
I am based in Malta which is a country covered by GDPR. However, when checking for required consents using the code below, which I obtained from the documentation, I am not receiving an identifier for GDPR.
Furthermore, when connecting to China using a VPN, I did receive a PIPL identifier.
The idea is to have a similar consent flow to the sample shown below (taken from the documentation).
GDPR requires user opt-in (not automatic, similar to PIPL) but the CheckForRequiredConsents() function is not returning gdpr as a consent identifier.
I understand that the user can opt out of data collection but the problem is that although I am in a GDPR covered region, I am not receiving GDPR as a consent identifier.
public class PrivacyManager : MonoBehaviour
{
// Store whether opt in consent is required, and what consent ID to use
string consentIdentifier;
bool isOptInConsentRequired;
// Start is called before the first frame update
async void Start()
{
try
{
await UnityServices.InitializeAsync();
List<string> consentIdentifiers = await AnalyticsService.Instance.CheckForRequiredConsents();
if (consentIdentifiers.Count > 0)
{
consentIdentifier = consentIdentifiers[0];
isOptInConsentRequired = consentIdentifier == "pipl";
}
}
catch (ConsentCheckException e)
{
// Something went wrong when checking the GeoIP, check the e.Reason and handle appropriately
}
}
public void CheckUserConsent()
{
try
{
if (isOptInConsentRequired)
{
// Show a PIPL consent flow
// ...
// If consent is provided for both use and export
AnalyticsService.Instance.ProvideOptInConsent(consentIdentifier, true);
// If consent is not provided
AnalyticsService.Instance.ProvideOptInConsent(consentIdentifier, false);
}
}
catch (ConsentCheckException e)
{
// Handle the exception by checking e.Reason
}
}
}