No custom event visible in the Dashboard

Hi there,

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

Here’s a code example of my custom events

private void Awake()
    {
        Debug.Log(Analytics.initializeOnStartup.ToString());
       
        sessionId = AnalyticsSessionInfo.sessionId;
        SendSessionInfo();
    }   

    public void SendSessionInfo()
    {
        userId = AnalyticsSessionInfo.userId ;

        Analytics.CustomEvent("Session", new Dictionary<string, object>
        {
            { "sessionId", sessionId },
            { "userId",userId },
            { "session state",AnalyticsSessionInfo.sessionState },
            { "machine", SystemInfo.deviceName },
        });
    }


void Update()
    {
        FPSCounter();

        heartbeatTimer += Time.deltaTime;
        if(heartbeatTimer>updateRateSeconds)
        {
            HeartBeat();
            heartbeatTimer = 0f;
        }
    }
 

  public void HeartBeat()
    {
        AnalyticsResult result = Analytics.CustomEvent("HeartBeat", new Dictionary<string, object>
        {
            { "sessionid", sessionId },
            { "fps",  fps },
           
        });
        Debug.Log("AnalyticResult : "+ result);
    }

It takes our system 8-16 hours to process new events, so give it a bit more time. Your code looks correct.

I am also not seeing custom events show up in the dashboard and can’t figure out what I’m doing wrong!

  • Analytics is enabled
  • Using custom events in code
  • AnalyticsResult is OK
  • Testing in just the Editor
  • On Unity 2019.7.41f
  • Waited three days for the events to show up in the dashboard, nada
  • Here’s a code snippet of one of the events I’ve sent:
    public void showStoreScreen()
    {
        if (showing_screen)
            return;
        panel_animator.SetTrigger("slide_in_left");
        showing_screen = true;
        AnalyticsResult result = AnalyticsEvent.Custom("store_open", null);
        Debug.Log(result);
    }

Any ideas?

Looks like you have opened a Zendesk ticket, and I see the event “store_open” displayed on the dashboard now.

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.

6230118--685608--upload_2020-8-21_11-11-35.png

What am I missing?

Oh wait I see the events as parameters in the Data Explorer! I guess I’m confused as to what’s supposed to show up in the Event Manager then.

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.

6237326--686684--upload_2020-8-24_17-17-8.png

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)

2 Likes

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”);

@JeffDUnity3D

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.

Thanks for your time though.

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

I also could not see my parameters previously defined. I was using Brave browser. After turning off the ads blocking I could see the parameters again.