Skip to content

Unreal Engine SDK for Aptabase: Open Source, Privacy-First and Simple Analytics for Mobile, Desktop and Web Apps

License

Notifications You must be signed in to change notification settings

outoftheboxplugins/aptabase-unreal

 
 

Repository files navigation

Aptabase

Unreal Engine SDK for Aptabase

Instrument your Unreal Engine project with Aptabase, an Open Source, Privacy-First and Simple Analytics for Mobile, Desktop and Web Apps.

Install

Install the SDK via the Unreal Marketplace or clone this repository inside your Plugins folder and compile it (requires C++ based project).

Enabling

The first thing you will need to do is to enable the plugin in your project.

  1. Navigate to Toolbar menu → Edit → Plugins and open the Plugins tab.
  2. Search for Aptabase.
  3. Enable the Aptabase plugin.
  4. Press on the Restart now pop-up button or restart your project manually.

Provider setup

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.

Project settings

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.

Project Settings

Usage

Blueprints

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

Event with Attirbutes

Or take advantage of the pre-existing more complex calls with nodes like Record Currency Purchase.

Event currency

C++

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:

  1. The SDK will automatically enhance the event with some useful information, like the OS, the app version, and other things.
  2. 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
  3. You do not need to await for the record event calls, they will run in the background.
  4. Only strings and numbers values are allowed on custom properties

Preparing for Submission to Apple App Store

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.

About

Unreal Engine SDK for Aptabase: Open Source, Privacy-First and Simple Analytics for Mobile, Desktop and Web Apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 94.7%
  • C 3.3%
  • C# 2.0%