Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Session ID/custom user ID change at runtime?

Discussion in 'Unity Analytics' started by gfoxworthy, Sep 6, 2022.

  1. gfoxworthy

    gfoxworthy

    Joined:
    Nov 4, 2010
    Posts:
    24
    I'm working on a kiosk-based app with a custom login system. Users will sign in and play a session using a shared device. When they're finished, the app returns to its login screen and waits for the next user to log in.

    I'm interested in using Unity Analytics, but I need a way to reset the session and change user IDs each time a new user logs in/out. I've tried using Unity Authentication to switch profiles like Totumental on this thread (https://forum.unity.com/threads/setting-unity-services-analytics-custom-user-id.1230777/), but I'm not seeing the session or userID changes reflected in the events once they reach the Event Browser. They always show the first custom userID and session since I launched the app.

    I think this will keep me from benefiting from much of Unity Analytics' built-in processing and reporting, as none of the session/user data will reflect my users' actions correctly. Is there something I can do to fix this?

    Thanks!
     
  2. unity_Ctri

    unity_Ctri

    Unity Technologies

    Joined:
    Oct 20, 2020
    Posts:
    81
    Hey!

    I messed around with the SDK to see if that was possible, and unfortunately it isn't at present.
    One of our teams is working on a change that will add support for that in the future however!

    I don't have a timeline or expected version at the moment. The best we can suggest is that once a user finishes the game (or it times out), that it restart on the kiosk in question, after reseting the player preferences (where the user ID is stored between sessions).

    In the future this will be easier, but for now you can achieve this by clearing the stored user ID and then restarting the application.

    Hope that helps!
     
  3. mylastggeast

    mylastggeast

    Joined:
    Jun 14, 2021
    Posts:
    41
    @unity_Ctri
    Hello! Do you have any updates on the above feature? Is there an ETA?
     
    mertbsn likes this.