Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Analytics Test Mode

Discussion in 'Unity Analytics' started by Thirty9, Jan 16, 2019.

  1. Thirty9

    Thirty9

    Joined:
    Apr 6, 2015
    Posts:
    16
    I'm trying to test my analytic calls locally in the editor. I set the test mode to true, but i don't see any event in the Validator. Does anyone know how to test analytics locally?
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    We occasionally have delays with the validator service, so continue to try after some time. Are you sending Custom Events? Can you show your code if so? Regardless, you should still be seeing the core app events in the Validator, once you enable Analytics in the Services window.
     
  3. Thirty9

    Thirty9

    Joined:
    Apr 6, 2015
    Posts:
    16
    Code (CSharp):
    1.  
    2.         AnalyticsResult res = Analytics.CustomEvent(eventName, eventData);
    3.         if (res != AnalyticsResult.Ok) {
    4.             Logger.Error("{0} was not sent successfully. The error is {1}", eventName, res);
    5.         }
    6.  
    Yes, i'm sending custom events. However, neither core app nor custom events is showing up.
    The result is always "OK".
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    What version of Unity are you using? Are you seeing the same behavior in the Analytics Dashboard also? You can use the Go To Dashboard button in the Services window, then go to the Event Manager tab. I just tested myself without issue with Unity 2018.2.17f1, screenshot attached. The Dashboard looks similar for my project.
     

    Attached Files:

  5. Thirty9

    Thirty9

    Joined:
    Apr 6, 2015
    Posts:
    16
    I'm on 2018.2.5f1.
    Event Manager has the same problem.

    A bit more information. I did notice there is a huge delay with getting events on validator. Some events will pop up in the validator after 24 hours, but still not all the events will be there.
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  7. Thirty9

    Thirty9

    Joined:
    Apr 6, 2015
    Posts:
    16
    I put
    AnalyticsSettings.testMode = true

    in Awake(). Should I do it in an editor script?
    screenshot:
    upload_2019-1-17_16-15-37.png


    I am the manager of the project.

    Setting it to false doesn't help.
     
  8. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Thanks for providing, the Charles capture should show what is going on.
     
  9. Thirty9

    Thirty9

    Joined:
    Apr 6, 2015
    Posts:
    16

    This is what i have in Charles when i quitted the game (though some events are supposed to be sent during the game. I guess Unity batches the events), i think that means all the events were sent successfully right?
     
    Last edited: Jan 18, 2019
  10. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  11. Thirty9

    Thirty9

    Joined:
    Apr 6, 2015
    Posts:
    16
    Great! thanks for your help!!