Skip to main content
The Unreal SDK is an Unreal Engine 5 plugin in C++. It uses only engine modules (HTTP and Json). It is built and tested on macOS with Unreal Engine 5.8. The code for Windows, Linux, Android, and iOS is written, but those builds are not tested yet. It sends app events with your Publishable key, the same events as the Unity SDK and the Godot SDK.

Installation

The source is public on GitHub (MIT). The plugin is not on Fab yet.
  1. Download the latest release. Copy its Manalens folder into the Plugins/ folder of your project. Create Plugins/ if it does not exist.
  2. Open the project. The editor builds the plugin. A Blueprint-only project needs one C++ class first: use Tools > New C++ Class, then open the project again.
  3. Open Edit > Plugins and check that Manalens is enabled.
  4. Copy the Publishable key (mana_pk_) from Settings. The plugin refuses a Secret key or an API key.

Settings

Open Edit > Project Settings > Plugins > Manalens and set the Publishable key and the endpoint. The engine starts the SDK with the game instance, so there is no init call. At start, the SDK sends session_start and game_open with is_first_open and first_open_at. The settings are saved in Config/DefaultGame.ini:
If the key or the endpoint is wrong, the SDK logs why to LogManalens and stays off.

Track events

In Blueprint, use the Get ManalensSubsystem node, then Track. Track takes the event name and three maps: text, numbers, and true or false values. Leave a map empty when you do not need it. In C++, get the subsystem from the game instance:
Add "Manalens" to PublicDependencyModuleNames in the Build.cs file of your game module. To send a JSON object, use TrackJson(). Values are strings, numbers, booleans, or null. Other values are dropped with a warning. Use the event conventions. From any object with a world, UManalensSubsystem::Get(this) returns the subsystem. Call the SDK on the game thread. A Track or Track Error call from another thread runs on the game thread later.

Identify players

On sign-in, call Identify with your user ID to join this install’s history to the player. On sign out, call Reset.
To join the player on your website without sign-in, use Link URL. See identify users.

Open your website from the game

Use Link URL when the game opens your website. The website then joins this player, without Identify:
It adds mana_hid=<anonymous ID>.<unix seconds> to the URL. The website needs the Web SDK. The link works for 10 minutes. Before consent, the URL is unchanged.

Error tracking

In Blueprint, use Track Error and Make ManalensErrorOptions. The SDK also sends Error lines of the engine log (UE_LOG) as error events, with the log category as error_type. Shipping builds compile the log out, unless your target sets bUseLoggingInShipping. After a crash, the next launch sends app_unclean_exit. See Error tracking. Before the SDK queues a log line, it removes personal data:
  • Home folders, such as /Users/<name>, /home/<name>, and C:\Users\<name>, become ~.
  • URLs lose the user name and password, the query string, and the fragment.
  • Email addresses become [email].
  • Values after key=, token=, secret=, password=, Authorization:, and Bearer, and runs of 24 or more letters, digits, _, or -, become [redacted].
The fingerprint uses the cleaned text, so the same error on two computers is one group. The SDK never captures lines from LogOnline*, LogEOS*, LogSteamShared, LogSlate, LogHttp, or LogManalens. In the editor (Play In Editor), it also skips the categories of editor modules, because the editor logs in the same process as your game: LogBlueprint (the Blueprint compiler), LogEditor*, LogUnrealEd, LogShaderCompilers, LogDerivedDataCache, LogSourceControl, LogCook*, LogAutomation*, and other editor tools. Errors of your Blueprints at run time (LogScript, Print String) are still sent. A packaged game skips none of them. The text of a Track Error call is sent as you give it. The limits are the same as in the other SDKs: one fingerprint at most once a second, at most 20 errors in 10 seconds, and at most Max Auto Errors Per Session log errors in one session.

Editor runs

Play in Editor sends events like a live game, so you can watch your integration in Activity and Live View while you play. A packaged build and a -game run always send. To send nothing from the editor, turn off Enabled In Editor. Dev and live data go to the same project. Play in Editor runs send Editor Build (default dev) in place of Build, so you can filter them out. To tell other test builds apart, set Build (for example dev) and filter by it. Each developer machine counts as one player, and your game’s errors in Play in Editor appear in error tracking. The editor’s own errors are not sent (see Error tracking). Unsent events stay on disk (Saved/Manalens/) and go out at the next launch with that launch’s publishable key. If the key changes between launches (for example a dev key, then a release key), the queued events go to the new key’s project. They keep the Build they were sent with, so you can still filter them out.

Events

Both are Blueprint events on the subsystem. In C++, use OnSendFailed.AddDynamic().

Sessions

A session ends after 30 minutes without focus or events, and at 24 hours. Then the SDK sends session_end (duration_s) and starts a new one. After a crash with focus, the next launch ends the old session and sends app_unclean_exit. A mobile game that the OS closes in the background is not a crash. Focus loss and the move to the background save the state and send the queue. To put a server event (for example a purchase) in the player’s session, send Get Session Id and Get Anonymous Id to your backend.

Offline queue and retries

  • Events are saved in Saved/Manalens. They are sent every 10 seconds, at 20 events, on focus loss, and on quit.
  • Network errors, 5xx, 408, and 429 are retried with backoff (2, 4, 8 … seconds, at most 5 minutes). A Retry-After header asks for a longer wait, up to 1 hour. Other 4xx drop the batch and log the reason. A 202 can list refused events: the collector stored the others, and the SDK drops the refused ones, logs the reason codes, and raises On Send Failed with their count.
  • Events older than 7 days are dropped.
  • A retry never counts twice, because each event keeps its message_id.

Quit

When the game instance shuts down, the SDK sends session_end and waits at most Quit Timeout Seconds for the last send. Unsent events stay on disk for the next launch. Turn on Consent Required. Then, from your consent screen:
The SDK saves the choice for the next launch. An Identify before consent is sent after consent. An opt-out fails closed: Set Consent (false) writes a marker file (Saved/Manalens/manalens_optout), and the SDK stays off while it exists. If the saved state cannot be read, the SDK stays off until Set Consent (true).

Data the SDK sends

Each event carries anonymous_id (a random UUID kept in Saved/Manalens), session_id, user_id after Identify, context.locale, context.utc_offset, and context.app:
  • platform: windows, macos, linux, android, ios, or other (consoles, tvOS, visionOS).
  • engine: unreal.
  • app_version, build, and storefront.
No device ID, no hardware details, no IP. Manalens gets the country from the request IP and does not store it.

Test locally

From the repository, build the plugin with the engine and run its automation tests headless:
The script runs RunUAT BuildPlugin, copies the plugin into sdks/unreal/HostProject, and runs Automation RunTests Manalens.

FAQ

Yes. Every call is a Blueprint node on the Manalens subsystem. The project needs one C++ class so that the editor can build the plugin.
Dev and live data go to the same project. Set Build (for example dev) for those runs and filter by it. See Editor runs.
Events wait on disk and are sent later. See offline queue and retries.
No. The SDK stays off on a dedicated server, because a server is not a player. Send server events from your backend instead.