Search Unity

Tracking a state

Discussion in 'Unity Analytics' started by peaj_metric, May 28, 2019.

  1. peaj_metric

    peaj_metric

    Joined:
    Sep 15, 2014
    Posts:
    146
    Hi,

    is it somehow possible to track a specific state or variable via Analytics?
    For example if I want to track the language set by the player:

    - I can send an event on game start for the automatically detected language
    - The user might change the language via settings
    - The user might change the language again later in the game

    Now I get 3 events for 3 different languages from one player, which might be even worse because the automatic language detection might skew the results.

    So is there any way to track a unique state / setting such as language so a player can only have one and it will be overwritten by any subsequent event?

    Thanks,
    Pascal
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I don't believe users would ever realistically change the device language setting in the middle of the game. Regardless, you could send a Custom Event, but there is not event notification that the user changed their locale. You might instead consider Country/Location instead of language. Unless you have a button in your game that allows the user to change language, you could send a custom event at that time. But the Dashboard would not expose this data, you would need Raw Data Export, a Pro-only license feature.
     
  3. peaj_metric

    peaj_metric

    Joined:
    Sep 15, 2014
    Posts:
    146
    Thx for your reply.
    I just used language as an example (and yes people might change it via Steam settings for example).

    Maybe a better example:
    We also have a setting for imperial vs metric units in our game.
    The default setting is metric.
    So we could send an event as soon as the player starts the game that he is using the metric system.
    If he changes to imperial in the settings menu we can send another event.
    Now the user will be tracked twice with two different values.

    So I would like to know weather its possible to handle an event like a "variable" which only ever contains the last sent event value.
    So in this case if the player starts the game with metric units and than switches to imperial he is only counted once as using imperial units

    I hope that explains it a little better.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  5. peaj_metric

    peaj_metric

    Joined:
    Sep 15, 2014
    Posts:
    146
    Ok thx I'll try the raw data export then. But it would still be a useful feature for the analytics dashboard