Hello, I have a project that used the legacy analytics. In February 1, 2024 Unity stopped support.
So, I removed old stuff and did the new Unity Analytics setup. But I can’t get any data in my dashboard.
I tested the game on Android and no data is showing up in the dashboard or in Event Browser.
I have the correct project selected in Project Settings → Services.
In the editor in Analytics Debug Panel all events and uploads show up correctly.
This script runs at the start of the game:
using System.Collections;
using System.Collections.Generic;
using Unity.Services.Analytics;
using Unity.Services.Core;
using UnityEngine;
using UnityEngine.Analytics;
using UnityEngine.UI;
public class UGS_Start : MonoBehaviour
{
[SerializeField] private Text analyticsText;
public static UGS_Start instance;
async void Start()
{
if (instance == null)
{
instance = this;
}
else
{
Destroy(gameObject);
}
DontDestroyOnLoad(gameObject);
try
{
await UnityServices.InitializeAsync();
AnalyticsService.Instance.StartDataCollection();
if (UnityServices.State == ServicesInitializationState.Initialized)
{
Debug.Log("Initialized Unity Analytics");
analyticsText.text = "on";
}
else
{
Debug.Log("Not Intialized");
analyticsText.text = "else";
}
}
catch (System.Exception ex)
{
Debug.Log("Failed to initialize Unity Analytics {ex.Message}");
analyticsText.text = "exce";
}
AnalyticsService.Instance.RecordEvent("test_ev");
AnalyticsService.Instance.Flush();
}
}
Thanks for reaching out! Can you send me a DM with your Organization ID? I’d love to take a look. My gut would be to say it’s StartDataCollection not being called, but I see it there in your code. It could also be something to do with your project exceeding the free tier of Unity Analytics at some point, which is why I’d like to take a look at your organization first, before jumping to any conclusions.
Also, let me know which of your projects this is for, please!
I’m also having trouble with data not showing up on the dashboard.
Data was showing up on the dashboard until November 14th. However, on November 27th, I published my game on iOS and Android, and when I checked the dashboard, I noticed that the data was not showing up.
I haven’t changed any code. I haven’t changed any Unity or Analytics versions either.
Unity 2022.3.29f1
Analytics 6.0.1
“StartDataCollection” is also running.
I have the correct project selected in Project Settings → Services.
Unity Cloud → Analytics setting screen looks like the image below.
If you are certain that your settings and code are correct, the next thing to check is that your game client is sending Analytics Events, and they are going to the project and environment that you expect.
You are getting a 204 response to Analytics uploads to https://collect.analytics.unity3d.com
The Project ID in your request URL matches the one on your Unity Project Dashboard, in the Analytics Settings page, and your Analytics dashboard URLs
The Environment in your request URL matches the environment you expect.
Finally, if you still can’t see any events, please submit an Analytics Support Ticket and share your Project ID, any relevant code snippets and if possible a link to a store or test build.
Hello, I won’t get data in production. I unlinked a project on 6000.2.13f1, removed the Library, migrated to the 6000.3.3f1, and linked a project - doesn’t help.
Testing environment - 4
Production - 0 (should be 37)