Not Receiving GDPR Consent Requirement

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.

Using Analytics version 4.1.0
Unity 2021.3.1f1

List<string> consentIdentifiers = await AnalyticsService.Instance.CheckForRequiredConsents();

Hey @OwenSquirrel

CheckForRequiredConsents is an automatic Opt-In,
To allow users to opt-out, you can create a button which calls : Events.OptOut();

Take a look at this documentation for further instructions: Data privacy and consent (unity.com)

TL;DR for the documentation:
To get the URL, you can use: Application.OpenURL(Events.PrivacyUrl);

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
       }
   }
}
1 Like

I believe GDPR & CCPA are not working as you would expect with the current analytics version.

I too experienced this ‘issue’ and was told the consent process is only in-place for PIPL at present (where opt consent is mandatory)

1 Like