Search Unity

How to differentiate full version & trial version users ?

Discussion in 'Unity Analytics' started by manutoo, Jun 3, 2021.

  1. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    524
    Hello,

    I have a project with a full version & demo version. I'd like to be able to count both users separately. Is it possible ?

    Or even have 2 completely different analytics entries.

    Thanks in advance for any help ! :)
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You could send a a custom event with this information. Can you determine in your script whether the user is running full or demo? If so, then you could use this:

    AnalyticsResult ar = Analytics.CustomEvent("FullVersion");
     
  3. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    524
    Yes, I can do that.

    Would it be better or worse to do that :
    Code (CSharp):
    1. #if __TRIAL
    2. AnalyticsResult ar = Analytics.CustomEvent("TrialVersion");
    3. #else
    4. AnalyticsResult ar = Analytics.CustomEvent("FullVersion");
    5. #endif
    ..?
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    If that works for you. I'm not sure how you are going to use a compiler directive. What if a user has the trial version then wants to upgrade? You don't want two separate versions of your game. Also, keep in mind. If a user has the trial version, they will send that event. When they upgrade, they will send the FullVersion event. So one person will be sending both events. And unless you check first time use, they will be sending one of those events every time they play the game.
     
    Last edited: Jun 3, 2021
  5. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    524
    I do a separate build for the trial version because it can use fewer assets and thus it's much smaller. :)

    If I fire the event every time, will it be easier to differentiate the users on a day-per-day basis, or is it useless ?
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    That is up to you, you just need to think it through. If one user sends the same event 10 times a day and another user only once a day, how do you plan to interpret that data? You have 11 for that day. Then maybe 3 the next day. But still only 2 users.
     
  7. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    524
    Ok, then I'll send it once a day at maximum.

    Thanks for your all answers ! :)
     
  8. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You'll need to think how you will do that. PlayerPrefs is one solution.
     
  9. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    524
    @JeffDUnity3D ,

    hello again !

    So the events are working nicely, but I'd like to know the "Total daily playtime per user" depending on each event (to know if people who have bought the game from my website play more or less than the ones who have bought it from Steam).

    It seems it's not possible to do that, right ?
     
  10. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You would want to look at custom segments https://docs.unity3d.com/Manual/UnityAnalyticsSegmentBuilder.html
     
  11. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    524