Search Unity

Custom Events Basics

Discussion in 'Unity Analytics' started by zehreken, Apr 12, 2015.

  1. zehreken

    zehreken

    Joined:
    Jun 29, 2009
    Posts:
    112
    Hello,
    First of all thank you for this indispensable tool. Right now I'm on the verge of finishing my first game and this tool will come really handy. But I couldn't find any useful documentation so far and I couldn't understand how funnel analyzer works. All I want to do is collect some data at the end of a level like average FPS, player hp, number of collectables etc. I have setup my first funnel step as in the picture and I am going to use the CustomEvent method. Is this enough? Also I don't understand why the system needs at least two funnel steps and the use of "equals", ">=" and "<". Thanks in advance.
    Screen Shot 2015-04-12 at 21.21.24.png

    Code (csharp):
    1.  
    2. UnityAnalytics.CustomEvent("end_game",
    3. newDictionary<string, object>()
    4. {
    5. { "a_fps", a_fps },
    6. { "p_hp", p_hp },
    7. { "n_coll", n_coll }
    8. });
    9.  
     
    Last edited: Apr 12, 2015
  2. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    That custom event looks like it should work if I understand the API correctly

    As for funnel analyser, I'm not too sure as I haven't used it much myself (and thus don't quote me on this ;)). I believe the funnel analyser is for sorting out users or pieces of data which fit the criteria, eg. if you wan't only people with 60+fps, and over half health, then by creating the funnel, you can see how many people meet this requirement, and then you can look at specific data for those who fit the criteria. As for why you need at least two steps, I have no idea, probably for comparisons but I don't know.

    Hope that helped, and sorry if I'm wrong about the funnel events!
     
  3. zehreken

    zehreken

    Joined:
    Jun 29, 2009
    Posts:
    112
    That makes sense. I thought if a value doesn't meet a constraint it is not collected at all.
    I think it is a good idea to use first funnel step for raw data and latter ones for screening. Thanks for the insight.
     
  4. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    You're welcome
    Again sorry if this information is not completely accurate
     
  5. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    637
    @QFSW thanks for stepping up! We appreciate you being an active part of the community!

    @zehreken QFSW is essentially correct. The purpose of a funnel is to reductively screen out users who don't meet certain criteria. By doing so, you can visualize where you are losing players and make improvements. From the step you show in your screenshot, it appears you have this idea upside-down in your head. If you simply make your first step the event 'end_game' (without specifying any parameters), then that step is all done. The funnel will automatically collect all parameters associated with that event. The only reason you want to specify parameters in a funnel step is if you want to screen people out.

    For example, in your end_game event, you have:
    • fps
    • hp
    • coll
    If you made the step:

    end_game, fps > 60 and hp = 25

    then the ONLY players who would be included in that step of the funnel would be those whose fps was greater than sixty and whose HP was EXACTLY 25. All other players would be screened out. A more typical (and useful) setup, therefore, is simply:

    end_game, levelID = 1

    Such that you can see how many players finished level 1.

    The reason for requiring a minimum of 2 steps has to do with the core purpose of a funnel: finding drop-off, i.e., how many people you lose between steps. In a well-designed funnel in a smoothly-running game, each step typically loses a modest number of people. This is expected...people get bored or go to answer the phone or whatever. If you see a large drop-off, though, that might indicate a problem. Perhaps there's a bug that crashes the game, or the level is too hard and people give up. Funnels are all about finding those rough friction points and smoothing them over. In this regard, a one-step funnel wouldn't be much use.

    Hope that helps.
     
    Modismos likes this.
  6. zehreken

    zehreken

    Joined:
    Jun 29, 2009
    Posts:
    112
    That really helps, thank you.