Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Completely disabling Analytics at runtime

Discussion in 'Unity Analytics' started by tcoles, Mar 7, 2018.

  1. tcoles

    tcoles

    Joined:
    Jan 30, 2018
    Posts:
    10
    I am attempting to completely disable Analytics data collection (for example, using preprocessor directives to ignore analytics in dev builds, and so on). If I try to set `Analytics.enabled = false`, it does indeed seem to stop my custom events from getting through, however the Validator still shows appStop and appRunning events.

    I've tried setting `enabled = false` in a MonoBehaviour's Awake method, as well as a static class' static constructor (although I can't find a better place to reference said static class than in another Awake method...) Is there a better place to set this?
     
    jakzun2011 likes this.
  2. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    439
    Hi @tcoles,

    Are you a Personal, Plus or Pro user? Unity sends a set of events (including appStart, appRunning, etc.) that are not under developer control. We use these to gain understanding of games, devices, and the industry at large. They can be silenced for Plus and Pro users by going to Edit > Player Settings > Other Settings > Configuration > Disable HW Statistics.
     
  3. tcoles

    tcoles

    Joined:
    Jan 30, 2018
    Posts:
    10
    Pro. Even with Disable HW Stats checked, I still see appStop and appRunning firing.
     
    jakzun2011 likes this.
  4. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    439
    I think you're doing a bit of a chicken/egg thing: if you turn on Analytics in order to check the validator, then by definition you're sending these events. :D (i.e., if analytics or any other service is on, all these "core" events get sent to our servers.)

    With HWStats off and all services disabled (including Analytics) your build will not send events. If you need confirmation of that, you can use a tool like Charles Proxy to confirm.

    Hope that helps!
     
  5. tcoles

    tcoles

    Joined:
    Jan 30, 2018
    Posts:
    10
    Ok, so I'm just trying to dig down to an answer I can take to the bank here... :)

    Since Services are per-project configurations, would it be true there is no way to enable Analytics only for certain builds (i.e., production builds), and completely disable it for other builds (i.e., QA builds) of the same project?
     
    jakzun2011 and aaronUnity13 like this.
  6. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    439
    A team-member just pointed out to me that we have:

    https://docs.unity3d.com/ScriptReference/Analytics.Analytics-deviceStatsEnabled.html

    This will allow you to disable HWStats, provided (a) that the account performing the build is Pro, and (b) no services are enabled.

    Some further thoughts:
    • You could mark a script with [RuntimeInitializeOnLoad] to have it call as early as possible, presumably blocking any core events from sending.
    • You could potentially enable this script through a build-chain so that your Prod builds have it on, but your QA builds have it off.
    Personally, I'm a little leery of running your build-chain this way, since it means that by definition your QA builds aren't equivalent to the ones you're sending to your customers, but that's up to you and your team, of course.
     
  7. tcoles

    tcoles

    Joined:
    Jan 30, 2018
    Posts:
    10
    Thanks for the guidance. From my testing, it seems like setting`Analytics.enabled/deviceStatsEnabled = false` in a RuntimeInitializeOnLoad method doesn't necessarily stop all core events. But I'll admit I'm having a hard time saying anything certain about a system with some built-in uncertainty (in the form of events caching).
     
    jakzun2011 likes this.
  8. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    439
    Good luck with it. I have one other idea...but I need to research it. I'll let you know if I come up with something more.
     
    tcoles likes this.
  9. dee7800

    dee7800

    Joined:
    Jul 25, 2013
    Posts:
    2
    pro user here:
    just looking at the system outputs i see the analytics system is still working
    maybe a different point than the guy above but it still shouldn't be doing this.

    i am in 2018.1.7
    i have disable hw statistics
    but i still see related file creation in the app persistent folder

    creating directory:
    Unity>xxxxxx>Analytics:
    -- config (updates on play)
    {"prefs":{}}
    -- values (updates on play and stop)
    {"config_etag":"","app_info_hash":748638352,"app_installed":true,"engine_ver":"2018.1.7f1","app_ver":"1.0","custom_event_time":0,"custom_event_count":0}

    being a statistician and having been in situations where a data point my cost thousands of dollars, i rarely give out data, especially to mass data collectors.

    this seems like it is fishing for a data point should the user happen to uncheck the box.

    its sad that the intel gathering has been reduced to users, whom have paid thousands of dollars, must continually opt out (every project you create) of data collection. i feel someone is just high on the data intelligence fad and using physiological techniques to produce more data over the long term. They are concerned with their own value over respect for their customer. as it is easy to disable a system (when designed decently and this is unity engineers). so ... when only parts get disabled great care must have been taken to not disable the whole thing.
     
  10. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,387
    @dee7800,

    Outgoing requests are only sent when HW Stats is enabled or a Service (Ads, Analytics, IAP, Multiplayer) is enabled.

    There is currently a known issue with 2018.1+ where new projects may have Analytics enabled, even if they marked as disabled when creating the project.

    To confirm that Analytics (and all other Services) are disabled, you can open the Services window and check the status of the Services. (Alternatively, you can check the UnityConnectSettings.asset in the ProjectSettings folder, if asset files are set to text serialization in your Editor settings.)

    If all Services and HW Stats Collection are disabled and you still see outgoing requests, please open a support ticket and we will investigate further.

    https://analytics.cloud.unity3d.com/support/
     
  11. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,538
    When will this be available for free users?

    It's a pretty untrustworthy thing to be doing to your users.
     
    jakzun2011 likes this.
  12. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,036
    @ap-unity @marc_tanenbaum
    Lets say I already have a production build with Analytics enabled, that is being distributed through AppStore.
    If I want to work on the next version of the game and I want to disable Analytics, so I don't ruin the currently collected analytics data with debug/testing data while I work and test the next version, do I disable the Analytics service from the Services panel? Will it disable analytics just for the next build, or does it disable analytics data collection for the entire project, including previous builds which are online right now?
     
  13. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    7,543
    @Devil_Inside Changing the Analytics setting won't affect builds that are already online, they will continue to send Analytics events.
     
    Devil_Inside likes this.
  14. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,036
    Thanks a lot for the reply!
     
  15. jakzun2011

    jakzun2011

    Joined:
    Jul 30, 2015
    Posts:
    65
    the free version has data constantly going to google sevrers and when i show them screenshots they play dumb

    they ARE fishing, they pound your computer, aggressively searching for a way to the internet - working offline is a joke and a LIE - the moment you load unity, it's stealing your data

    i also found skype.exe connected to unity.exe - check out the screenshots - very sneaky and i have the emails of them playing dumb about it screen4.png skypestealth.png

    it's funny, the FBI is getting into trouble for spying on americans but, these companies are doing just that - they don't even SHARE their google earnings with us - they just encourage us to use their product in GOOD FAITH, buy from their store, etc and are STEALING from us every single day

    i can't access unity store because i blocked all means for ANYTHING from google to access my harddrive - so, since they can't mine my data, the store will not load and i cannot access my paid-for assets (thousands of dollars worth) -

    they know this but can't help me because they can't admit they're stealing from me and unity won't even work correctly if you block google from your machine

    i'm considering suieng them, frankly - all my paid-for assets are being held hostage - no one told me i had to submit to google for unity to function - this is criminal
     
    Saltspyre and TalkieTalkie like this.
  16. jakzun2011

    jakzun2011

    Joined:
    Jul 30, 2015
    Posts:
    65
    the greatest engine on earth is just a trojan horse, now
     
  17. Simon-O

    Simon-O

    Joined:
    Jan 22, 2014
    Posts:
    34
    @ap-unity

    So it's impossible to build a game with the Free version of unity that doesn't steal user's data?

    Have you even heard of the GDPR? I believe you'll find every single machine you're taking data from without a proper user notification and opt-in consent is a breach.
     
    jakzun2011 likes this.
  18. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    7,543
    No, not accurate and not impossible. The instructions are in this thread.
     
  19. Simon-O

    Simon-O

    Joined:
    Jan 22, 2014
    Posts:
    34
    Then by all means please do point me at them.

    The only thing I can see says "If services are disabled". Well, I don't even have a Project ID in services, Analytics is disabled and Unity's still trying to make outbound internet connections.
     
    jakzun2011 likes this.
  20. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    7,543
    This thread is discussing Analytics services. Please show a Charles Capture showing any PII data that you believe is being sent.
     
  21. Simon-O

    Simon-O

    Joined:
    Jan 22, 2014
    Posts:
    34
    No capture required. Straight from the information commissioner...

    The GDPR specifically includes the term ‘online identifiers’ within the definition of what constitutes personal data.

    These may include information relating to the device that an individual is using, applications, tools or protocols. A non-exhaustive list is included in Recital 30:

    • internet protocol (IP) addresses;
    • ....
    Other examples of online identifiers that may be personal data include:
    • MAC addresses;
    • advertising IDs;
    • pixel tags;
    • account handles; and
    • device fingerprints.

    https://ico.org.uk/for-organisation...ata/what-are-identifiers-and-related-factors/

    So unless you're claiming that analytics doesn't use an IP address when transmitting data, and has no device id/fingerprint, the contents are irrelevant.

    [Or maybe I've got the wrong end of the stick, but one way or another my builds try to connect to the internet without any legitimate reason to do so]
     
    Last edited: Oct 7, 2019
    Saltspyre likes this.
  22. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    7,543
    I thought you said you've disabled Analytics? IP address is present in any TCP/IP transaction, it is part of the protocol. Please show a network capture to see who is performing network calls, it might not be Analytics.
     
  23. Simon-O

    Simon-O

    Joined:
    Jan 22, 2014
    Posts:
    34
    Yes, that was rather my point. Builds shouldn't make any outbound network connections without consent.

    I'm not familiar with Charles. Is Wireshark acceptable?
     
    jakzun2011 and Saltspyre like this.
  24. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    7,543
    No, please use Charles or Fiddler, Wireshark is far too verbose and not necessary. We are only looking for HTTP requests.
     
  25. jakzun2011

    jakzun2011

    Joined:
    Jul 30, 2015
    Posts:
    65

    'signing out' only signs YOU off the internet, not unity - they are stealing data the moment you open them and the facebook plugin is even worse, it loads when windows loads and is busy online, whether you even open unity or not - they paid unity ALOT for THAT privilege - but, if you have the right programs, you can see unity sending info to amazon and google, etc. - constantly -

    it's so bad, it makes good connections look terrible and when you ask unity, they tell you you have a slow connection - YES, the moment you turn on unity - i just work with it offline, as much as possible and they're making harder and harder to do that - i don't know how this isn't illegal, we have alot invested in unity for them to start raping us and compromising the functionality of their platform from all the bacckground processes they have ongoing, STEALING from us
     
  26. jakzun2011

    jakzun2011

    Joined:
    Jul 30, 2015
    Posts:
    65

    ABSOLUTELY, anything else is robbery. Putting the 'sign out' button there, only to stay online surreptitiously is pretty egregious and it speaks VOLUMES regarding Understanding and Intent
     
  27. jakzun2011

    jakzun2011

    Joined:
    Jul 30, 2015
    Posts:
    65
    somehow, even skype is using unity.exe to access the internet - but, when i asked, they played dumb and took me thru alot of procedures and asked me to send alot of stuff i refused to do because i knew they were stonewalling

    asking them for help is stonewalling half the time because half the issues you're getting are a result of their data-stealing interfering with unity functioning properly AND it's seriously hurting even the best internet connections - well, stop harassing your Provider, it's not them, it's Unity and they're staying mum about it...
     

    Attached Files:

  28. jakzun2011

    jakzun2011

    Joined:
    Jul 30, 2015
    Posts:
    65
    here's an example of how they deliberately just stonewall you and play dumb:


    On Mon, Sep 17, 2018 at 6:26 PM J wrote:

    whatever works for your side - i really don't want trouble, i love Unity

    i've been pretty clear about my issue and i've attached pics - there's alot of traffic from Unity even when i sign out - if Unity is loaded, there's a tremendous amount of online activity i do not approve of

    everyone that addresses this tells me they do not understand my problem tho, i've stated it plainly and it's not rocket science - i've shown you images of Unity online thru dozens/hundreds of ports, just running thru entire ranges of ports, trying to find an open one and maybe just being random so, it's harder to detect

    please tell whoever calls me to not call if they don't know what my issue is - this is getting tired - i requested to know what Unity is moving to and from my cpu and i requested copies of all activity - please don't have another person say they don't know what i want - we're supposedly all sentient beings here that understand the english language

    and, i'd like to know why skype.exe is attached to unity.exe? multiple instances, no less - at least 10

    Unity 2017 1.0f3 WILL NOT START if i turn off my internet - it will just hang and it's disgusting that it needs to be online so badly - everyday, i have to close the blank window that will not populate and re-open Unity and it ALWAYS opens on the second attempt

    IF i unplug my network adapter first, otherwise, Unity will just keep waiting for it to come online before trying to load - this happens every single time - even when it acknowledges you're offline and you hit the 'work offline' button, the first attempt just hangs so, you have to close and try it a second time and it always works

    i wonder how much of that is all of Unity's unknown activity it insists on performing and i wonder of the memory-leaked it related

    even when i turn of the connection to the google server, it just comes back on - i have no choice, Unity is free to fulfill it's agenda - so, i want MY COPY of whatever is going ON or OFF my personal property, my computer

    so, i hope someone Enlightened can contact me and no more useless people telling me they don't understand plain english and images

    thank you
     
  29. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    7,543
    I believe you forgot to attach your Charles or Fiddler capture, it would be necessary to confirm your issue and would provide the network copy that you are asking for. It's a handy tool that I use every day here to troubleshoot these types of issues, I would encourage you to give it a try. I assure you that we have no purposeful or malicious intent, you may have a local virus or similar. Or we may have an undetermined bug. A network capture would confirm (not just a screenshot, thanks). One note, you can turn off and clear any collected data at id.unity.com under Privacy settings
     
unityunity