Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

How to log the average time spent on each level?

Discussion in 'Unity Analytics' started by techmage, Nov 28, 2015.

  1. techmage

    techmage

    Joined:
    Oct 31, 2009
    Posts:
    2,072
    Somehow I want to see in a graph the average amount of time users are spending on each level. I did this by logging a custom event called 'LevelTime' and it has the parameters 'LevelName' and 'Time'. This is logging appropriately. But I cannot figure out how to set this up in the dashboard. I can get it to either show the count of each level, or the average of times submitted for every level. But I cannot figure out how to make it show the average time of each level.

    Is there someway to do this?

    Or do I need to submit each level as a different custom event?
     
  2. mpinol

    mpinol

    Unity Technologies

    Joined:
    Jul 29, 2015
    Posts:
    318
    Hi @techmage,

    If the levels in your game are sequential, players can only play level 2 after completing level 1, I believe the best way for you to view this data would be to create a funnel where each step fills upon the completion of the corresponding level. Ex. Step 1 fills when a player sends your event with LevelName = 1.

    Then on the Funnel Analyzer page you should be able to view the averages of all numerical parameters for that event by selecting 'Parameters Overview' and picking your step. Screen Shot 2015-12-01 at 3.45.06 PM.png

    Here is some more information about funnels, https://unity3d.com/learn/tutorials/analytics/intro-to-funnels
    and here is a link to another forum posts where some more funnel examples will be added in the future, http://forum.unity3d.com/threads/funnel-examples.365978/

    I hope this helps!
     
  3. techmage

    techmage

    Joined:
    Oct 31, 2009
    Posts:
    2,072
    The levels aren't sequential. The player can start on or play the levels in any order.
     
  4. mpinol

    mpinol

    Unity Technologies

    Joined:
    Jul 29, 2015
    Posts:
    318
    Hi @techmage,

    As of right now you are not able to filter out parameters this way, but it is something we are fully aware would be extremely helpful. Since your levels are not sequential, yes, I believe the best way to go about this is to send a unique Custom Event for each level name. As an example, something like,

    Analytics.CustomEvent( "LevelName", new Dictionary{ { "time", ## } } );
     
  5. Kamal1935

    Kamal1935

    Joined:
    May 11, 2017
    Posts:
    2
    Could you elaborate?
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,905