Analytics SDK
Record sessions, playtime and your own events from a Godot, Unity or Unreal game.
Turn it on
- The project must be in an organization.
- On the Builds tab, turn on Analytics and build.
That is all you need for sessions, players and playtime. Results show in the project's Analytics section, over the last 7, 30 or 90 days.
To send your own events, add the SDK to your project first. Open Addons, select Analytics and install it for the project. Without the add-on, your calls do not compile. With it, they do nothing until a build has Analytics turned on.
Your own events
LoreOwl.track("level_complete", { "level": 3, "deaths": 1 })- Event names are trimmed and made lower case, so
LevelCompleteandlevelcompleteare one event. - Properties larger than 8 KB are sent as
{}. - Unity calls do nothing in the editor. Unreal calls do nothing in the editor, in cooks and on dedicated servers.
API
Godot (LoreOwl) | Unity (LoreOwl.Analytics) | Unreal (FLoreOwlAnalytics) | |
|---|---|---|---|
| Send an event | track(name, props) | Track(name, props) | Track(Name, Props) |
| Send now | flush() | Flush() | Flush() |
| Privacy switch | set_collection_enabled(bool) | CollectionEnabled | SetCollectionEnabled(bool) |
| Read the switch | is_collection_enabled() | CollectionEnabled | IsCollectionEnabled() |
| Install id | get_device_id() | DeviceId | GetDeviceId() |
| New install id | reset_device_id() | ResetDeviceId() | ResetDeviceId() |
| Events waiting | queue_size() | QueueSize | GetQueueSize() |
| Flush finished | flush_completed(sent, ok) signal | FlushCompleted event |
Automatic events
session_startwhen the game starts.session_endwhen the game closes normally, with the session length. A session with nosession_endcounts as an unclean exit. That covers a crash, a killed process and a lost battery.verified_purchasewhen itch.io launched the game with a download key. LoreOwl sends a hash of the key, never the key.
Every event carries the build hash and channel, so playtest numbers stay apart from release numbers. It also carries the platform, the game version, the window size, the language and whether it is a debug build.
When events are sent
The SDK sends events in batches:
- every 15 minutes,
- when 25 events are waiting,
- when the game loses focus or goes to the background,
- when the game closes. Godot waits up to three seconds and then saves the rest.
If a send fails, the SDK saves the events to disk and sends them at the next launch. It keeps up to 5,000 events. Each event has its own id, so a retry never counts twice.
Privacy
Players get a random id for each install. There is no login and no personal data.
Give players a privacy switch in your options menu. Turning collection off deletes events that were
not sent yet. reset_device_id() gives a new id, so later events do not link to earlier ones.
Tell your players what you collect, for example in your privacy policy.
Plan limits
| Solo | Studio | Enterprise | |
|---|---|---|---|
| Events per project per day | 100,000 | 5 million | 50 million |
| Raw event history | 30 days | 12 months | 24 months |
Daily totals are kept for good.
Troubleshooting
- No data. Check that the build had Analytics on. Events can take 15 minutes to arrive.
- "analytics token rejected". The project's token changed. Build again.
- Unreal build fails. Install Visual Studio with the C++ workload. Unreal compiles the plugin.