The reason for this is I use Ads and IAP, but have a “no ads” purchase that means the user no longer can access the privacy dialogue shown with an ad.
However, I’m using the new analytics service not the legacy approach. I’ve tried to implement the feature using the new API for this. However, it seems like this new API doesn’t return the url of a personalised page where the user can edit their preferences. Rather, it just sends back the url of the unity privacy policy.
I’ve had a look in the plug-in code, and it seems this is what it’s supposed to do. The property has that url set as it’s value.
Is it possible to achieve the old-style “fetch privacy url” functionality with the new analytics? Or is there another way I should be going about this. For example, is there another call somewhere to show the little button with the hand that appears for ads?
I understand your concerns, however the ads privacy dialogue that is presented to the user is different to that of the Analytics. Data is processed differently for Ads and Analytics and you need to present the option to opt out of Analytics data being collected directly to the user using your own method.
CheckForRequiredConsents is an automatic Opt-In for Non PIPL Compliance areas,
TL;DR for the documentation on GDPR and CCPA:
To get the Privacy URL, you can use: Application.OpenURL(Events.PrivacyUrl);
To allow users to opt-out, you can create a button which calls : public void OptOut()
Here is the function:
public void OptOut()
{
try
{
if (!consentHasBeenChecked)
{
// Show a GDPR/COPPA/other opt-out consent flow
// If a user opts out
AnalyticsService.Instance.OptOut();
}
// Record that we have checked a user's consent, so we don't repeat the flow unnecessarily.
// In a real game, use PlayerPrefs or an equivalent to persist this state between sessions
consentHasBeenChecked = true;
}
catch (ConsentCheckException e)
{
// Handle the exception by checking e.Reason
}
}
Thanks very much for your reply. I hadn’t realised they were two separate required consent processes. This info has made a lightbulb switch on above my head, and the docs make sense now.
Thanks for your reply. I however still have doubts and require some confirmation here. We are migrating from Legacy Analytics to Unity Gaming Services and something is still unclear to me.
BEFORE UNITY GAMING SERVICES
Previously, with Legacy Analytics(no ads in the game), we used to do this:
Show our privacy policy for the game
With button to Unity Privacy Policy (to read it)
DataPrivacyPlugin button (with Unity hand icon): Allows the users to opt out of Analytics
OK button to agree our Privacy Policy and close (automatic opt-in if user doesn’t click the DataPrivacyPlugin button (with Unity hand icon)
WITH NEW UNITY GAMING SERVICES
Now, with Unity Gaming Services, and reading your response, it seems to me like:
DataPrivacyPlugin button (with Unity hand icon) is now deprecated and must be removed, because it’s not useful anymore
We should simply opt-in by default(in GDPR regions, non-PIPL)
Add button labelled “Disable Analytics” which simply calls the OptOut function of new UGS
Can you please confirm that the WITH NEW UNITY GAMING SERVICES section above is correct, and we can fully remove DataPrivacyPlugin from the game, and simply call OptOut of the user clicks a button to opt out (or disables a checkbox) ?
OK, excellent, thank you for your reply! I’d strongly suggest to make it clear on the documentation of UGS and of the DataPrivacy plugin, that the DataPrivacy plugin is now deprecated and if you migrate to UGS, you should remove it entirely and use this new opt out system, as it’s confusing to have both solutions available without a clear understanding that the “old way” using the DataPrivacy plugin is no longer a valid flow. Thank you!
I’m also in the progress of moving from Legacy to New Unity Analytics.
I don’t understand why obsolete code and method calls are suggested by you?
Have the library changed recently, because I see the same code samples as you provide here in the documentation, however using this code in my game gives me an obsolete message.
Application.OpenURL(Events.PrivacyUrl);
Is obsolete and below is now the way to do it, according to what I’m told by the intellisense in Visual Studio.
Also the “options” sample for setting the environment is not working as the code in the sample doesn’t work.
So have the library changed lately or is the documentation just far far behind?
When that said, this whole privacy flow was MUCH better and easier for developers in the old version. I assume the flow is the same for all games more or less, as it doesn’t have anything to do with the game, so why don’t Unity make a good solution that is easy for developers to use - like in the legacy version?
If you don’t have Analytics installed as a package, then Analytics will not be used.
Therefore, you don’t need and won’t be able to provide an opt-out button.
Customers need the ability to Opt-out of Analytics even if no Custom Events are present, because Standard events are sent.
Actually @Julian-Unity3D I’d love if you can confirm if this is an appropriate workflow for an application I’m building that will only be released in the United States.
App Starts
Code calls CheckForRequiredConsents();
Code handles consents if any are returned from CheckForRequiredConsents()
If PIPL - code calls SetAnalyticsEnabled(false) and ProvidedOptInConsent(“pipl”, false). This shouldn’t be a valid scenario b/c this app will be released in the United States only. It’s only implemented as a failsafe.
If GDPR - code calls SetAnalyticsEnabled(false) and OptOut(). This shouldn’t be a valid scenario b/c this app will be released in the United States only. It’s only implemented as a failsafe.
If CCPA - does nothing.
Additionally, in the settings UI of the app - there is an OptOut button for users to select.
I appreciate your time in answering my questions. To be honest, I do not find the documentation straight forward. Up until this thread I didn’t think we needed to provide an OptOut button for Standard Events only.