Unity analytics is not collecting any data

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();
	}
}

Hi @ahmetgello ,

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!

Randy

1 Like

Alright, I sent you a message with the details.

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.

Are any other settings required?