unity analytics
Unity Analytics is the default analytics provider.
The Unity Analytics package is referenced through the Unity Package Manager. Custom event schemas and funnels must exist in the selected Unity Gaming Services environment before the game can send custom events.
Unity Analytics Schema Setup Wizard
Open:
HomeDesignMatch3Kit > Settings > Analytics Schema Setup
The wizard contains four steps:
Connect the Unity project
Select
Authorize Unity Editorand sign in with the buyer's Unity ID.Select
Link Projectand link the buyer's Unity Gaming Services project.Select
Select Environmentand choose the environment used by the game.Select
Refresh Status.
The Review Events button becomes available only when the Unity ID, organization, project, project ID, and environment are available.
Use a test environment during development and a production environment for the release build.
Populate Unity Analytics
Select:
The wizard uses the authenticated Unity Editor session to create or update:
analytics parameters;
custom event schemas;
event descriptions;
missing event parameters;
analytics funnels.
The operation is safe to run again. Existing definitions are reused, incomplete events are updated, and duplicates are not intentionally created.
The Unity ID must have permissions to manage events and funnels in the buyer's UGS project.
A 403 Forbidden response usually means that:
Analytics is not enabled for the project;
the Unity ID does not have permission to manage events;
the Unity ID does not have permission to manage funnels.
Unity Analytics IDs
No Unity Analytics IDs are hard-coded in the asset.
There are no Unity Analytics ID fields in GameSettings.
The wizard reads all required IDs from the Unity Editor and the active UGS environment.
Organization ID
Organization of the linked Unity Cloud project
No
Project ID
UGS project linked in Edit > Project Settings > Services
No
Environment ID
Active environment selected in Edit > Project Settings > Services > Environments
No
If the project or environment is changed, select Refresh Status before continuing.
The schemas are created only in the currently selected environment. They are not automatically created in every environment.
Are Unity Analytics events added manually?
No.
For the events listed below, the Populate Events button performs the Event Manager setup automatically.
It creates missing parameters, creates missing custom events, enables incomplete events, updates descriptions, adds missing parameters, and creates missing funnels.
Unity's standard adImpression event is handled separately. The wizard does not create a custom event named ad_impression.
At runtime, the kit maps ad_impression to Unity Analytics' standard ad impression event.
If the wizard cannot be used, select:
Then create the custom events and parameters manually in Unity Analytics Event Manager.
Funnels must be created manually if the wizard is not used.
Custom event schemas
Parameter names and types are case-sensitive.
gameplay_entered
level_number — INTEGER
level_started
level_number — INTEGER; attempt_number — INTEGER
level_completed
level_number — INTEGER; attempt_number — INTEGER; duration_sec — FLOAT; score — INTEGER; stars — INTEGER
level_failed
level_number — INTEGER; attempt_number — INTEGER; duration_sec — FLOAT; fail_reason — STRING
popup_opened
popup_id — STRING; level_number — INTEGER
popup_closed
popup_id — STRING; popup_result — STRING; duration_sec — FLOAT; level_number — INTEGER
ad_completed
ad_provider — STRING; placement_id — STRING; ad_type — STRING
ad_reward_granted
ad_provider — STRING; placement_id — STRING; ad_type — STRING
ad_show_failed
ad_provider — STRING; placement_id — STRING; ad_type — STRING
ad_clicked
ad_provider — STRING; placement_id — STRING; ad_type — STRING
iap_started
product_id — STRING
iap_completed
product_id — STRING
iap_failed
product_id — STRING; fail_reason — STRING
Automatically tracked events
AnalyticsEventTrackertracks gameplay entry.AnalyticsEventTrackertracks level start, completion, and failure.AnalyticsEventTrackertracks popup open and close events.AnalyticsEventTrackertracks IAP start, completion, and failure.AdsListenertracks ad impressions.AdsListenertracks ad completion, reward, failure, and click events.
Game code does not need to call a different API for each analytics provider.
All events are sent through the selected IAnalyticsService implementation.
Unity Analytics funnels
The wizard creates the following funnels:
HomeDesignMatch3Kit - Level Progression
level_completed with level_number 1 → 2 → 3 → 4 → 5
HomeDesignMatch3Kit - First Purchase
iap_started → iap_completed
HomeDesignMatch3Kit - Rewarded Ad
ad_completed → ad_reward_granted
Funnels are created in the selected environment and use a 30-day duration filter.
Official documentation
Last updated