Analytics

How to integrate external analytics providers into your project

Overview

This guide will help you integrate an analytics solutions into your project, providing a self-serve way of collecting, extracting and evaluating user data.

We will be using Mixpanel as our example 3rd party analytics platform, but this approach should work for any analytics solution of your choice.

Mixpanel

Mixpanel has a number of useful features that makes it an attractive option for any projects looking to track how their users interact with the platform, from their first visit to the webpage through to in-game events. A data point is represented as an Event, which can contain a number of custom properties that you can define.

Each event is also associated with a unique User, allowing you to analyse an individual user's or similarly grouped users' behaviour in a number of powerful ways.

One particularly powerful feature of Mixpanel is the ability to compute Sessions automatically via a timeout-based method.

Follow the guide below to learn about how you can start sending events to your own Mixpanel project via your Unreal Project, and via your external webpage!

Setting Up Mixpanel Analytics

Creating a Mixpanel Project

To get started, create a mixpanel account, where you will be prompted to set up your organization and first project. You should be met with a page like this on successful creation:

Retrieving your Project Token

Before beginning implementation:

  1. Ensure you have your project token to hand. This will be used at various points for authentication when trying to send events to mixpanel (specifically for web-based track events). You can find this under project settings:

  1. Once retrieved, head to the import events page in mixpanel's docs. You should see section where you can paste your project token into the authorization.

  2. When pasted, this will generate an authorization header of the form Basic <base64-encoded string> . Copy the base64 encoded value of your project token after "Basic", as you will need this when setting headers in your Unreal project.

Sending your first events to Mixpanel

To learn about sending events via your web app, check out:

For sending events via your Unreal project in Blueprints, check out:

Viewing Data in Mixpanel

Events

Successfully sent events can be viewed immediately in the Events tab on Mixpanel. These will be sorted by time sent:

Users

You can also view users' profiles and their associated events here:

All users with a profile will be displayed by default. You can filter for users who don't have a user profile in the top left, under Users
Each user has an associated Activity Feed, listing all their events.

Last updated

Was this helpful?