Search Unity

Official Funnel Analyzer Improvements

Discussion in 'Unity Analytics' started by ap-unity, Sep 19, 2017.

  1. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    Hi everyone,

    We've just pushed a (mostly cosmetic) update to funnels. I say "cosmetic", but we think it's a much better UI/UX that addresses several concerns that you, our users, have raised. The update includes:
    • Streamlined UI/UX
    • Design better aligned w/ Data Explorer
    • Ability to view multiple segments within the same graph
    • Ability to view both the funnel and its parameters within same graph
    • Overall conversion rate appears in funnel overview
    • Improved naming of funnel steps for improved clarity
    • Various minor bug fixes
    This is not the end of our funnel update process. Keep an eye out for further improvements coming soon!

    new-funnel.PNG
     
    unityjingyao likes this.
  2. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699
    Hi there, looks great!
    Sorry to ask here, but can I set a funnel in code, with in the game? Or must each be set by hand online?
    Thanks

    ex, I have 6 worlds, 20 levels each, 120 levels total. I want to see what levels are played. I would prefer a single line of code, vs 120 entrances into the web portal, by hand.
    Thanks
     
  3. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    637
    We don't have a coding API, but we do have a new templating system which uses Standard Events to build out a funnel. It doesn't precisely do what you're asking, but it comes close. You can now click "From Template" and choose a Level Completion template, telling it how many levels you have. We currently limit this template to 50 levels (I'm investigating the reason for that limit)...but perhaps simply spin up one funnel for each world for now (or wait to see if we change it ;) )? As I say, not perfectly in line with what you're requesting, but hopefully would work for now.
     
    renman3000 likes this.
  4. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699

    Ok great.
    Thanks and INVESTIGATE!!! Tho if I can just create one per world, that should work.

    Thank you.
     
  5. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699
    Hi do the funnel set up the levels, in the web page, each level in world x, has a Level Started, and a Level Completed slot. What I am wondering is, how do I access these slots, via Code.

    Is it a Analytics.CustomEvent()?

    If so, what are the arguments I must pass to Analyitcs to insure the correct slot is filled?


    Thanks




     
  6. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @renman3000

    Yes, that is exactly correct. The Dashboard receives the events that are sent from your game.
    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.Analytics.Experimental;
    3.  
    4. public class GameManager : MonoBehaviour {
    5.  
    6.     void StartLevel(int level) {
    7.         AnalyticsEvent.LevelStart(level);
    8.         ///Other level start stuff
    9.     }
    10.  
    11.     void CompleteLevel(int level) {
    12.         AnalyticsEvent.LevelComplete(level);
    13.         ///Other level start stuff
    14.     }
    15. }
    This code example uses Standard Events, so it will automatically use the standard event names that are also used by the Funnel Template system. Here are some more resources about Standard Events:
    Standard Events Asset Store page
    Standard Events documentation
    Standard Events Blog Post 1 - Onboarding
    Standard Events Blog Post 2 - Application and Progression
     
  7. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699


    ok, the only issue for me is, LevelStart()... How do I say World1Level1_Started().


    And thanks for the help!
    Cheers!
     
  8. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @renman3000

    You can send the events in any format that would fit your game. I think the necessary modifications might put the funnel templates out of reach, but creating a funnel manually for 20 levels per world would not be too time consuming.

    Code (CSharp):
    1. using System.Collections.Generic;
    2. using UnityEngine;
    3. using UnityEngine.Analytics.Experimental;
    4.  
    5. public class GameManager : MonoBehaviour {
    6.  
    7.     void StartLevel(int world, int level) {
    8.         Dictionary<string, object> levelData = new Dictionary<string, object>();
    9.         levelData.Add("world", world);
    10.         levelData.Add("level", level);
    11.         //Add any other level-specific data e.g. coins, player health, completion time, etc.
    12.  
    13.         //Format: world_1_level_1_start, world_1_level_2_start
    14.         string eventName = string.Format("world_{0}_level_{1}_start", world, level);
    15.  
    16.         AnalyticsEvent.Custom(eventName, levelData);
    17.  
    18.         ///Other level start stuff
    19.     }
    20.  
    21.     void CompleteLevel(int world, int level) {
    22.         Dictionary<string, object> levelData = new Dictionary<string, object>();
    23.         levelData.Add("world", world);
    24.         levelData.Add("level", level);
    25.         //Add any other level-specific data e.g. coins, player health, completion time, etc.
    26.  
    27.         //Format: world_1_level_1_complete, world_1_level_2_complete, etc.
    28.         string eventName = string.Format("world_{0}_level_{1}_complete", world, level);
    29.  
    30.         AnalyticsEvent.Custom(eventName, levelData);
    31.  
    32.         ///Other level complete stuff
    33.     }
    34. }
    And then the funnel definition would look for the events you've defined:
    world-level-funnel.PNG
     
    renman3000 likes this.
  9. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699
    Awesome, thanks! Finally had a chance to look at this. I have not used dictionaries yet. So kinda geeked!
     
  10. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699

    Hi, this code, what is it in reference to? I see no ability for MonoDevelop to recognize it.

    Code (csharp):
    1.  
    2. AnalyticsEvent.Custom(eventName, levelData);

    ...
    Will this work?
    Code (csharp):
    1.  
    2. Analytics.CustomEvent (eventName);

    edit: Update::Will this work, it is hard to gauge, with out a real time pick up.
    Code (csharp):
    1.  
    2.  
    3.     public static void level_started(int int_level, int int_world){
    4.  
    5.  
    6.         //level info, world level
    7.         Dictionary<string, object> levelData = new Dictionary<string, object>();
    8.         levelData.Add("world", int_world);
    9.         levelData.Add("level", int_level);
    10.         //Add any other level-specific data e.g. coins, player health, completion time, etc.
    11.         //Format: world_1_level_1_start, world_1_level_2_start
    12.         string eventName = string.Format("world_{0}_level_{1}_start", int_world, int_level);
    13.         Analytics.CustomEvent (eventName);
    14.  
    15.  
    16.         //clear
    17.         levelData.Clear ();
    18.  
    19.  
    20.         //level info, mode, difficulty
    21.         levelData.Add ("mode", LoadingMng.ins.settings_vs);
    22.         levelData.Add ("difficulty", LoadingMng.ins.settings_difficulty);
    23.         eventName = string.Format ("mode_{0}_difficulty_{1}_start", LoadingMng.ins.settings_vs, LoadingMng.ins.settings_difficulty);
    24.         Analytics.CustomEvent (eventName);
    25.  
    26.  
    27.  
    28.  
    29.     }
    30.     public static void level_completed(int int_level, int int_world){
    31.  
    32.         //level info, world level
    33.         Dictionary<string, object> levelData = new Dictionary<string, object>();
    34.         levelData.Add("world", int_world);
    35.         levelData.Add("level", int_level);
    36.         //Add any other level-specific data e.g. coins, player health, completion time, etc.
    37.         //Format: world_1_level_1_start, world_1_level_2_start
    38.         string eventName = string.Format("world_{0}_level_{1}_complete", int_world, int_level);
    39.         Analytics.CustomEvent (eventName);
    40.  
    41.  
    42.         //clear
    43.         levelData.Clear ();
    44.  
    45.  
    46.         //level info, mode, difficulty
    47.         levelData.Add ("mode", LoadingMng.ins.settings_vs);
    48.         levelData.Add ("difficulty", LoadingMng.ins.settings_difficulty);
    49.         eventName = string.Format("mode_{0}_difficulty_{1}_complete", LoadingMng.ins.settings_vs, LoadingMng.ins.settings_difficulty);
    50.         Analytics.CustomEvent (eventName);
    51.     }
     
    Last edited: Dec 3, 2017
  11. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
  12. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699
  13. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699
    @ap-unity Hi, So I am finally installing the Custom Events, as you have suggested. It will be 24 hours before any data takes hold. I am curious if I am setting it up correctly. I have followed your steps very closely, just double checking. If you have the time, please go over.

    Cheers



    1. All parameters in Funnel Analyizer are blank.
    https://s7.postimg.org/ifekrnby3/Screen_Shot_2017-12-15_at_11.59.26_AM.png
    Is this ok?


    2. As noted, each level is part of a designated world. So Level 1, World 1... kinda thing.
    That said, see code, and pic. Is this legit? Thanks
    //code:

    //set up


    This should all be legit? I hope.

    Anyhow, thank you for your help. Best.
     
  14. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @renman3000

    Yeah, that's fine. If the parameters are blank, then the Funnel step will just be triggered by the Custom Event with that name.

    You aren't using the levelData in your Custom Event. You can either add it to the event as the second parameter, or you can just remove it entirely if you don't need it:

    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.Analytics;
    3.    
    4. public class GameManager : MonoBehaviour {
    5.    
    6.     void StartLevel(int world, int level) {
    7.         //Format: world_1_level_1_start, world_1_level_2_start
    8.         string eventName = string.Format("world_{0}_level_{1}_start", world, level);
    9.    
    10.         Analytics.CustomEvent(eventName);
    11.    
    12.         ///Other level start stuff
    13.     }
    14.    
    15.     void CompleteLevel(int world, int level) {
    16.         //Format: world_1_level_1_complete, world_1_level_2_complete, etc.
    17.         string eventName = string.Format("world_{0}_level_{1}_complete", world, level);
    18.    
    19.         Analytics.CustomEvent(eventName);
    20.    
    21.         ///Other level complete stuff
    22.     }
    23. }
     
  15. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    Also, wanted to mention that we do have real time Validation of Funnels now. The Validator is now on the Funnel Builder page, so you can test out events and make sure they are triggered correctly. We're still working on the documentation for this, but the process is basically:

    1. Define the Funnel step with your Custom Event
    2. Trigger the Custom Event in the Editor and watch the funnel Validator to see if it triggered the right step.
     
    renman3000 likes this.
  16. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699


    Great!
    But I gathered from the page, and pop up windows that the initial funnel needs to be initialize, and that process is 24 hours. No?
     
  17. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    That's true after you create the funnel.

    But while you are still building it, when you are adding steps, that is when the Funnel Validator is available.
     
    renman3000 likes this.
  18. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699
    Really?
    ok, cheers!!!
     
  19. brainydexter

    brainydexter

    Joined:
    Apr 4, 2016
    Posts:
    21
    Is there any way I can find the average score of players on a given level ?
    I send a level complete event which also contains the score player earned by player in that level.
     
  20. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
    Hi @brainydexter
    You can add the level complete event in Data Explorer, then select score and average.
    Here is an example.
    upload_2017-12-22_13-48-47.png
     
  21. brainydexter

    brainydexter

    Joined:
    Apr 4, 2016
    Posts:
    21
    @unityjingyao that doesnt tell me the average score for a specific level, say level 5. Average across all the levels doesnt help me much, since I want to tune each level based on what the average score looks like.

    Can you please take a look at my project's funnels also and see if i can get that information there as well ?
     
  22. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
  23. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  24. brainydexter

    brainydexter

    Joined:
    Apr 4, 2016
    Posts:
    21
    @unityjingyao submited a request through that link.

    @JeffDUnity3D I send the level as a parameter. If I rename the event to level_5, how will I then get the average ? (I have a Plus subscription but Pro is too expensive for our indie team. Too bad we cant access our own analytics data.)
     
  25. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    @brainydexter If you rename the event to level_5, then you can get the average using the Data Explorer (Pro or Plus subscription is not needed) See attachment for more details.
     

    Attached Files:

  26. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699
    @ap-unity
    Hi, My funnel analyiser results are not what I was expected, given playing time overall and the number of users over all in the Overview.

    Can you take a quick glance at what my basic approach is, to gathering the data and let me know if you spot an error?

    Thanks!

    Code (csharp):
    1.  
    2.     public static void level_started(int int_level, int int_world){
    3.  
    4.         if (!isLive) {
    5.             return;
    6.         }
    7.         //level info, world level
    8.         Dictionary<string, object> levelData = new Dictionary<string, object>();
    9.         levelData.Add("world", int_world);
    10.         levelData.Add("level", int_level);
    11.         //Add any other level-specific data e.g. coins, player health, completion time, etc.
    12.         //Format: world_1_level_1_start, world_1_level_2_start
    13.         string eventName = string.Format("world_{0}_level_{1}_start", int_world, int_level);
    14.         AnalyticsEvent.Custom (eventName);
    15.         Analytics.CustomEvent(eventName);
    16.  
    17.  
    18.         //clear
    19.         levelData.Clear ();
    20.  
    21.  
    22.         //level info, mode, difficulty
    23.         levelData.Add ("mode", LoadingMng.ins.settings_vs);
    24.         levelData.Add ("difficulty", LoadingMng.ins.settings_difficulty);
    25.         eventName = string.Format ("vs_{0}_diff_{1}_start", LoadingMng.ins.settings_vs, LoadingMng.ins.settings_difficulty);
    26.         AnalyticsEvent.Custom (eventName);
    27.         Analytics.CustomEvent(eventName);
    28.  
    29.  
    30.  
    31.     }
    32.  
     
  27. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You likely do not want to call each event twice, can you elaborate on your approach here and why you are using duplicate calls?

    Code (CSharp):
    1. AnalyticsEvent.Custom (eventName);
    2. Analytics.CustomEvent(eventName);
    Can you describe what the issue is, what are your expected results and what discrepancy you are seeing? If you just want total user count, the overview page on the Analytics Dashboard will provide this for you with no coding required as it is provided by default with Unity Analytics.
     
  28. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,699


    Oops!
    I must noticed that! Do you think removing one would help?

    My issue is that as you see in pic,near 0 results. Yet I am averaging 200 players a day with an average of 5 minutes of play.


    The idea is to have a simple line of code handle multiple variables, mainly World - Level.
     
  29. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Unfortunately without knowing what is in your funnel step, it is not possible for me to troubleshoot. Have you looked at Data Explorer also?