Get started with Analytics

To get started, you need to:

  • Sign up for UGS.
  • Link your dashboard project to a Unity Editor project.
  • Initialize UGS in your game code.
  • See billing information.

Sign up for UGS

If you don't have a Unity account, refer to Unity organizations and Get started with UGS to sign up for Unity Gaming Services.

Important: Only Organization Owners can sign up for Analytics.

  1. Sign in to the Unity Cloud Dashboard.
  2. Select Sign Up in the top banner and follow the instructions.

Set up Analytics

To set up and manage Analytics from the Unity Cloud Dashboard:

  1. Go to cloud.unity.com.
  2. Select + under Shortcuts in the left panel.
  3. Search for Analytics and select to pin to the left.
  4. Select to open Analytics.

When you launch Analytics for the first time, this adds Analytics to the Shortcuts section on the sidebar and opens the Game Performance page.

To link your local project build to your Unity Cloud Project in the Unity Editor:

  1. Go to Edit > Project Settings > Services.
  2. Log in with your existing credentials.
  3. Select your project from the drop-down list and select Link project ID.

Note: The Services > Analytics settings page relates to Unity Legacy Analytics, not the new Gaming Services Analytics. You don't need to enable the Analytics settings on that page.

SDK installation

To install the latest Analytics package for Unity, use the latest version of the Unity Editor and follow these steps:

  1. In the Unity Editor, open Window > Package Manager.
  2. In the Package Manager, select the Unity Registry list view.
  3. Search for Analytics, or locate the Analytics package in the list.
  4. Select the package, then select Install.

Refer to the Package Manager documentation for more information.

SDK setup

Even though it has been installed, the SDK must still be started manually before it will begin collecting data.

First, call the UnityServices.InitializeAsync() function at the start of your game to initialize the Analytics SDK and any other UGS SDKs that you have installled.

As the game developer, you are responsible for the player's privacy. Data won't be collected unless you inform the SDK that the player has consented to the use of analytics.

Note: For more information about managing privacy and obtaining player consent, refer to the Privacy overview.

Once you confirm you have player consent, call AnalyticsService.Instance.StartDataCollection() to enable data collection.

You can change the player's consent status at any time using the following methods:

  • If a player wants to opt out, call the StopDataCollection() method.
  • If a player wants to delete their data, call the RequestDataDeletion() method.
  • If a player wants to opt in (again), call the StartDataCollection() method.

After you enable data collection, the SDK begins collecting events and uploading them at a regular cadence while your game is running.

The SDK records some events automatically, so that you can go straight to Analytics in the Unity Cloud Dashboard to start analyzing your data.

Now that the SDK is up and running, see our tutorials for building and recording your own events:

To learn about what the SDK does behind the scenes, refer to SDK behaviour.

Important: Note that StartDataCollection() must be called at the start of each session to enable data collection. The SDK won't remember the player's consent status.

Billing information

Analytics is free to get started and provides a free tier for up to 50,000 monthly active users (MAU). Above this free tier, you must upgrade your plan for UGS as a whole to continue using Analytics. For more information, refer to our billing page.