Search Unity

Using UnityAnalytics data at runtime on users device

Discussion in 'Unity Analytics' started by Dennooo, Oct 23, 2019.

  1. Dennooo

    Dennooo

    Joined:
    May 12, 2015
    Posts:
    88
    Hey there,

    I have the following problem: I would like to divide my players into different groups, depending on when the player triggered a certain UnityEvent (relative to other players).

    E.g:
    The first 500 users that started installing the game are assigned to group A, the next 500 to group B and all other users are assigned to group C.

    Now my question:
    Is it possible to query Unity.Analytics data at runtime on the users device to segment players according to live data?

    Many thanks in advance :)
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  3. Dennooo

    Dennooo

    Joined:
    May 12, 2015
    Posts:
    88
    Hi Jeff,
    thanks for your reply.

    I did check the A/B-Testing Section but it says:

    "A treatment is a set of one or more Remote Settings
    to which you assign unique values for each variant group. At runtime, the A/B testing service randomly assigns a player to one of the groups based on your variant allocation percentages."

    While this is the way to go for most controlled experiments, my experiment requires that I can assign players to a treatment based on when they triggered a specific event in the game relative to other players. Would that still be possible?
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    How are you checking the "when" and relative to other players in your game? Are you keeping a leaderboard or similar on a server? Just trying to understand your configuration before I make recommendations.
     
  5. Dennooo

    Dennooo

    Joined:
    May 12, 2015
    Posts:
    88
    I was hoping that I could utilize the UnityAnalytics data at runtime to get the current number of game installs and assign the players accordingly. But I don't think that is possible, so it seems that I have to run a list on a server to track the number of game installs by myself.

    I had hoped that I could skip that step by accessing the UnityAnalytics data.

    For the leaderboard I don't have plans of using anything else than dreamlo (yeah I know - dreamlo has severe limitations :) ).
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Unfortunately we do no provide a client Analytics API as you suggest.