Search Unity

Question How to disable these Unity network calls (urgently!)

Discussion in 'Unity Analytics' started by lrasomattos, Nov 12, 2021.

  1. lrasomattos

    lrasomattos

    Joined:
    Aug 22, 2015
    Posts:
    29
    Hi! I have an urgent situation, where a deadline is coming up and I can't manage to pass certification. This is the message we're getting from our partner:

    Specifically, although we did not agree to data collection, the following third-party calls were detected:
    https://config.uca.cloud.unity3d.com
    https://cdp.cloud.unity3d.com

    We're stuck in the latest Untiy 2018, and from what I could find those calls are for Unity's hardware data collection. But we did disable it in the Player Settings:
    upload_2021-11-11_22-15-28.png

    Does anyone knows how to really disable these calls? Or is there a way to block any network activities from happening in Unity, as we do not need internet connection at all?
     
  2. unity_Ctri

    unity_Ctri

    Unity Technologies

    Joined:
    Oct 20, 2020
    Posts:
    81
    Hey lrasomattos,

    Thanks for reaching out. Hardware data collection isn't the same thing as Unity Analytics, so I'm afraid I can't help directly - different teams and all that.
    That said, I'm asking around internally to find out where the best place for you to get support on that subject will be.

    I'll be in touch once I have some leads for you.
     
  3. unity_Ctri

    unity_Ctri

    Unity Technologies

    Joined:
    Oct 20, 2020
    Posts:
    81
    To follow up on my comment above - looks like both the URLs are handled by the old legacy analytics service, and remote config (versions below 3.X require legacy analytics to be enabled to work)
    I know a couple of my colleagues who can help with that and I'll make sure this thread is flagged to them :)
     
    hippocoder likes this.
  4. lrasomattos

    lrasomattos

    Joined:
    Aug 22, 2015
    Posts:
    29
    Thank you, your messages might have already helped!

    Considering that those calls are not exclusive to HW Statistics I went back to the project and realized we're only disabling our Analytics code through a compiler directive, but of course that doesn't affect the Unity Services tab, which still had Cloud Building and Unity Analytics set as "ON".

    I'm thinking simply unlinking the project (Services -> Settings -> Unlink Project) would do the trick?
    That would also not disable Unity Analytics from other versions, correct?

    Seems logical to me, but I'd love to have a confirmation before submitting a new build. The certification process takes a while and I'd not want to risk another rejection.

    Also, you mentioned versions prior to 3.X and Legacy Analytics, which makes it sound unrelated to the Services tab?

    Again, thanks for the quick reply!
     
  5. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    @lrasomattos I'm the lead support engineer for Analytics. If you don't want to send those requests, you would want to disable Analytics and any other services in the Services tab. If you unlink the project, you'll no longer have a project dashboard, so it's up to you. Once you disable Analytics, you need to release a new build. Users with your game already that don't upgrade would still send Analytics events. Before you submit again, you can confirm what is being sent by using Charles https://support.unity.com/hc/en-us/articles/115002917683-Using-Charles-Proxy-with-Unity . What compiler directive are you referring to?
     
    unity_Ctri likes this.
  6. lrasomattos

    lrasomattos

    Joined:
    Aug 22, 2015
    Posts:
    29
    Hi @JeffDUnity3D thanks for that Charles link, very helpful!

    So I understood that unlinking the project in the Services tab should have the desired effect of disabling those calls, correct?

    Just to be sure, doesn't "Unlink Project" only unlinks the current "Unity Editor Project" from the Dashboard Project? I mean, the project is still in Unity Dashboard after I unlinked, and I still have other branches in the repository where the project should still be linked.
    For me it looked more like disabling "Analytics" in the Services tab would disable the Analytics dashboard, but unlinking the project only affects the Editor.

    I just meant we are using our own compiler directive to disable our own Analytics Manager (which then calls Unity's API), we thought that not calling the API would be enough, but didn't know these calls would be there when the game started.
     
  7. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    No, the project is not in the dashboard after you unlink. Our dashboards link to the project through the Unity ProjectID. You might want to confirm with a new/test project. And your own Analytics Manager? So you're not using Unity Analytics. To confirm, you'll want to disable all services in the Service window to avoid the network calls. You won't be able to track your app however (number of new users each day, total users so far, etc). But if you're not collecting Analytics or other user info, and not using Ads or other services, you might not need the dashboard.
     
  8. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    @lrasomattos More accurately, your services dashboard will still exist. But if you release a build without Analytics enabled, the dashboard won't reflect these users (new users with this build, or users who upgrade to this new build) and your metrics will become invalid.
     
  9. lrasomattos

    lrasomattos

    Joined:
    Aug 22, 2015
    Posts:
    29
    Sorry, there's some weird confusion, might be my wording or English.

    About the compiler directive and "my own Analytics Manager" - It's not really important to the case anymore, our manager is just a proxy to call Unity Analytics API, just so we have a centralized place to control that. Our directive only disables our own code (and thus, disabled our function calls to Unity Analytics API, which we thought would remove any network calls - clearly we were wrong about that).

    For disabling unity Services in ONE build, and NOT in the Web Dashboard Project (or in builds from other project branches), looks like you're saying I should disable the Services themselves instead of unlinking, but somehow this doesn't seem accurate, and I'm a bit confused :confused:

    Are we talking about the same settings? This is the inspector I have in mind:
    upload_2021-11-12_12-24-26.png

    It looks like this Services tab is controlling the services that I have "ON" for the the actual Dashboard Project. Which means setting them to "OFF" will disable it in the Web Dashboard Project.

    Now if I go to Settings -> Unlink Project, it looks like this Editor Project and it's builds will be unlinked and not affect nor be affected by the Dashboard Project anymore (without any changes to released builds and other project branches), which is what I want. No?
     
  10. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Sorry, no. If you unlink the project in the Editor and publish a build for new users, your dashboard will no longer reflect these users. What "dashboard project" are you referring to? Please share a link (blank out the projectID in the URL, and note how the projectID is actually used in the URL) Perhaps that is the confusion. I'm referring to your cloud dashboard for Ads and/or Analytics and other services. And what do you mean by "one build"? If you turn off services in the Services, it affects the entire dashboard for all "builds", if I understand correctly. Again, please test with a new/empty project to confirm. If you have Analytics enabled in this project (as you have shown in the screenshot), then your app will send those network requests, even if you don't explicitly call Analytics.CustomEvent. If you disable Analytics and check your changes into source code, other developers that sync and open this project will also see Analytics disabled. If you unlink the project and save, other shared developers will also see the same when they sync (assuming you are using Git or similar external source control system). Your dashboard will still exist, but will be disconnected from the project. If you want to disable those network requests, you'll want to disable Analytics and all online services. I doubt that you want to unlink the project.
     
  11. lrasomattos

    lrasomattos

    Joined:
    Aug 22, 2015
    Posts:
    29
    When I say "Web Dashboard Project" I mean the one I can view in this:
    https://dashboard.unity3d.com/
    or even this (seems like the same thing, but old):
    https://analytics.cloud.unity3d.com/reporting/

    Maybe the confusion is that I didn't mention this project is multi-platform, there are many builds and settings for different platforms and different distribution stores, we try to control most of the differences through compile directives in the player settings, but since this partner requested a lot of things (one of them being no external third-party network calls), we are working on a completely separate branch in the repository, so we can change more direct settings (like the Services tab).

    Basically we want to remove these calls only for this one single build for this one single partner/platform/store distribution in this one single project branch. Without affecting other repository branches, builds, platforms, etc.

    We just need to know which button in the Editor will disable these calls without triggering anything outside the Editor's universe. Then when we make a new build with it, whatever we changed, it will be specific to that one build.
     
  12. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Got it! Sorry for the confusion. Yes, if you unlink and disable Analytics and create a custom build on this one development system only, then only users on that platform will no longer send events once you publish that build. In that case, you might not want to sync this system back to source control, or however your isolate your source. If you don't unlink and only disable Analytics, be careful about checking in that code too. But before you publish, confirm with Charles Proxy. I can help you with that also.
     
  13. lrasomattos

    lrasomattos

    Joined:
    Aug 22, 2015
    Posts:
    29
    Yes! Thank you!
    I only saw your edited post after I wrote mine, but it's all clear now.
    I'll unlink only for this local system / separate git branch, and make sure the calls are gone.
     
  14. lrasomattos

    lrasomattos

    Joined:
    Aug 22, 2015
    Posts:
    29
    Hi @JeffDUnity3D we're still seeing the calls through Charles, even though we unlinked the project:
    upload_2021-11-16_12-8-50.png

    You mentioned "unlink and disable Analytics".

    When you say "disable Analytics" do you mean there's another step besides just "unlinking"?

    When we unlinked the project, the Services screen stopped listing the services (as there's no linked Dashboard Project). So "disabling Analytics" stopped being an option - but in theory it would be 100% disabled, as setting on/off is not even in question. Could it be a bug? Should we re-link the project and then disable it first? Or there's something else you're talking about?
     
  15. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    So you created a new build after you unlinked? Please share the Charles capture via private message. Ensure it is unencrypted, you should see no red X's (you'll need to add the charlesproxy.unitypackage to your project). You are correct, if you unlink the project, it should also disable all services. But it would be good to try your suggestion also and confirm.