Disable UGS Analytics Entirely

Hello,

We develop a Unity product that ships on various platforms.

We have recently upgraded from the Legacy analytics to UGS Analytics.

It seems that even when we make no explicit calls to Unity.Services.Analytics.AnalyticsService, there is still network traffic to the following:

Because the majority of platforms we ship to disallow collecting user data we need to be able to completely disable the service.

Please advise, thanks in advance~

You can disable analytics in your dashboard for your project
Navigate to Analytics > Analytics Settings > Analytics enabled toggle.

or you can use a code snippet:
AnalyticsService.Instance.SetAnalyticsEnabled(false)

Hi @Julian-Unity3D ,
Thanks so much for your prompt reply! <3

As we are calling UnityServices.InitializeAsync explicitly from code during our runtime, I opted to just not call this method instead of using SetAnalyticsEnabled.

Even so, I am still seeing network traffic to the above URLs.

Can you tell me if it is possible to entirely disable UGS Analytics from sending any data across the network?
If this is not possible then UGS Analytics is not an option for us.

Thanks in advance

1 Like

Can you try this:

// For the code disabling Legacy Analytics, or else the "Analytics" name won't be valid
using UnityEngine.Analytics;

// For the code disabling Legacy Analytics, or else the "AnalyticsInstance" name won't be valid.
using Unity.Services.Analytics;

// If you want to disable Analytics completely during runtime
    public void DisableAnalyticsCompletely()
    {
        //this turns off legacy analytics
        Analytics.enabled = false;
        Analytics.deviceStatsEnabled = false;
        PerformanceReporting.enabled = false;

       //UGS Analytics
       AnalyticsService.Instance.SetAnalyticsEnabled(false)
    }

If you are using IAP then please be aware that IAP enables Analytics by default.
If you have manually initialize UGS services but are not using it, then you should remove the initialization.