Google Analytics Measurement Protocol 1.2.2
Google Analytics plugin for Unreal Engine, using a native cross-platform implementation of the Measurement Protocol.
Loading...
Searching...
No Matches
Getting Started with Google Universal Analytics

Getting Started with Google Universal Analytics

Here is a Quick Start guide on how to use the plugin with Google Universal Analytics.

Video tutorial: https://youtu.be/SlDt3ObbuKI

Setting up the plugin and using it is very easy: you must simply configure the plugin and set the Tracking ID of your Google Universal Analytics property.

Configuring the plugin

Thanks to the automatic instrumentation, your game will already log important events to Google Analytics! Including user sessions, maps loaded, operating system details, etc.

Plugin configuration

Here the detailed step-by-step guide to configure the plugin:

  1. from the Google Analytics website, get the Tracking ID of the Google Universal Analytics property you want to use to collect the logged data. If you don't have one, follow the official Google Analytics instructions to create one.
Get the TrackingID from the Google Analytics website
  1. enable the plugin (open the Edit > Plugins menu and search for the “Google Analytics Measurement Protocol” plugin) and restart the editor as requested by Unreal Engine.
  2. open the Project Settings and navigate to the Google Analytics MP section.
  3. if the plugin reports that the project is not configured, then press the Configure Now button. This will set the plugin as the default analytics provider for the project (for advanced configurations, please refer to the official Unreal Engine documentation).
Automatic configuration of the plugin
  1. for each project Build Configuration, set the Tracking ID you want to use. The plugin supports distinct Tracking IDs for different Build Configurations of Unreal Engine projects, to separate - for example - events recorded by development builds from events recorded by production builds. You can re-use the same Tracking ID with multiple Build Configurations. If the Tracking ID field is leaved empty, then the analytics will be disabled for that particular build configuration. This could be helpful for example for the PIE Configuration, used when Playing-In-Editor the game while developing it.
Configuring the plugin
  1. restart the editor in order to apply the new settings.

The plugin is now ready to be used to send data to your Google Analytics property.

For the best experience, we suggest to configure your Google Analytics property creating a Mobile App View, enabling the Ecommerce and the Enhanced Ecommerce features, enabling the User-ID feature. Please refer to the official Google Analytics documentation for its configuration and usage.

Automatic instrumentation

If you leaved the default automatic instrumentation enabled, simply playing the game now and stopping it a few seconds later will be enough to send some key events to the Google Analytics back-end (including users sessions, operating system details, maps loaded, etc.). The Google Analytics back-end could require few minutes to process the received data and show them in the Realtime reports.

Log custom events

You can then easily record custom events with the plugin API, look at UGoogleAnalyticsMPStatics for the complete list of available methods. For example this is how to record a simple event:

RecordStructuredEvent method

Google Universal Analytics events are based on Category/Action/Label/Value tuples, but you can log custom properties using Custom Dimensions and Metrics. Read more about them here:

Log purchases

The plugin provides dedicated APIs to track purchases in your game/application, this will allow you to take advantage of the Google Analytics E-commerce reporting system. This is an example on how to record a simple purchase in your game (applied prices and currencies should be retrieved from your payment processor):

RecordPurchase method

Plugin Settings

Under Project Settings > ... > Google Analytics MP, you can customize several settings of the plugin. Go over each setting with the mouse pointer to open a tooltip with the detailed description. Detailed documentation for each option can be found in the class UGoogleAnalyticsMPSettings.

Plugin settings

Event Attributes Filter

You can define a custom filter to freely manipulate every logged attribute. Read more in the section Event Attributes Filter for UA.