Search Unity

Standard and Core Events get send multiple times

Discussion in 'Unity Analytics' started by Majuskel, Mar 23, 2019.

  1. Majuskel

    Majuskel

    Joined:
    May 28, 2018
    Posts:
    6
    Hey,

    just wondering if this is a normal behaviour but it seems that my events get send multiple times in a row (up to 8x). See attached screenshot and keep an eye on the time... these appStart and appRunning core events where all from one hit on the editor's play button. There is also an appRunning event before every appStop event which seems also a little bit off to me.

    upload_2019-3-23_12-6-51.png

    Same goes with custom implemented standard events. Here is the key part of my implementation for sending the standard events:
    Code (CSharp):
    1. AnalyticsResult result = new AnalyticsResult();
    2. switch (logType) {
    3.     case LogTypes.FirstInteraction:
    4.         result = AnalyticsEvent.FirstInteraction(args[0]);
    5.         break;
    6.     case LogTypes.GameStart:
    7.         result = AnalyticsEvent.GameStart();
    8.         break;
    9.     default:
    10.         Debug.Log("No AnalyticsEvent found. Event will only be saved locally.");
    11.         break;
    12. }
    13. if (result != AnalyticsResult.Ok) {
    14.     Debug.LogError("Error while sending AnalyticsEvent");
    15. }
    I have not implemented any custom events yet but I guess there will be the same issue. Before calling the send-method with the code seen above the event will also saved in a locally stored log file. Here the events just appear in the right amount.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    This can happen if you have the Validator open in both the Unity Editor and in the browser Dashboard. You are not actually sending multiple events, nor are we receiving multiple identical events. It's a reporting artifact only. Also, we do cache events, so events from a previous session may be sent also. A good way to monitor the exact sending of events is by using Charles Proxy https://support.unity3d.com/hc/en-us/articles/115002917683-Using-Charles-Proxy-with-Unity and
     
    Majuskel likes this.
  3. Majuskel

    Majuskel

    Joined:
    May 28, 2018
    Posts:
    6
    Thanks a lot for your reply :) This was in fact the problem. Although the 'Service'-tab was not active in the editor, closing it completely solved the issue