Search Unity

How to get funnel data from the game?

Discussion in 'Unity Analytics' started by Simon_says, Jul 10, 2015.

  1. Simon_says

    Simon_says

    Joined:
    Oct 19, 2013
    Posts:
    141
    I haven't found any code samples on how to use the funnel analyzer. I have created a funnel in the analytics page called Levels and i have Events name as Level 1 to Level 15 and I have set no parameters.

    Code (CSharp):
    1. public void LevelSuccess(int level)
    2. {
    3.    // what analytics code to put here so I can send the data to the funnel based on the completed level(from the parameter)?
    4. }
    Also 1 more question, what if I update my game and add like 5 more levels, so later I will have 20 levels in my game, how will that work with the funnel analyzer if I can't add more levels after I have made the funnel?
     
  2. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    637
    Hi @Simon_says!

    Sorry for the delay in responding. There's no specific code for funnels. Funnels operate based on users triggering specific custom events. Check out the integration pages, and specifically the page regarding Custom Events for information on how to send these events. As soon as a user triggers the Event representing the first step of the funnel, s/he is "in" the funnel. Note that this is not retroactive. User's who fired the event before you built the funnel will not be counted.

    As to your second question, the answer is that funnels are static: you can't change the specification after the funnel has been created. This is because changing the funnel after people start using it often creates data that is difficult to interpret. We recommend creating a new funnel if you need to change its definition.
     
    Simon_says likes this.
  3. Simon_says

    Simon_says

    Joined:
    Oct 19, 2013
    Posts:
    141
    Thank you for the response!

    Regarding the 2nd question, is it better then to create a funnel with like 100 levels even though my game only has 15 now but that might be increased in the future? Also, is there a level limit in the funnels like how many levels can be in 1 funnel?
     
  4. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    637
    There's no real upper limit (we certainly have funnels with 100+ steps). Personally, I question the value of a funnel that tracks events a user can only theoretically trigger, but I guess there's no harm in it.
     
  5. Simon_says

    Simon_says

    Joined:
    Oct 19, 2013
    Posts:
    141
    I just thought of another question, what if the player goes to play a level that is already completed? Is the analytics smart enough to ignore the event of the same level completion? Or that will cause problems and I have to take care of that in code not to send the custom event of the already completed level?

    Also, what if the user passes some levels when he doesn't have internet connection and can't send the custom event, and later he passes some later level and records that?
     
    Last edited: Jul 16, 2015
  6. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    637
    Funnels are smart enough (or perhaps more accurately, dumb enough) not to care about a single user passing through multiple times. There's no need to modify your code. Once a user has made it to step two, they'll never regress to step one. And they can pass through step two any number of times. The funnel has no knowledge of that.

    The Analytics SDK takes care of the offline issue by caching events, then sending a batch the next time the user connects. It should rarely occur that a user's data is lost permanently. To the extent that this does happen, it shouldn't be more than a very modest amount of statistical noise.
     
  7. AmobearGame

    AmobearGame

    Joined:
    Mar 31, 2016
    Posts:
    28
    Hi! I also have a question.If I want to track 1000 Levels(from level 1,2,3...level 1000) in my game and then I should create 1000 level in Funnel Custom? So I think that really manually.Can I add new funnel by code?
    I mean if User's playing level and it will update to server.this is mean Level generated when User level up.Thanks.:)
     
  8. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    637
    Hi @petvenger,

    There's no "code" for funnels (though perhaps there should be). Currently, all funnels are manual in nature, so you couldn't create one that automatically added steps as users increase in level.

    For the number of levels you're describing, it's unlikely to be useful to create one funnel to track all levels. Rather, you might want to create a "high-resolution" funnel that tracks your first 10 (or 20 or 50) levels, using it to capture your users' early game experience, then a separate "low-resolution" funnel that tracks every 10 (or 20 or 50) levels, so that you can see the general flow of users who've gone further. This is just one approach — there are lots of different ways to split things up — but the idea is to make sure that your funnels actually provide useful detail where it's needed.
     
    erika_d likes this.
  9. AmobearGame

    AmobearGame

    Joined:
    Mar 31, 2016
    Posts:
    28
    Hi Erika.I don't really understand your mean.That mean I still should create 1000 Level if I wanna track 1000 Level?
    my game like Candy crush or any puzzle match three which have many level.
    I wanna track each level(as level 1,level 2,...)
    I don't want to create each pieces as from 0-10 or 10-20 level .Thanks.
     
  10. erika_d

    erika_d

    Joined:
    Jan 20, 2016
    Posts:
    413
    Hi @petvenger,

    The way our funnels display levels, it can very difficult to see specific information about the funnel steps when there are as many steps in one funnel as you describe. This is because to display all those steps each line has to get very very tiny, which makes it hard to read. This is why Marc suggested that if you want to track that many levels you create several funnels with fewer steps, to increase readability and understandability of the funnels.
     
  11. AmobearGame

    AmobearGame

    Joined:
    Mar 31, 2016
    Posts:
    28
    Thanks for answer @erika_d .That's mean I will create many funnel (maybe each funnel have about 50 Level) and That's OK.I'm newbie with Unity Analytics.I will need ask more questions.Thank you so much.
     
    erika_d likes this.