Class ConsentTracker
Implements
Inherited Members
Namespace: Unity.Services.Analytics.Internal
Assembly: solution.dll
Syntax
public class ConsentTracker : IConsentTracker
Constructors
Name | Description |
---|---|
ConsentTracker() |
Properties
Name | Description |
---|---|
requiredHeaders | Returns the required headers, based on the required legislation.
If PIPL is not required it will return an empty Dictionary.
In order to get the correct information, |
Methods
Name | Description |
---|---|
BeginOptOutProcess() | Begins the process of opting out from the current legislation.
It sets the consent status for the specified legislation identifier to |
BeginOptOutProcess(string) | Begins the process of opting out for the specified legislation.
It sets the consent status for the specified legislation identifier to If PIPL legislation is required and the specified legislation identifier is not PIPL, or the other
legislation is required, but the specified legislation identifier is PIPL, |
CheckGeoIP() | Triggers the GeoIP call, if no geolocation data was already stored for this session, otherwise returns
the last GeoIP response.
Updates the consent status of PIPL legislation to reflect the current requirements (if it was previously
set as
|
FinishOptOutProcess() | Finishes the opting out process, whichever was triggered before.
If both consent statuses were set to Forgetting (most likely due to technical problems), it will update both
statuses to |
IsConsentDenied() | Checks if the consent was denied or the user already opted-out. If the required legislation is PIPL, it takes priority over any other legislation. Even if the user did not
opt out from CCPA/GDPR/etc, but denied consent for PIPL, this method will return true.
If PIPL is not required, the method does not take into account PIPL consent status.
It requires If the user already started the process of opting out, but it wasn't finished yet, the method will return false. |
IsConsentGiven() | Checks if the consent was given.
If the required legislation is PIPL, it takes priority over any other legislation. Even if the user opted out
from CCPA/GDPR/etc, but gave consent for PIPL, this method will return true.
If PIPL is not required, the method does not take into account PIPL consent status.
It requires |
IsConsentGiven(string) | Checks if the consent was given for the specified legislation (either explicitly given for PIPL or Unknown for opt-out flag). This method does not take into account the geolocation. As we currently do not store opt-out-based legislation as separate flags, if the identifier is not PIPL, the method checks the opt-out consent flag. |
IsGeoIpChecked() | Checks whether the GeoIP response is already stored, which indicates that |
IsOptingOutInProgress() | Checks whether the opting out process already started for any legislation, regardless of the geolocation response. |
SetDenyConsentToAll() | Sets opt-out-based consent flag to OptedOut and PIPL flag to either ConsentDenied or OptedOut - depending if the consent was previously given. |
SetUserConsentStatus(string, bool) | Sets the consent status for the specified legislation identifier and saves it in Player Preferences. At the moment, it only works for PIPL (as every other legislation we track is opt-out based only, so we do not need to track whether the consent was explicitly given, and other legislation statuses are not separately stored). |