Custom events not arriving to dashboard

I setup a custom event with an int parameter, I now try to send an event like so: MyAnalytics.SendEvent("worldObjectPlaced", "woId", worldObject.data.id);. But nothing seems to happen.

Here is my analytics “manager”:

using UnityEngine;
using Unity.Services.Core;
using System.Collections.Generic;
using Unity.Services.Analytics;
using Unity.Services.Core.Environments;
using UnityEngine.Analytics;

public class MyAnalytics : MonoBehaviour
{
async void Start()
    {
        try
        {
            var options = new InitializationOptions();
            options.SetEnvironmentName("development");
            await UnityServices.InitializeAsync(options);

            List<string> consentIdentifiers = await AnalyticsService.Instance.CheckForRequiredConsents();
        }
        catch (ConsentCheckException e)
        {
            Debug.Log(e);
        }
    }

    public static void SendEvent(string eventName)
    {
        Analytics.CustomEvent(eventName);
    }

    public static void SendEvent(string eventName, string paramName, object paramValue)
    {
        AnalyticsService.Instance.CustomData(eventName, new Dictionary<string, object>
            {
                { paramName, paramValue }
            });
    }
}

I keep reading that X and Y is deprecated, use AnalyticsService.Instance instead but doesnt seem to work.

I activate debugging and this is my log:
8712696--1177587--upload_2023-1-7_16-55-25.png

1 Like

Hi mrCharli3,

Are you still seeing this behavior? Let me know and I’ll work it out with you.

Best,
Randy