Debugging custom events

Hello,

I am having an issue where custom events are not showing in Event Browser on the dashboard (or via Data explorer).

I can confirm built in events such as “gameStarted” and “gameRunning” are displaying - Why are my custom events not showing in Event Browser? How can I debug the issue?

I am testing these through the Unity editor (awaiting Unity to allow support for WebGL builds).

I have a custom event “switchModel” with a custom parameter “modelName” assigned:

I am queuing this event as follows:
8419032--1113681--upload_2022-9-6_13-25-55.png

Thank you,
Ben

Do you have your Custom Event firing?
Try putting your Custom Event on a button to test it.
It could just be that you aren’t firing the Custom Event
If that doesn’t work be sure to let me know and we’ll dig a little deeper.

Hi Julian,
Yes, the event is firing from a button click (confirmed by debugging (hits breakpoint) through VS):
8424084--1114890--upload_2022-9-8_8-17-3.png
Thanks,
Ben

Do you have a custom event defined in your Event Manager?

Yes, please see original post and below:
8424465--1114998--upload_2022-9-8_10-34-12.png
(Also assigned custom parameter “modelName” to custom event).
Thanks.

Just to clarify, you say you are testing in the editor. Do you have the build settings set to WebGL?

@pottageb Send me a DM with your project ID and I’ll check your dashboard.

1 Like

Having a quick look over your dashboard, I can see you added payment information, but you’ve not Set up Analytics.


Could you hit that button for me on your dashboard and then test your project in the editor confirming if we can see anything in your Dashboard > Event Browser.

Hi Julian,
All steps were completed previously, the last step cannot be “completed” so the “Set up Analytics” button will (presumably?) never disappear:
8424660--1115037--upload_2022-9-8_11-55-0.png
Ben

Could you try again, I want to keep an eye on your dashboard > event browser to see what events are coming in now.

If this this still isn’t working, we can update Analytics to a version not yet in the package manager, which does support WebGL.

To do this, please go to your Manifest file found in your Project Name > Packages folder, find com.unity.services.analytics and amend the version number to 4.2.0 then save and close.

This will then update the package to the latest version and allow you to use it with WebGL.

Hi Julian,
I had already installed 4.2.0 through package manager:


As explained, I am testing through the Unity editor (not WebGL).

Ben

Hey Pottageb,

This is quite interesting. I tested sending a custom event with 4.2.0 myself just to be on the safe side, and it was received in my project without issue.

Can you try replacing the modelName with a fixed string value for the time being and seeing if that makes a difference?
It certainly seems like the event isn’t being sent by the SDK in the first place, which is a very unusual circumstance.
To verify this, we’d recommend intercepting the payload with a proxy tool

(we’ve a guide for using Charles Proxy here: https://support.unity.com/hc/en-us/articles/115002917683-Using-Charles-Proxy-with-Unity )

Can you verify that the event isn’t actually being sent by the SDK? This will help us narrow our search to find the cause.

Thanks!

1 Like

@pottageb Also, ensure that you are initializing UGS Analytics as described here Unity SDK tutorials

Thank you Jeff, that’s sorted it. I had assumed it was like legacy where no initialization code was required.
Thanks,
Ben

1 Like