Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues when saving analytics settings to GvhProjectSettings.xml #387

Open
ricardobustaw opened this issue Jul 6, 2020 · 5 comments
Open

Comments

@ricardobustaw
Copy link

Please fill in the following fields:

Unity editor version: 2018.4.23f1
External Dependency Manager version: 1.2.156
Source you installed EDM (from .unitypackage or Unity Package Manager): .unitypackage
Features in External Dependency Manager in use (Android Resolver, iOS Resolver, VersionHandler, etc.): Android Resolver, iOS Resolver, VersionHandler
Plugins SDK in use (Firebase, Admob, Facebook, etc.): Firebase, Facebook
Platform you are using the Unity editor on (Mac, Windows, or Linux): Mac
Platform you are targeting (iOS, Android, and/or desktop): Android
Scripting Runtime (Mono, and/or IL2CPP): IL2CPP

Please describe the issue here:

Analytics settings are not being properly saved. After the popup shows up, if you select "No" it will add a line like this:
<projectSetting />
The same thing happens if you change the settings for "Yes" then change it back to "No".

Even if values are committed to the repository, other users will still see both popups (For the dependency manager analytics and for firebase analytics).

image

image

image

Please answer the following, if applicable:

What's the issue repro rate? (eg 100%, 1/5 etc) 100%

@ricardobustaw ricardobustaw added the new to be triaged label Jul 6, 2020
@chkuang-g
Copy link
Collaborator

chkuang-g commented Jul 9, 2020

@ricardobustaw

Sorry for the confusion. The consent prompts per machine per module. The flag to determine whether to show the popup is stored in system level, not in GvhProjectSettings.xml. What stored in GvhProjectSettings.xml is whether the analytics is enabled or not.

https://github.com/googlesamples/unity-jar-resolver/blob/master/source/VersionHandlerImpl/src/EditorMeasurement.cs#L149

I am not sure what that extra line of <projectSetting /> is for but as long as AnalyticsEnabled flag is set, you are good to go.

Does this answer your question?

@chkuang-g chkuang-g added needs-info Need information for the developer type: question and removed new to be triaged labels Jul 9, 2020
@ricardobustaw
Copy link
Author

@ricardobustaw

Sorry for the confusion. The consent prompts per machine per module. The flag to determine whether to show the popup is stored in system level, not in GvhProjectSettings.xml. What stored in GvhProjectSettings.xml is whether the analytics is enabled or not.

https://github.com/googlesamples/unity-jar-resolver/blob/master/source/VersionHandlerImpl/src/EditorMeasurement.cs#L149

I am not sure what that extra line of <projectSetting /> is for but as long as AnalyticsEnabled flag is set, you are good to go.

Does this answer your question?

Hi

About that being by machine, I think there should be a way to disable it, both for remote build machines that have the pop-up being displayed after we updated the resolver, and also because that will show to everyone that updates their branches to the latest version, including artists and designers.

About the empty tag, that seems to be a bug. If you click no and the settings file already has a no value, it fills it with an empty tag. Same happens if you toggle it on and back to off again. Not just for me, but for every member of the project.

Which adds the risk of someone committing the broken settings file by accident.

There must be a way to configure that as a company, and not as a user/machine. Mainly if the compliance is with "no", since nothing is tracked without permission. It could read settings file information, and if already set, avoid showing the pop-up.

Thanks! Hope we can help if more information is needed.

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Jul 10, 2020
@alexames
Copy link
Contributor

Hi,

I've created an issue to our internal issue tracker for this feature request (b/161486820). Unfortunately right now I don't have a timeframe for when we'll be able to get to this issue.

If you want a workaround in the meantime, one kind of hacky way would be to just change the line of code here so that it doesn't create the dialog at all. Or, you can change the ConsentRequired property here to pass the value SettingLocation.Project so that it will be saved with the rest of the project settings when you check it in.

However, making one of these changes means you'll have to re-apply your patch any time you upgrade Firebase.

@ricardobustaw
Copy link
Author

Thanks! We'll see if it's worth doing the workaround here. If we also think on some solution for that, we might create a PR. But I guess that depends a lot on the direction you want to go with the configurations.

@chkuang-g
Copy link
Collaborator

I think what we can do is to add a project level flag like "Disable Analytics Consent", false by default, which can be stored in GvhProjectSettings.xml

Although there should not be a concern but we will go through privacy review for this as well. Will keep you updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants