[UGS] Fix Analytics Data Missing in Dashboard from Production Builds
Solution
Unity 2021.x - Unity 6.3.x
Published Fri, Mar 27
Unity Analytics events appear within the Editor's Analytics Debug Panel but fail to populate the Unity Gaming Services (UGS) dashboard or Event Browser for builds deployed on target platforms, despite correct project settings in the Services tab.
To resolve data collection failures, ensure the application lifecycle correctly handles service initialization and user consent before recording events. Follow these steps to verify the pipeline:
- Ensure InitializeAsync is called and awaited at the entry point of your script.
- Invoke
AnalyticsService.Instance.StartDataCollection()immediately after the services are initialized. - Verify that the Project ID in
Project Settings>Servicesmatches the ID in the UGS Dashboard. - Use a network proxy (e.g., Charles Proxy or Fiddler) to monitor requests to
https://collect.analytics.unity3d.com. - Confirm that the request URL includes the correct Environment ID and returns an HTTP 204 No Content response.
Additional Tips
- Use the
AnalyticsService.Instance.Flush()method during testing to force immediate event transmission, though this should be used sparingly in production. - Check the
Privacy Consentsettings; if the user has not opted-in (where required), the SDK will silently drop events to maintain compliance. - Confirm the build is not using a ‘test’ environment if you are looking for data in the ‘production’ dashboard toggle.
TL;DR
Successful data transmission requires verifying that InitializeAsync completes successfully and that network requests return an HTTP 204 code while targeting the correct Project ID and Environment.
Related Posts Haven't quite found a solution to your problem? We think these posts might help you.
Content inspired by a Unity discussion post.