Search Unity

Set UserId In Editor

Discussion in 'Unity Analytics' started by wwcolter, Oct 24, 2017.

  1. wwcolter

    wwcolter

    Joined:
    Nov 4, 2016
    Posts:
    28
    Unity 2017.1.2f1

    When testing our funnels in the editor from a single machine, we are unable to get new users. We have tried:

    1. Deleting player prefs manually from the registry
    2. Deleting the local cache in AppData\LocalLow\AppName\
    3. Calling PlayerPrefs.DeleteAll();
    4. Calling Analytics.SetUserId(); both with silly ids like "abc123" and also
      System.Guid.NewGuid().ToString(); in case it has to be in UUID format.
    After doing each of the steps above (separately in different tests), we then send new analytics. Then we repeat the step (such as delete all player prefs) and send more analytics. After waiting 24 hours, we check the funnel again and it only shows a single user.

    We have exported the data using the raw data exporter and it all comes from the same userId.

    Anyone have experience with this? Jeff D. posted about deleting Player Prefs here but it doesn't seem to be working for us.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Unfortunately that won't work with Unity Analytics, we generate our own internal userid that we use for privacy reasons. To take advantage of your private userid, you would need access to Raw Data Export, a Pro license feature. A reinstall should generate a new Unity userid. Also, a very handy tool to see what is actually being sent is Charles Proxy, more information here:

    https://support.unity3d.com/hc/en-us/articles/115002917683
     
  3. wwcolter

    wwcolter

    Joined:
    Nov 4, 2016
    Posts:
    28
    Thanks Jeff.

    We are using Unity Pro and when we export the data using Raw Data Export we can't get it to show the userId we manually set. Is there a trick to getting Raw Data Export to show the custom userId?

    To clarify: there's no way to test multiple users for funnels on one editor machine without reinstalling Unity?
     
    Last edited: Oct 24, 2017
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I meant reinstalling the game on a device. For Raw Data Export, you would look in the UserInfo dataset.