I’m trying to add analytics for our project, and up until now i wasn’t able to succefully display the events i’m sending into the dashboard and i’m wondering if there’s an extra steps i’m missing
As for now i have my Analytics service enabled
I Added some custom events via script
The results of my different requests are OK
With all that no event is showing up in the dashboard
I also tried to send event with the event tracker but still no result
I must be looking at the wrong thing or doing something really dumb then. I am looking under the “Event Manager” in the correct project, and I see nothing.
You can see the list of custom events on Event Manager, it may take some time for the event to be displayed on Event Manager page, and now I can see those events have already displayed on it.
Also, make sure you are not running any ad blockers in your browser, I’ve heard reports that it can affect the display of events in Event Manager. But I too see the list of your events, including store_open in both Event Manager and Data Explorer (as events not parameters)
Ahhh yes uBlock Origin on Chrome was preventing those events from showing up in the Event Manager! Turned it off and I see them just fine. Thanks for the help!
Ok, I am not using any kind of blocker on my browser.
The only time that an event showed up was before I used a String Builder to actually create and send an Object. Initially I had just tried to send the List and received “System.Collections.Generic.List`1[G+MoveData]” in the dashboard.
Now I am string building and sending the string as object but the event dashboard shows no update even after 48 hours.
My Analytics result returns “AnalyticsResult.Ok”.
Am I missing something?
if (scorePercentage > 100)
{
title.text = "YOU BEAT THE\nHIGH SCORE!";
commentaryString = "WE HAVE RECORDED\nYOUR SCORE AND IT WILL\nBECOME THE NEW GOAL!\nCONGRATULATIONS!";
commentary.color = new Color(0f, 0.75f, 0.375f);
//#if !UNITY_EDITOR
string customEventName = CustomEventName();
string moveData = MoveDataAsString();
AnalyticsResult ar = Analytics.CustomEvent("BetterThanGoal", new Dictionary<string, object>
{
{ customEventName, moveData }
});
Debug.Log(customEventName + "\n" + moveData.);
Debug.Log("Result is " + ar.ToString());
}
//#endif
GPGManager.UnlockAchievement(GPGSIds.achievement_beat_the_high_score);
}
@LicketyCut I might suggest to build your dictionary object first, then use it in the CustomEvent call. Might make your debugging easier. That’s why you received the strange object string in the event parameter. I might suggest sending a few “hello world” events to confirm, but we may be experiencing a processing delay at this time. I’ve heard of other similar reports. I would highly recommend not sending events in a for loop, nor sending events in Update or FixedUpdate. You generally only want to send a single event upon a user action, like completing a level.
AnalyticsResult ar = Analytics.CustomEvent(“HelloWorld”);
I appreciate your response but it really misses the point.
Of course, I can send a simple “Hello World” event, all that takes is following the sample code. What I had hoped to do was store a string that I have built recording the moves made by the rare player that completes a level in a more efficient path than I knew was possible. The string is built efficiently and concisely.
I have tried many techniques, all of which fail. The reason that I had implemented the loop was to be sure than my string wasn’t longer than the 500 byte limit, as I said it would be a rare event with an efficient, concise string but could push that limit and two events split into smaller chunks that meet the limitations seems fair and acceptable.
I clearly would not send an event in an Update. The data is compiled and sent on a static, end of level, leaderboard display canvas screen. I have published many games and rarely ever used a MonoBehaviour Update method for anything much less string building or sending data synchronously!
Also, what would building the dictionary first have to do with anything? My debug code reflects the content of the Dictionary and the AnalyticsResult code is returned OK, not “NotInitialized, AnalyticsDisabled, TooManyItems, SizeLimitReached, TooManyRequests,InvalidDatavalue or UnsupportedPlatform” all of which leads me to believe that the data was sent successfully.
Sadly it seems that Unity CustomEvents aren’t up to the task that I had hoped for and/or iffy at best. I have installed Firebase Database and it took 5 minutes to write and test code that is working correctly.
You are welcome! The Hello World comment was to allow you to remove all variables and directly time a basic event to ensure you are not seeing processing delays at our end. Building the object first would allow you to more easily debug, and for my understanding. Your logic sent an incorrect string as you mentioned and would not be expected to generate an error, it was a legitimate string. You can use Charles Proxy also to debug over the wire https://support.unity.com/hc/en-us/articles/115002917683-Using-Charles-Proxy-with-Unity