Why don't I receive Custom Events?

Hello everyone.

I am currently experiencing a problem with Unity Analytics.
I try to use Custom Events by following the recommended steps but I don’t get any custom events, only the default events.

Here is an example of the problem with one of my custom events.
I created the custom event in the Event Manager and enabled it.

By script I used the example that is given to trigger the custom event.

    private void OnEnable()
    {
        Debug.Log("Start game and raise analytics custom event -> [" + m_AnalyticsCustomEventName + "]");

#if ENABLE_CLOUD_SERVICES_ANALYTICS
        Analytics.CustomEvent(m_AnalyticsCustomEventName);
        Debug.Log(Analytics.CustomEvent(m_AnalyticsCustomEventName));
#endif
    }

Debug logs return :

After a few minutes, in Event Browser, I only see the default events like gameStarted or gameRunning but none of my custom events. Why? Did I miss something?

For information I am on Unity 2018.4.36f1 and I use Anaytics Library package v3.2.2 (I don’t use the v3.2.3 because it doesn’t work correctly on this version of Unity)

If you need more information, don’t hesitate to ask.

Thank you.

Hi @Damwx ,

The code you showed for Unity’s Legacy Analytics solution; the code you’re looking for is

AnalyticsService.Instance.CustomData("myEvent", parameters);

You can find more info on recording custom events here.

Hope this helps!

Clare

1 Like

Thank you for your answer.

When i check the documentation, I see that the minimum version of Unity for the SDK is Unity 2019.4.
8466272--1124573--sdk_analytics.png

My project is on Unity 2018.4.36f1, so i can’t use AnalyticsService.

What do I need to do to use unity analytics on this version of Unity? Is it still possible to use Unity Analytics on this version?

Sorry missed that you’re on 2018. Yes you’re right about the SDK support, its not possible to use it on version less than 2019.4.

Just to confirm you’re currently using Legacy Analytics where you already have custom events defined and you’re wanting to upgrade to UGS Analytics, is that correct? We are working on offering support for this workflow in the near future which won’t require upgrading to the new SDK to use your existing custom events in UGS Analytics.

But right now there isn’t a solution for your situation that if you’re not able to upgrade to Unity 2019.4 on your project.

Thanks,
Clare

I understand, thank you.

Do you know when it will be available?

Can’t promise anything but most likely in the next month or two. We’ll be sure to post updates in the forum!

1 Like

OK, thank you for your answers!