Search Unity

(Complete Analytics beginner) How could I get data of what a player is getting killed by?

Discussion in 'Unity Analytics' started by Hertzole, Oct 20, 2015.

  1. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    422
    Hello!

    I got convinced by Unity's new video, "Using Unity Analytics: A day in the life of a developer", to use analytics. So I decided to give it a shot and I have no idea what I am doing. Basically I just want to find out what kills my players the most. Of what I've understood you have to use the Funnel Analyzer but I have no idea how to use this either. So any help is appreciated!

    Thanks
     
  2. mpinol

    mpinol

    Joined:
    Jul 29, 2015
    Posts:
    317
    Hi @RealMTG,

    We are glad you enjoyed Dylan's presentation! Without knowing what type of game you are making I would suggest sending a Custom Event every time a player dies with the cause of the players death as a parameter.

    For example,
    Analytics.CustomEvent("playerDeath", new Dictionary<string, object>{ { "zombie", 0 }, { "levelid", 1 } } );

    This way in the Data Explorer, after clicking the View Parameters button, you can view the counts for how many times players died on each particular level.

    Funnels are a tool that is best used to determine how far players progress through sequential events. This means that Funnels are best used to determine how far players are progressing through the levels of your game, but you can do some clever things with Segments to get a lot more information out of them. Another example, you could create a Custom Segment that players enter once they have been killed by a zombie at least five times. Then in the drilldown type area of the Funnel Analyzer you could view how many players at each step belong to this segment.

    You can read more about Custom Events, Custom Segments, and Funnels here, https://unity3d.com/learn/tutorials/topics/analytics

    I hope this helps!
     
    Last edited: Oct 21, 2015
  3. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    422
    Hi

    I tried the code you provided and I am still quite lost. I read this and I added a custom event based on "playerDeath" and the segment being "All current users". Now when I click "View Parameters" there is nothing there but that might be the delay it takes for it to get the data. But if that is the case then why can it fetch the data so fast on the integration pages? But there is also something else. Everytime I leave the page and come back that custom event is gone. Why is that? Am I missing something here?
     
  4. mpinol

    mpinol

    Joined:
    Jul 29, 2015
    Posts:
    317
    Hi @RealMTG,

    Whoops, I had an extra left parenthesis in my code right after the Dictionary, I just made an edit so it should be correct now.

    While playing from the editor all events are routed directly to the validator and will bypass the Dashboard. This goes the same for when you build your projects with 'Development Build' checked in the build settings. Only data from project builds with 'Development Build' unchecked will populate in the Dashboard, which roughly take 6-8 hours after the events are sent that they become available in the Dashboard.

    Just to clarify, do you mean when you navigate away from the Data Explorer you have to reset the Custom Events you were looking at?
     
  5. Hertzole

    Hertzole

    Joined:
    Jul 27, 2013
    Posts:
    422
    Just just to be clear. If I want to test I need to build the game and then wait 6-8 hours to get a result at the dashboard?

    Also, this is what I meant with Custom Events disappearing.

     
  6. mpinol

    mpinol

    Joined:
    Jul 29, 2015
    Posts:
    317
    We are working on lowering the amount of time it takes the Dashboard to update and as of right now it has been updating pretty regularly every 3-4 hours. That being said I would like to maintain that our official stance on the Dashboard updates is that it occurs at least every 6-8 hours.

    Your Custom Event disappearing when navigating away from the Data Explorer is something that we have noticed and are making a plan to fix!