Search Unity

How to properly use Analytics

Discussion in 'Unity Analytics' started by BinaryX, Jan 27, 2015.

  1. BinaryX

    BinaryX

    Joined:
    Aug 4, 2014
    Posts:
    55
    Hello,

    I added the package to my project and I sent some data to the server. The problem is : I don't quite know how to properly send data and properly visualize it.

    For example : I want to see how many people clicked on "myButton". What data should I send the server and how should I set up the funnel in order to see this information alone ?

    Does this work like Google Analytics does ? There, I had to send an event "myButtonClicked". A counter would go up on the server each time this event was triggered and I could see : 1654 people triggered this event.

    Can someone please explain how this works and probably solve my example ?

    And what about other data like : amount of hp restored in a level ? Do I send 30 hp every time I restore hp, or sum it up and send for example 900 hp at the end of the level ? (assuming I collected 30 hp boxes).

    Thank you.
     
  2. angeloferro

    angeloferro

    Moderator

    Joined:
    Sep 12, 2014
    Posts:
    105
    Hey @BinaryX,

    [1] For the "myButton" example, you can create a custom event "myButtonClicked," which will trigger each time the button is clicked. Once you've done this, in the Data Explorer feature, click on Add Custom Event and select "myButtonClicked" - this will allow you to view a time series that shows how many times a day the button was clicked.

    I've attached an example screenshot, where the custom event that I've added is "gameStart" (which triggers each time a game is started).

    [2] For the "HP restored in a level" example, one thing you could do is create a custom event "levelComplete" (which triggers each time the level is completed) and attach "TotalHpRestored" as a parameter (where "TotalHpRestored" is the sum of HP recovered on that specific level).

    Each time a player completes the "levelComplete" event, the "TotalHpRestored" parameter will tell you how much HP was restored on that level. You can view this in Data Explorer by clicking on Add Custom Event, selecting "levelComplete" and hitting View Parameters - this will show you a screen that gives you the counts, sums and averages of the "TotalHpRestored" parameter.

    Another way to approach is by creating a funnel. If your game is level based (i.e., level 1, level 2, level 3, etc...), you can create a funnel using the Funnel Analyzer feature. In your funnel, make sure each step corresponds to a specific levelComplete event (i.e., level 1, level 2, level 3), and make sure that "TotalHpRestored" is a parameter to that event. Once your funnel is created and data is flowing in, if you click on the funnel step you'll be able to view the average "TotalHpRestored" for each player that completed that specific level (see attached screenshot for an example).

    Let us know if you have additional questions or use cases - we're always happy to help :)
     

    Attached Files:

    John3D, toddh and sschan like this.
  3. teemukorh

    teemukorh

    Joined:
    Oct 28, 2014
    Posts:
    49
    Additional question related to the case 1.

    Is it aggregated how many users clicked the button or how many times the button was clicked? (Is this possible?)
     
  4. angeloferro

    angeloferro

    Moderator

    Joined:
    Sep 12, 2014
    Posts:
    105
    Hi @teemukorh,

    In case 1 above, "myButtonClicked" would show you the total number of times the button was clicked. If you just wanted to see how many users clicked the button at least once, you could do so by creating a boolean parameter "ButtonClickedOnce", which would be true if a user clicked a button (at least once) and false if the user never clicked the button.

    Hope this helps!
     
    John3D likes this.
  5. mrm83

    mrm83

    Joined:
    Nov 29, 2014
    Posts:
    345
    Is there a way to track/see the number of times a button was clicked PER user?
     
  6. angeloferro

    angeloferro

    Moderator

    Joined:
    Sep 12, 2014
    Posts:
    105
    Hi @mrm83,

    Unfortunately there's not currently a way to see per user level data. Once we have a raw data export feature, you'll be able to tie user IDs to event data (so you'll be able to see clicks per user).

    We'll make sure to post in the forum when that feature is available :)
     
    John3D likes this.
  7. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    Hi, I've added some custom events but I'm not seeing them show up in the analytics site, does it take some time for the data to filter through? Or does it need to hit a certain level before it's recorded?
    Does testing it in the Editor make it show up too?
     
  8. angeloferro

    angeloferro

    Moderator

    Joined:
    Sep 12, 2014
    Posts:
    105
    Hi @monark - normally after about ~4 hours your dashboard will update with the data. We're experiencing some lag today that we're looking into, but you should start to see your custom event data later today (apologies for any inconvenience!).

    And yes, testing events from the Editor will also show up on your dashboard.
     
  9. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    Yes seeing all now lovely!