Instrument your Unreal Engine project with Aptabase, an Open Source, Privacy-First and Simple Analytics for Mobile, Desktop and Web Apps.
Install the SDK via the Unreal Marketplace or clone this repository inside your Plugins
folder and compile it (requires C++ based project).
The first thing you will need to do is to enable the plugin in your project.
- Navigate to
Toolbar menu → Edit → Plugins
and open thePlugins
tab. - Search for
Aptabase
. - Enable the
Aptabase
plugin. - Press on the
Restart now
pop-up button or restart your project manually.
Inside the Config/DefaultEngine.ini
file add the following lines:
[Analytics]
ProviderModuleName=Aptabase
Note: If you already have a different Analytics provider, you will have to replace it with Aptabase
or use the Multicast Analytics Provider Plugin to run multiple in parallel.
First, you need to get your App Key
from Aptabase, you can find it in the Instructions
menu on the left side menu.
Then you have to set it inside Project Settings → Analytics → Aptabase
inside your App Key
field.
Based on the key, your Host
will be selected. In the case of self-hosted versions, you will get an input field to enter your custom URL.
Also, here you can adjust how often events will be sent to the backend.
Send Interval is used in Release Mode, while Debug Send Interval is used in Debug Mode. Both are measured in seconds.
Note: To simplify tracking events, I highly encourage using the Blueprint Analytics Plugin. This allows you to track events in a provider-agnostic way.
Aptabase supports all methods of analytics implementation. You can track your custom events using Record Event with Attributes
Or take advantage of the pre-existing more complex calls with nodes like Record Currency Purchase
.
The same applies to a C++ implementation. We suggest using FAnalytics
modules to keep implementation provider-agnostic.
Similar to blueprints you can track events using simple Record Event with Attributes
TArray<FAnalyticsEventAttribute> Attributes;
Attributes.Emplace(TEXT("PlayerHeight"), 1.75);
Attributes.Emplace(TEXT("PlayerName"), TEXT("John"));
Attributes.Emplace(TEXT("PlayerPower"), 9001);
FAnalytics::Get().GetDefaultConfiguredProvider()->RecordEvent(TEXT("Test"), Attributes);
or more complex calls like Record Currency Purchase
.
FAnalytics::Get().GetDefaultConfiguredProvider()->RecordCurrencyPurchase(TEXT("Soft"), 5000, TEXT("EUR"), 20.0, TEXT("Apple"));
A few important notes:
- The SDK will automatically enhance the event with some useful information, like the OS, the app version, and other things.
- You're in control of what gets sent to Aptabase. This SDK does not automatically track any events, you need to record events manually.
- Because of this, it's generally recommended to at least track an event at startup
- You do not need to await for the record event calls, they will run in the background.
- Only strings and numbers values are allowed on custom properties
When submitting your app to the Apple App Store, you'll need to fill out the App Privacy
form. You can find all the answers on our How to fill out the Apple App Privacy when using Aptabase guide.