Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Analytics Custom Events not sending all data

Discussion in 'Unity Analytics' started by Stephen_Zeeko, Jun 29, 2021.

  1. Stephen_Zeeko

    Stephen_Zeeko

    Joined:
    Aug 3, 2018
    Posts:
    6
    Hi,

    I have several custom events being posted from my game, all set up the same way and all sending the same data set : an id, a timestamp and a string describing the event. I've ran tests to trigger these events, but when I view the results on the Event Manager the data being received seems to be random. For instance, one event might only receive an ID, another might just have a timestamp, everything or nothing. The code behind all events are the same.

    Thanks
     
  2. helgrind21

    helgrind21

    Joined:
    Sep 13, 2018
    Posts:
    23
    Have you checked if the missing ones are being sent? You can check if they violated the events limits by checking the result of your sending operation. See the code below:
    Code (CSharp):
    1. AnalyticsResult result = AnalyticsEvent.Custom(eventName, parameters);
    The result can be Ok if the event produced follow the requirements, but if it doesn't you can expect one of the results provided in this documentation page.

    Given that all events are Ok, you can use Charles Proxy to verify if they are being sent to unity servers.
     
  3. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    If you are using WebGL, ensure that you call Analytics.FlushEvents() after every CustomeEvent call. This is only on WebGL, and is a known issue.