Good morning!
I tried to use the new Analytics Events, but I can’t see it in the Event Browser.
I’m using the new Analytics SDK:
Added the Debugging Flag for the Script Executor:
UNITY_ANALYTICS_EVENT_LOGS
Here my code (based on the thread Is Analytics.CustomEvent supposed to work? ):
My console log:
I also registered the ne custom event here:
But do not receive the new custom event, also not in the Invalid Events, BUT receive the basic events like “gameRunning” or “sdkStart”, so the Analytics should work.
Anybody an idea what’s wrong?
Hi @MarkusUnger , could you please send me your Unity project ID via a private message and I’ll take a look at that for you.
1 Like
Hi @MarkusUnger , you should now be able to see the events you sent.
I also took a look at your Event Browser and I was able to see your gameOver
event was invalid and also sent to your production environment.
Could you please try re-running your code to see if your event shows up in your development environment? If you are still not seeing this event show up in the correct environment please let me know.
You will also need to add a highscore
parameter to your gameOver
event for it to be considered valid.
Thanks for you help @chris_aitk ! In the production I now the see invalid events, but only 2 from today (I think I triggered also some events yesterday).
In the development environment are still no events/invalid events. How long should it take to see these events after trigger it in unity editor?
In the old system the validator helps a lot to check if my event are triggered correctly. It would be great if for development the events would be receive in real time in the event browser.
Here is my code (sure the event it invalid, because of the wrong parameter, but should be received from the event system):
using System.Collections.Generic;
using Unity.Services.Analytics;
using Unity.Services.Authentication;
using Unity.Services.Core;
using Unity.Services.Core.Environments;
using UnityEngine;
public class UGS_Analytics : MonoBehaviour
{
private async void Start()
{
print("UGS Analytics");
var options = new InitializationOptions();
options.SetEnvironmentName("development");
await UnityServices.InitializeAsync();
if (!AuthenticationService.Instance.IsSignedIn)
{
await AuthenticationService.Instance.SignInAnonymouslyAsync();
}
HandleCustomEvent();
}
private void HandleCustomEvent()
{
print("Handle Custom Event");
Events.CustomData("gameOver", new Dictionary<string, object>()
{
{"highscore", 123}
});
Events.Flush();
}
}
Now I received it. Does it take 6-8 Minutes to get the logs? Did you change something? Or what was the issue?
Sure it’s a beta, but it feels hard if I try something and it don’t work without help from a unity member
Hey @chris_aitk ! I added a time object, to see how long it takes to receive the data in the event manger. Nearly 5 minutes.
Hi Markus,
I’m pleased to see that your events are now visible in the Event Browser. Apologies for the confusion and delay, it does look like there was an issue on our side that delayed the processing of the events you sent earlier today. It is normal that there is a lag of 5-10 minutes from events being uploaded to being visible in the Event Browser tool.
Your gameOver events are however, showing up in the Invalid Events page as they contain an unexpected highscore parameter. You will need to update the gameOver event definition in the Event Manager and add highscore as an Integer parameter if you want to resolve this error.
We are really interested to hear your feedback on using the new Gaming Services, so please let us know if you run into any other issues.
Thanks,
Thanks a lot! Have a nice day
Can be closed.