- Home /
Question by
jmahadevan · Feb 13, 2017 at 12:09 PM ·
unity5apiid
How to get Unity Analytics unique user ID?
So far, I understand that Unity Analytics creates a new unique user ID every time my app is downloaded.
There is a SetUserID function in the Analytics API:
https://docs.unity3d.com/ScriptReference/Analytics.Analytics.html
However, how do I get the unique user ID that Unity has generated? There is no corresponding GetUserID function.
Comment
Answer by anileapen05 · Nov 13, 2019 at 04:02 AM
AnalyticsSessionInfo.userId - UserId is random GUID to track a player and is persisted across game session
On the other hand use for unique install Social.localUser.id;