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 New to Unity Analytics, some questions

Discussion in 'Unity Analytics' started by JoeySpringlab, Jul 15, 2022.

  1. JoeySpringlab

    JoeySpringlab

    Joined:
    May 5, 2021
    Posts:
    37
    Hey all,

    We have just started implementing Analytics and decided to go with the (new) Unity Analytics. It's been going alright so far, but a few questions have popped up:

    • We are making an EdTech application that consists of smaller games the user can play. The user is tied to an organization (generally a school) and we want to track analytics tied to users/organizations just to name an example. So essentially we have some metadata tied to various other data we want to track. So as an example we would have a structure like this:
      • User
        • Name
        • Organization
      • Organization
        • Name
        • Type
        • License
        • Parent Organization
    This is data that keeps returning to most (if not all) our custom events and for every new event, I need to re-add every single parameter to the event. (the above are just 2 examples, we have more) and it would be lovely if we could create groups of parameters we can add to custom events. I guess this is more of a feature request. :)
    • I am also a bit confused about the SQL Data Explorer. It's not very clear if this is in beta at the moment? I don't have this option in the Dashboard and it is actually one of the reasons we decided to go with Unity Analytics. Is it part of the Custom Dashboards or is it a separate feature?
    • I noticed we can set a custom UserID, which would be really helpful to us, as we would be able to set the userID to a specific organization or user. However, a user/organization can log in on multiple devices which we still want to be able to distinguish between. Is there an (out of the box) way to still have that? Or would we need to add another parameter ourselves (like DeviceID I think Unity provides)?

    Thanks in advance!
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    As long as you don't publish this on the stores, you should be fine. Otherwise, you are collecting personal information that the stores will likely not allow. They may, if you provide a full disclosure during publishing. You are welcome to place any string in the UserID field, it's up to you how to do that. I don't believe you'll want to use DeviceID. Why do you need to know what type of device they are on? Don't you only need to know who they are? When you say "distinguish between them", what is the "them". UGS Analytics is no longer in beta and SQL Data Explorer is available for all customers. You do need to set your payment method to gain access to the service. Note there is no "SDK Download", the docs need updating. You install the "Analytics" package via Package Manager (not "Analytics Library", that is legacy Analytics)
     
  3. JoeySpringlab

    JoeySpringlab

    Joined:
    May 5, 2021
    Posts:
    37
    Thanks Jeff,

    The app is/will be on the stores and disclosure is given on the store. Also we don't really track personal data, I mentioned name of the user, but that is actually not something we sent (or want to) to our Analytics.

    So lets say (and keep it to schools) a school called "Unity College" is going to start using our app at their school. They buy a license and they get login credentials to get access to the games in our app (only a single login is needed, you can use it across multiple devices without limit). But Unity College has 500 students, each with their own (school provided) tablet. Now let's say I want to set Unity College as the UserID as I am interested in how they use their app, but I am also interested in how many devices are being used at a given point.

    From what I read, the generated UserID is unique for every device, if I override that with my own ID, wouldn't all that data be consolidated into just that one user?

    Also, I have added payment information, but it's not showing.
    upload_2022-7-15_16-13-49.png
     
  4. JoeySpringlab

    JoeySpringlab

    Joined:
    May 5, 2021
    Posts:
    37
    Just an FYI: I was looking at the "Set up Analytics" steps, which has a link to the SQL Data Explorer. The direct link works for me, but the link is not showing up in the sidebar for me.
     
  5. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Have you set your Payment Method yet? The links won't be available until you do. Please share a screenshot of what you are referring to. You can set a custom userID if you choose https://docs.unity.com/analytics/CustomUserIDSupport.html And what license are you referring to, a license for your app? Users of your game do not need a Unity Editor license if they are only using your app.
     
  6. JoeySpringlab

    JoeySpringlab

    Joined:
    May 5, 2021
    Posts:
    37
    Payment method is set.
    upload_2022-7-15_16-34-18.png

    Ok.. So, a school can buy a license to our app that grants them access to the games within our app. I am interested in the usage of a specific school, so I could set the school name as the UserID through
    options.SetAnalyticsUserId("Schoolname");
    and use that to analyze data specifically for that school. However, a school will likely use more than a single tablet as multiple students can play simultaneously.

    if I don't set the UserID to the school name, Unity generates a unique ID that is persistent to that device (or so I read somewhere).

    For simplicity sake, let's say a school has 5 devices with the IDs 1, 2, 3, 4 and 5

    If I do not set the UserID to the school name, I would see that 1, 2, 3, 4 and 5 have started the app and also know that 5 tablets have been used.

    if do set the UserID to the school name, I would see that "school name" has started the app, how would I now know how many devices that actually were?
     
  7. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    That is up to you. Perhaps add an additional identifier to the userID, school name + playerID
     
  8. JoeySpringlab

    JoeySpringlab

    Joined:
    May 5, 2021
    Posts:
    37
    That makes sense, just wondering though: if I would set the UserID to a single static value and 10 devices would start playing for the first time, would I still see 10 daily new users or just a single one, because I have set it to this static UserID?

    If I do see the 10 new users, how does the dashboard differentiate between them if it is not the UserID?

    One more additional question regarding this:
    To set the UserID, I need to pass it as an option when I initialize the analytics. In our app, the login part is "optional" and not part of the "startup" process so to say. So initially I would initialize analytics with something as "Free User" as the UserID, but at the moment when the user logs in and I know the school name, I would like to change it to "School Name"

    I tried this and initialized analytics 2 times (free user and after that with another name) and didn't get any errors or warnings, but is this the way to do it? Can it cause any unwanted behaviour?
     
  9. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Perhaps you could add the deviceID to the userID identifier to keep the devices separate. Or just pass in the deviceID as a parameter, you could query on this field later via SQL. How is the user logging in? Where are you storing the login information, what login service are you using? How are you setting the school name, are you asking the user to type it in? How would you set the same ID across the 10 devices, how are you coordinating that? I might suggest a closed test with 2-3 devices to confirm your requirements, and check that the dashboard reports are working as expected. Right now you can't change the userID after initialization, you need to initialize again. We are looking into providing this feature.
     
  10. JoeySpringlab

    JoeySpringlab

    Joined:
    May 5, 2021
    Posts:
    37
    I was just curious if the UserID is the only paramater used to uniquely identify all the incoming events or if something else is (or perhaps a combination of parameters). So if I would use a single (custom) UserID in my app, would I only ever get that single ID reported in the dashboard as, for example, a new user.

    So for example, I would publish my app and initialize analytics with
    options.SetAnalyticsUserId("Springloop");
    and 10 new devices would start playing. Do I now see 10 new users in the User Acquisition dashboard or just a single one?

    All our (user) data is stored on a backend that is hosted online. We use Backendless, not something from UGS.

    Anyway, as for the flow of the app in a nutshell:
    • The user starts the app
    • We check if we can (re) log in the user again.
      • Logged in? Set the UserID to be the schoolname of that user for example
      • Not logged in? Set the UserID to be "Free User" or something similar for example
    • After initialization, we get to the home screen where you select the game you want to play
      • Logged in user see the games available according to their license/subscription as playable
      • Non logged in user see the 3 free games available as playable
    • From the homescreen, the user can navigate to the login screen
      • User can log in with username and password here
        • Assuming successful, we could (re)initialize analytics with the schoolname as the UserID again.
    And I was just wondering if that re-initializing of analytics is the (current) correct way of doing it and that it would not do something strange.
     
  11. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    If you send the same userID, we would only count one user. But you could create a SQL query on the deviceID parameter to differentiate and create a count for the separate devices. So you don't need a large userID, just the various event parameters that you can then query on via SQL. How are you setting "SpringLoop" as the UserID on those 10 devices only?
     
  12. JoeySpringlab

    JoeySpringlab

    Joined:
    May 5, 2021
    Posts:
    37
    I am simply wondering (because I am new to UGS Analytics) if setting our own UserID would be the way to go, or if I am simply better off just adding it as a parameter. And at this point, I feel that simply adding a parameter with the school name would be a better way to go as to not mess with the standard dashboards.

    I'm not speculating anything. Again, as mentioned in my previous post, I am using Backendless as a backend solution where we store all data we require and also handles user authentication. When a user successfully logs in, I get all the relevant data I want/need about that user.
     
    JeffDUnity3D likes this.