Is there a Manalens SDK or plugin for Unreal?
No. There are SDKs for Godot, Unity, the web and Node.js, and none for Unreal. There is also no Blueprint node set and no analytics provider module. The collector accepts Unreal events, and the reports have an unreal value for the engine field, but you write the sending code.
There are two honest routes. From the game client, send events over HTTP with Unreal's HTTP module and the Publishable key. From a dedicated server, you can use the Node.js SDK in server mode with the Secret key, if your server stack runs Node.js. This guide covers both.
| Engine | SDK | How to send events |
|---|---|---|
| Godot 4 | Yes | The addon, in GDScript |
| Unity | Yes | The Unity Package Manager package, in C# |
| Unreal Engine | No | HTTP from C++, as in this guide |
| Unreal Engine, Blueprint only | No | Not yet. Expose your own C++ subsystem to Blueprint. |
Sources: Manalens app events and Node.js SDK documentation.
What does Unreal offer for analytics out of the box?
An interface, not a backend. Epic's documentation says that Unreal Engine provides an abstract interface for communicating with one or more analytics providers: your game uses the interface, and analytics providers offer a backing implementation. The page lists a File Logging provider, which you can use to debug your analytics process during development, a Flurry provider and a Multicast provider. A Blueprint Analytics plugin adds Blueprint nodes for communicating with analytics services.
In C++, a provider is a module that implements IAnalyticsProviderModule, which Epic describes as the generic interface for an analytics provider. Epic says that it is feasible to add your own provider. You could write one that wraps the HTTP calls below. That is more work than a direct call, and Manalens does not supply one.
Sources: Unreal Engine documentation, In-Game Analytics and IAnalyticsProviderModule.
Which HTTP calls does an Unreal game make?
One call for almost everything: POST /v0/events. A game client sends track events and identify events to it with the Publishable key. A dedicated server sends server events to the same path with the Secret key. The table lists each call. There is no call to start a session: a session is the session_id that you put on each event.
A good request returns the status 202 with the body {"accepted":N}, where N is the number of events.
| Call | Method and path | Auth header | Body | Limits |
|---|---|---|---|---|
| Send game events from the client | POST /v0/events | x-publishable-key | {"events": [...]}, each one with type track, channel app and context.app | 1 to 50 events in a request. An event can be up to 7 days old. |
| Identify a signed-in player from the client | POST /v0/events | x-publishable-key | An event with type identify, a user_id and traits, and no event name | user_id up to 255 characters |
| Send events from a dedicated server | POST /v0/events | Authorization: Bearer with the Secret key | {"events": [...]}, each one with channel server and a user_id, an anonymous_id, or both | 1 to 100 events and at most 256 KB in a request |
Sources: Manalens events API and app events documentation.
What does one event look like?
Each event is a track event with channel app and a context.app object. Set engine to unreal, platform to windows, macos or linux, and storefront to steam, epic or another store. The collector rejects unknown fields, so send only the fields below.
message_id and anonymous_id must be UUIDs in the RFC 4122 form. session_id is a string of up to 64 letters, digits and the characters _ . : and -. Every event needs one, and it must not be the anonymous_id. original_timestamp is an ISO 8601 time in UTC.
HTTP
POST https://YOUR_COLLECTOR_ENDPOINT/v0/events
x-publishable-key: YOUR_PUBLISHABLE_KEY
Content-Type: application/json
{
"events": [{
"type": "track",
"event": "level_complete",
"channel": "app",
"version": "0.1.0",
"message_id": "6a0f8e9c-2c36-4c55-9a43-6a5d0f3c2b11",
"anonymous_id": "3f0c5c1e-8a8e-4c1b-9d7e-2b1f4e6a9c10",
"session_id": "1762689600000",
"original_timestamp": "2026-11-09T10:00:00.000Z",
"context": {
"app": { "platform": "windows", "storefront": "steam", "app_version": "1.4.0", "build": "571", "engine": "unreal" },
"locale": "en",
"library_name": "my-game",
"library_version": "1.4.0"
},
"properties": { "level": 3, "score": 1200 }
}]
}
HTTP/1.1 202 Accepted
{"accepted":1}Sources: Manalens app events and events API documentation.
How do I send events from C++?
Use a game instance subsystem. Epic's documentation says that Unreal creates a UGameInstanceSubsystem after the game instance, calls Initialize() when the game instance initializes, and calls Deinitialize() when it shuts down. So the subsystem lives for the whole run, and gameplay code gets it with GetSubsystem().
The header and the source file below are a complete subsystem. It saves the anonymous ID, starts and ends sessions, sends game_open, batches events, and keeps a batch after a network error or a 5xx, 408 or 429 response. FHttpModule::Get().CreateRequest() makes the request. SetURL(), SetVerb(), SetHeader(), SetContentAsString(), ProcessRequest() and OnProcessRequestComplete() are IHttpRequest functions in Epic's API reference.
We checked each engine call against the Unreal Engine 5.7 API reference, and the request against the collector contract. We did not compile it in each engine version, so build it in your project and test it before you ship. It does not save the queue to disk and does not wait for the last request at quit. The next section lists these limits.
- Add "HTTP" and "Json" to PrivateDependencyModuleNames in the Build.cs file of your game module.
- Add AnalyticsSubsystem.h and AnalyticsSubsystem.cpp to the module. Set the endpoint, the key, the version and the build.
- Call Track() from gameplay code, as in the last lines of the example.
- Call Flush() on a timer, for example every 10 seconds, so that a small queue does not wait.
- Run a packaged build and check the events in the activity feed. Filter by engine unreal.
C++
// AnalyticsSubsystem.h
#pragma once
#include "CoreMinimal.h"
#include "Subsystems/GameInstanceSubsystem.h"
#include "Interfaces/IHttpRequest.h"
#include "Dom/JsonObject.h"
#include "AnalyticsSubsystem.generated.h"
UCLASS()
class UAnalyticsSubsystem : public UGameInstanceSubsystem
{
GENERATED_BODY()
public:
virtual void Initialize(FSubsystemCollectionBase& Collection) override;
virtual void Deinitialize() override;
// Queue one event. Props can be null.
void Track(const FString& Event, TSharedPtr<FJsonObject> Props = nullptr);
// Send up to 50 queued events.
UFUNCTION(BlueprintCallable, Category = "Analytics")
void Flush();
private:
void StartSession(const FDateTime& Time);
void EndSession();
void Enqueue(const FString& Event, TSharedPtr<FJsonObject> Props, const FDateTime& Time);
void OnSent(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bConnectedSuccessfully);
bool bEnabled = true;
FString AnonymousId;
FString SessionId;
FDateTime SessionStart;
FDateTime LastActivity;
TArray<TSharedPtr<FJsonValue>> Queue;
TArray<TSharedPtr<FJsonValue>> InFlight;
};
// AnalyticsSubsystem.cpp
#include "AnalyticsSubsystem.h"
#include "HttpModule.h"
#include "Interfaces/IHttpResponse.h"
#include "Serialization/JsonSerializer.h"
#include "Serialization/JsonWriter.h"
#include "Misc/DateTime.h"
#include "Misc/FileHelper.h"
#include "Misc/Guid.h"
#include "Misc/Paths.h"
namespace
{
const FString Endpoint = TEXT("https://YOUR_COLLECTOR_ENDPOINT/v0/events");
const FString PublishableKey = TEXT("YOUR_PUBLISHABLE_KEY"); // never the Secret key
const FString AppVersion = TEXT("1.4.0");
const FString Build = TEXT("571");
const FString Storefront = TEXT("steam");
#if PLATFORM_WINDOWS
const FString Platform = TEXT("windows");
#elif PLATFORM_MAC
const FString Platform = TEXT("macos");
#elif PLATFORM_LINUX
const FString Platform = TEXT("linux");
#else
const FString Platform = TEXT("other");
#endif
// The collector accepts only RFC 4122 UUIDs. Set the version digit (4) and the variant digit.
FString NewUuid()
{
FString Id = FGuid::NewGuid().ToString(EGuidFormats::DigitsWithHyphensLower);
Id[14] = TEXT('4');
Id[19] = TEXT('a');
return Id;
}
int64 SecondsBetween(const FDateTime& From, const FDateTime& To)
{
return To.ToUnixTimestamp() - From.ToUnixTimestamp();
}
}
void UAnalyticsSubsystem::Initialize(FSubsystemCollectionBase& Collection)
{
Super::Initialize(Collection);
#if WITH_EDITOR
bEnabled = false; // send nothing from the editor
#endif
if (!bEnabled) return;
// One anonymous_id for each install, saved in the Saved folder.
const FString IdFile = FPaths::Combine(FPaths::ProjectSavedDir(), TEXT("analytics_id.txt"));
const FString FirstOpenFile = FPaths::Combine(FPaths::ProjectSavedDir(), TEXT("analytics_first_open.txt"));
const FDateTime Time = FDateTime::UtcNow();
FString FirstOpenAt;
const bool bFirstOpen = !FFileHelper::LoadFileToString(AnonymousId, *IdFile) || AnonymousId.Len() != 36;
if (bFirstOpen)
{
AnonymousId = NewUuid();
FFileHelper::SaveStringToFile(AnonymousId, *IdFile);
}
if (bFirstOpen || !FFileHelper::LoadFileToString(FirstOpenAt, *FirstOpenFile))
{
FirstOpenAt = Time.ToIso8601();
FFileHelper::SaveStringToFile(FirstOpenAt, *FirstOpenFile);
}
StartSession(Time);
TSharedPtr<FJsonObject> Open = MakeShared<FJsonObject>();
Open->SetBoolField(TEXT("is_first_open"), bFirstOpen);
Open->SetStringField(TEXT("first_open_at"), FirstOpenAt);
Enqueue(TEXT("game_open"), Open, Time);
Flush();
}
void UAnalyticsSubsystem::Deinitialize()
{
if (bEnabled)
{
EndSession();
Flush();
}
Super::Deinitialize();
}
void UAnalyticsSubsystem::StartSession(const FDateTime& Time)
{
SessionId = NewUuid(); // a new ID for each session, never the anonymous_id
SessionStart = Time;
LastActivity = Time;
Enqueue(TEXT("session_start"), nullptr, Time);
}
void UAnalyticsSubsystem::EndSession()
{
// The session ends at its last activity, in its own session_id.
TSharedPtr<FJsonObject> Props = MakeShared<FJsonObject>();
Props->SetNumberField(TEXT("duration_s"), static_cast<double>(SecondsBetween(SessionStart, LastActivity)));
Enqueue(TEXT("session_end"), Props, LastActivity);
}
void UAnalyticsSubsystem::Track(const FString& Event, TSharedPtr<FJsonObject> Props)
{
if (!bEnabled) return;
const FDateTime Time = FDateTime::UtcNow();
// A new session after 30 minutes without events, and when the session is 24 hours old.
if (SecondsBetween(LastActivity, Time) > 30 * 60 || SecondsBetween(SessionStart, Time) > 24 * 60 * 60)
{
EndSession();
StartSession(Time);
}
LastActivity = Time;
Enqueue(Event, Props, Time);
if (Queue.Num() >= 20) Flush();
}
void UAnalyticsSubsystem::Enqueue(const FString& Event, TSharedPtr<FJsonObject> Props, const FDateTime& Time)
{
TSharedPtr<FJsonObject> App = MakeShared<FJsonObject>();
App->SetStringField(TEXT("platform"), Platform);
App->SetStringField(TEXT("storefront"), Storefront);
App->SetStringField(TEXT("app_version"), AppVersion);
App->SetStringField(TEXT("build"), Build);
App->SetStringField(TEXT("engine"), TEXT("unreal"));
TSharedPtr<FJsonObject> Context = MakeShared<FJsonObject>();
Context->SetObjectField(TEXT("app"), App);
if (!Props.IsValid()) Props = MakeShared<FJsonObject>();
TSharedPtr<FJsonObject> E = MakeShared<FJsonObject>();
E->SetStringField(TEXT("type"), TEXT("track"));
E->SetStringField(TEXT("event"), Event);
E->SetStringField(TEXT("channel"), TEXT("app"));
E->SetStringField(TEXT("version"), TEXT("0.1.0"));
E->SetStringField(TEXT("message_id"), NewUuid()); // the collector counts each message_id once
E->SetStringField(TEXT("anonymous_id"), AnonymousId);
E->SetStringField(TEXT("session_id"), SessionId);
E->SetStringField(TEXT("original_timestamp"), Time.ToIso8601());
E->SetObjectField(TEXT("context"), Context);
E->SetObjectField(TEXT("properties"), Props);
Queue.Add(MakeShared<FJsonValueObject>(E));
}
void UAnalyticsSubsystem::Flush()
{
if (!bEnabled || Queue.Num() == 0 || InFlight.Num() > 0) return; // one request at a time
const int32 Count = FMath::Min(Queue.Num(), 50); // the collector takes 1 to 50 events
for (int32 Index = 0; Index < Count; ++Index) InFlight.Add(Queue[Index]);
Queue.RemoveAt(0, Count);
TSharedRef<FJsonObject> Body = MakeShared<FJsonObject>();
Body->SetArrayField(TEXT("events"), InFlight);
FString Json;
FJsonSerializer::Serialize(Body, TJsonWriterFactory<>::Create(&Json));
TSharedRef<IHttpRequest, ESPMode::ThreadSafe> Request = FHttpModule::Get().CreateRequest();
Request->SetURL(Endpoint);
Request->SetVerb(TEXT("POST"));
Request->SetHeader(TEXT("Content-Type"), TEXT("application/json"));
Request->SetHeader(TEXT("x-publishable-key"), PublishableKey);
Request->SetContentAsString(Json);
Request->OnProcessRequestComplete().BindUObject(this, &UAnalyticsSubsystem::OnSent);
Request->ProcessRequest();
}
void UAnalyticsSubsystem::OnSent(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bConnectedSuccessfully)
{
const int32 Status = (bConnectedSuccessfully && Response.IsValid()) ? Response->GetResponseCode() : 0;
// Keep the batch after a network error or a 5xx, 408 or 429 response. The next Flush() sends it
// again with the same message_id values. 202 is a success. Another 4xx is a refusal: drop the batch.
if (Status == 0 || Status >= 500 || Status == 408 || Status == 429) Queue.Insert(InFlight, 0);
InFlight.Reset();
}
// From gameplay code, for example in an actor:
// if (UAnalyticsSubsystem* Analytics = GetGameInstance()->GetSubsystem<UAnalyticsSubsystem>())
// {
// TSharedPtr<FJsonObject> Props = MakeShared<FJsonObject>();
// Props->SetNumberField(TEXT("level"), 3);
// Props->SetNumberField(TEXT("attempt"), 1);
// Analytics->Track(TEXT("level_start"), Props);
// }Sources: Unreal Engine documentation, Programming Subsystems; Unreal Engine 5.7 API, FHttpModule, IHttpRequest, IHttpResponse, FJsonObject, FGuid, FDateTime and FFileHelper; Manalens app events documentation.
What must my code do that an SDK would do for me?
The Godot and Unity SDKs handle the items below. The example above does the first five. The last four are yours to add, or the reports count wrong in those cases.
- Done: one anonymous_id for each install, saved on disk and loaded on every launch. A new ID on each launch makes every session a new player.
- Done: game_open on each launch, with is_first_open true only the first time. Install counts and D1, D7 and D30 retention start from it.
- Done: a new session_id after 30 minutes without events and when the session is 24 hours old, with session_start, and session_end with duration_s in seconds.
- Done: a new message_id for each event, kept on a retry. The collector counts each message_id once.
- Done: at most 50 events in a request, and a retry only after a network error or a 5xx, 408 or 429 response.
- To add: valid UUIDs on every platform. Epic's reference says only that FGuid::NewGuid() returns a new GUID, so the example sets the version and variant digits. Check one ID from each platform you ship.
- To add: a check of the time format. FDateTime::ToIso8601() returns an ISO 8601 string and assumes UTC. The collector needs a UTC time that ends in Z. If it answers 400 for original_timestamp, log the string.
- To add: a queue on disk. Save unsent events at quit, load them at the next launch, and drop events older than 7 days, because one old event refuses the whole batch with 400.
- To add: a wait at quit, a consent switch and a wait of Retry-After seconds after a 429. The request in Deinitialize() can be lost when the process exits.
Sources: Manalens app events, events API, Godot SDK and Unity SDK documentation; Unreal Engine 5.7 API, FGuid and FDateTime.
What does each response mean?
Read the status code in OnProcessRequestComplete(). IHttpResponse::GetResponseCode() gives it. The table shows what the client must do for each one.
| Status | Meaning | What the client does |
|---|---|---|
| 202 | Accepted. The body is {"accepted":N}. | Remove the batch from the queue. |
| 400 INVALID_EVENT | A field is not valid, an event is older than 7 days, or an event breaks the session ID contract. No event of the batch was accepted. | Drop the batch and fix the code. The same batch is refused again. |
| 401 UNAUTHORIZED | The Publishable key is missing or not valid, or a Secret key or API key is in x-publishable-key. | Drop the batch and fix the key. |
| 403 | FORBIDDEN: the request has an Origin header that does not match the project. WORKSPACE_SUSPENDED: the workspace does not accept events. | Drop the batch. A native Unreal build sends no Origin header. |
| 429 RATE_LIMITED | The project sent too many events this minute. | Keep the batch. Send it again after the Retry-After header. |
| 408, 5xx or no response | A timeout, a server error or no network. | Keep the batch and wait longer before each retry. |
Sources: Manalens events API and errors documentation; Unreal Engine 5.7 API, IHttpResponse.
When should I use the Node.js SDK instead?
Use it on a dedicated game server or a backend that runs Node.js, not in the client. In server mode it uses the Secret key, sends up to 100 events in a batch, and retries failed requests. Each server event needs a userId, an anonymousId, or both. Pass the anonymous ID that your client created, so the server events join the same player.
Use it for events the server knows best: match results, purchase checks and anti-cheat flags. The package is not on npm yet. During early access, it is available on request. It needs Node.js 20.3 or newer and has no dependencies.
TypeScript
import { Manalens } from '@manalens/node';
const analytics = new Manalens(process.env.MANALENS_SECRET_KEY!, {
endpoint: 'https://YOUR_COLLECTOR_ENDPOINT',
app: { platform: 'linux', storefront: 'steam', engine: 'unreal' },
});
analytics.track({ event: 'match_end', anonymousId: playerAnonymousId, properties: { mode: 'duel', won: true } });Sources: Manalens Node.js SDK and server events documentation.
How do I check that events arrive?
Send one event with curl first, using the JSON above. A good request returns 202 and {"accepted":1}. Then run a packaged build, not only Play in Editor, and open the activity feed. The event detail shows platform, storefront, app version, build and engine.
Keep editor sessions out of real data. The example sends nothing when WITH_EDITOR is set. To test from the editor, use a separate test project and its Publishable key.
- Create a test project in Manalens and copy its Publishable key.
- Send the JSON example with curl and check the status 202.
- Run a packaged build. Check that session_start and game_open arrive, and that game_open has is_first_open true only on the first launch.
- Call Track() for one level, then check level_start in the activity feed with engine unreal.
- Start the game without a network, play, connect, and check that the kept batch arrives once.
- Replace the test key with the production Publishable key before you ship.
Sources: Manalens app events documentation.
How do other engines send the same events?
With the same envelope and their own HTTP functions. Each guide below shows the code for one engine, with a saved player ID, an offline queue with retries, a consent flag and the export target rules.
- How to add analytics to a GameMaker game →
- How to add analytics to a Construct 3 game →
- How to add analytics to a Defold game →
- How to add analytics to a Bevy game →
- How to add analytics to a Phaser game →
- How to add analytics to a LÖVE (Love2D) game →
- How to add analytics to an RPG Maker MZ game →
- How to add analytics to a Ren'Py game →
- How to add analytics to a Pico-8 game →
- How to add analytics to a GDevelop game →
- How to add analytics to a MonoGame game →
- How to add analytics to a Raylib game →
- How to add analytics to a HaxeFlixel game →
- How to add analytics to a Stride game →
Sources: Manalens app events documentation.
How do I start?
Manalens is the analytics and growth engine built for games. Send game_open and session_start from a subsystem, and the Game KPIs board shows retention, sessions and DAU for your Unreal build next to your website and Steam data.
Sources: Manalens product documentation.
Frequently asked questions
Does Manalens have an Unreal Engine plugin?
No. It has SDKs for Godot, Unity, the web and Node.js. Unreal games send events over HTTP to POST /v0/events with the Publishable key and engine set to unreal. The reports treat these events like events from the SDKs, as long as you follow the event conventions.
Can I use Blueprints instead of C++?
Not without some C++ today. There is no Blueprint node set for Manalens. Epic says that subsystems are automatically exposed to Blueprints, and that UFUNCTION() markup controls which functions Blueprints can call. So write the subsystem in C++, mark Flush() and your own track functions BlueprintCallable, and call them from Blueprint graphs.
Is the Publishable key safe in an Unreal build?
Yes. It can only send website and game events and cannot read data. Anyone who has the build can read it, and that is expected. Never ship the Secret key, which sends server events, or an API key, which reads your analytics.
Why does each Unreal session show up as a new player?
Because the anonymous_id changes. Create one UUID on the first launch, save it in the Saved folder, and send it with every event. Retention, MAU and funnels count players by this ID, so a new ID on every launch breaks all three.
Why does the collector answer 400 to my Unreal events?
The usual causes are an ID that is not an RFC 4122 UUID, an event with no session_id, a session_id equal to the anonymous_id, a time that does not end in Z, an unknown field, or an event older than 7 days. The whole batch is refused, so fix the code before you send it again.
Sources and implementation
- Unreal Engine 5.9 documentation: In-Game Analytics (Epic Games, read 19 November 2026) ↗
- Unreal Engine 5.7 API: IAnalyticsProviderModule (Epic Games, read 19 November 2026) ↗
- Unreal Engine 5.7 documentation: Programming Subsystems (Epic Games, read 19 November 2026) ↗
- Unreal Engine 5.7 API: FHttpModule (Epic Games, read 19 November 2026) ↗
- Unreal Engine 5.7 API: IHttpRequest (Epic Games, read 19 November 2026) ↗
- Unreal Engine 5.7 API: IHttpResponse (Epic Games, read 19 November 2026) ↗
- Unreal Engine 5.7 API: FJsonObject (Epic Games, read 19 November 2026) ↗
- Unreal Engine 5.7 API: FGuid (Epic Games, read 19 November 2026) ↗
- Unreal Engine 5.7 API: FDateTime (Epic Games, read 19 November 2026) ↗
- Unreal Engine 5.7 API: FFileHelper (Epic Games, read 19 November 2026) ↗
- Unreal Engine 5.7 documentation: Delegates and Lambda Functions (Epic Games, read 19 November 2026) ↗