Hello!
I’ve recently updated one of my project to 2019.4.6.f1. On previous version I’ve used a standalone DataPrivacy plugin, and it has an opt-out callback. So I could do something when the user decides to opt out.
In new versions have DataPrivacy plug-in integrated in Analytics, and it seems there is no callbacks available now.
So, is there any way to “catch” an user opt-out event now?
Thanks!
Can you share the code that you were using previously?
It is the code of the plugin, with no modifications.
https://assetstore.unity.com/packages/add-ons/services/unity-data-privacy-plug-in-118922
Class DataPrivacy, you can pass a callback method to the FetchOptOutStatusCoroutine.
This coroutine can be called when the user returns to the application from the browser:
void OnApplicationFocus(bool hasFocus)
{
if (hasFocus)
{
//Call coroutine, pass callback method.
}
}
Sorry, what code is now missing? The code that you posted would not be expected to do anything, sorry if I’m missing your point. Can you share your current code that is no longer working? Perhaps it’s just a documentation issue?
Hello Jeff! Thank you for your replies! Yep, I really feel like I haven’t been able to make my point clear.
Let me ask this question the other way then.
Is there any way to fetch opt-out status with built-in data privacy plugin?
Nothing should have changed in this regard between versions, to my knowledge. I’m checking with the team here.
I believe this is the method you are looking for, but I’m not seeing it either in the library version as you mention:
DataPrivacy.FetchOptOutStatus(OnOptOutStatus);
I’m still researching.
That’s right, there is no such public method in the built-in DataPrivacy class.
Yes, I’m trying to find out more information, I’ll update this thread when I hear more.
I’m kind of stuck on this issue… Can you please tell me if you managed to find a solution?
Thanks!
Hello Jeff!
Any updates on this one?
Thanks!
Sorry no, I don’t expect any updates soon.