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

Unity Analytics Implementation overview

Discussion in 'Unity Analytics' started by RoopeshReddy, Aug 1, 2018.

  1. RoopeshReddy

    RoopeshReddy

    Joined:
    Aug 30, 2017
    Posts:
    8
    Hi All,

    I am starting to implement analytics in my unity application. As part of the process I have some doubts.

    • Is Unity Analytics a blocking call or an asynchronous call??
      • For e.g. If I call UnityEngine.Analytics.Analytics.GameStart(EventParameters) and my network connection is quite slow, will it block the game's UI??
    • Does Unity Analytics automatically store and flush events in absence of network??
      • For e.g. If I call UnityEngine.Analytics.Analytics.GameStart(EventParameters) and I don't have internet connection, what would happen to this event. There is no result in UnityEngine.Analytics.AnalyticsResult saying no network. So how is this handled??
    Answers to this questions would be of great help to me and it would also help me decide whether Unity analytics is the right analytic SDK I should consider using.

    Thanks in advance.

    Regards,

    Roopesh
     
    akasabutski likes this.
  2. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    They are asynchronous. The result is determined by the content of the event, not the response from the server. An Ok result means the event was successfully added to the event queue to be sent out.

    That is correct. The events are always batched together before being sent, for efficiency reasons. In addition, if there is no network activity, the events are stored on the device until the network connection resumes.

    Happy to answer any other questions you might have about integration, structuring your events or the dashboard.
     
    akasabutski likes this.
  3. RoopeshReddy

    RoopeshReddy

    Joined:
    Aug 30, 2017
    Posts:
    8
    Thanks for the quick response. We are formulating our needs now. Will get back in case of queries.

    Regards,

    Roopesh
     
  4. RoopeshReddy

    RoopeshReddy

    Joined:
    Aug 30, 2017
    Posts:
    8
    Hi,

    We have one more use case in our application. Players would be asked to download some game assets and each asset would have different size. If user downloads a certain asset we need to note down how much size the downloaded asset was. For this we need to trigger an event parameter with FLOAT value.

    But in most of the unity analytics forums out there say only INT is supported. I can't make it a STRING because it would adversely affect the visualization of our data and it is not recommended to trigger events which have unique values with STRING parameters. I am not seeing any error reported by the UnityAnalytics method when parameter has FLOAT value. So could you explain what happens to the FLOAT valued parameters, will they be rounded off?? Can you suggest me on how to achieve it within our application.
     
  5. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    Where do you see that mentioned? We have no restriction against using Float values in Custom Events.
     
  6. RoopeshReddy

    RoopeshReddy

    Joined:
    Aug 30, 2017
    Posts:
    8
    Cool thanks for the response and that's great. I got little confused checking the blogs.