Search Unity

How Unity Analytics recognises returning users (and count/ignore them in DAU)?

Discussion in 'Unity Analytics' started by cr4y, Jan 6, 2016.

  1. cr4y

    cr4y

    Joined:
    Jul 12, 2012
    Posts:
    44
    Hi,

    I try to understand and cannot find anywhere something really basic:
    I believe that when I run StartSDK(string appId) function, it connects with Unity Cloud and collects information about new user.
    I also believe that Unity Cloud somehow is able to distinguish returning user. So if one person is playing game 5 times per day, DAU=1, and total playtime is equal sum of play periods. Am I right?

    How does Unity recognise returning users? Does it use usernames set by SetUserId(string)? Will it work correctly without this function? Does it compare IP numbers or something?

    Thanks in advance for any help,
    Kris
     
    silviu-georgian77 likes this.
  2. mpinol

    mpinol

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

    The first time your app is launched a unique userid is created and stored locally on the device. This userid is how we distinguish users from one another. This approach does have one catch though. Since the id is stored locally on the device, if the user uninstalls or deletes the file that contains the userid, the next time the app is launched a new userid will be generated and they will be counted as a new user.

    The SetUserId() function is a way for you to set a particular userid for your own reference. Using the function to set your own userid is most useful when paired with the Raw Data Export feature that we are working on. This would allow you to identify users according to the userid that you set as opposed to using the generated Analytics userid.
     
    creasaur, silviu-georgian77 and cr4y like this.
  3. cr4y

    cr4y

    Joined:
    Jul 12, 2012
    Posts:
    44
    Thanks a lot for explanation!
     
  4. AS-Andrew

    AS-Andrew

    Joined:
    May 23, 2016
    Posts:
    3
    If you push an update through steam and users download update, does that generate a new userid?
     
  5. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Updates and reinstalls (by the same user on the same device) do not count as a new user.
     
    AS-Andrew likes this.
  6. AS-Andrew

    AS-Andrew

    Joined:
    May 23, 2016
    Posts:
    3
    awesome! thanks for the quick response.
     
  7. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Slight correction: Updates don't count as new users, but reinstalls will.
     
  8. wwcolter

    wwcolter

    Joined:
    Nov 4, 2016
    Posts:
    28
    Jeff - when using Unity in the editor, how do we force new users? I tried deleting the cached data in `AppData\LocalLow\AppName\` (Windows) and playing again but that doesn't seem to do the trick.
     
  9. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    We store the info in the Registry under HKEY_CURRENT_USER\SOFTWARE\Unity\UnityEditor\[company]\[project]

    This is where we store PlayerPrefs. You can find the unique key in the registry, then call DeleteKey on that key.

    https://docs.unity3d.com/ScriptReference/PlayerPrefs.html

    You can also call PlayerPrefs.DeleteAll, but use with caution.
     
    wwcolter likes this.
  10. creasaur

    creasaur

    Joined:
    Sep 5, 2017
    Posts:
    4
    Hi @JeffDUnity3D,

    Does it apply for custom_userid that we set or the userid generated by the Unity Analytics?

    Thanks,

    Beste
     
  11. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    @creasaur It would be the user id generated by Unity Analytics which we use to count new users. We would not take into account any custom events or properties that you might set.
     
  12. ozberkozdemirjg

    ozberkozdemirjg

    Joined:
    Jan 22, 2021
    Posts:
    2
    It looks like there is no way to see new users in an accurate way based on the 2 answers from @JeffDUnity3D @mpinol :

    "This userid is how we distinguish users from one another. This approach does have one catch though. Since the id is stored locally on the device, if the user uninstalls or deletes the file that contains the userid, the next time the app is launched a new userid will be generated and they will be counted as a new user"

    "Slight correction: Updates don’t count as new users, but reinstalls will."

    Then the question is this? How come can we trust retention rate calculation on Unity Analytics? We're viewing x2, x3 times more new users than the actual? There has to be some ways to track news users accurate. Am I wrong?
     
  13. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Your observation is correct. How are you calculating "actual"? You can't go by downloads from the store, for example, the numbers won't reconcile.
     
  14. ozberkozdemirjg

    ozberkozdemirjg

    Joined:
    Jan 22, 2021
    Posts:
    2
    We're using attribution tracking partner. First Launch event is triggered when someone launch the app for the first time. Since our game is online, I'm pretty sure that they measure accurately. There is only a small gap between our partner's calculation and our database. I was trying to compare the retention rates between unity analytics, our database and the partner's dashboard. It's the reason why I found myself here. If there is smth inaccurate with new user, you can't expect you view right retention rates :) If there is any way to fix this, to see accurate numbers, I'd like to hear it from you.
     
  15. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Is your FirstLaunch event an Analytics custom event? If so, you could track this event in your dashboard. We count a reinstall as a new user, this behavior is not expected to change any time soon.