testit
BETA · invite-only
Sign in Steam

Testit SDK for Godot 4

In-build playtest telemetry: sessions, heartbeats (which is where CCU comes from), custom events, and an exit survey whose answers arrive already tied to the play session that produced them — this build, this much playtime, these events.

Pure GDScript. No external dependencies, no compiled binaries, no GodotSteam requirement (it is used if present, never demanded).

Your players do not need an account on the platform. The SDK identifies an install with an anonymous UUID it stores in user://. Nothing here asks a player to sign in or sign up.

//What you get

Ten minutes of integration buy the numbers a publisher will ask for anyway — measured inside the build, independent of Steam, and all of it filterable by build version, so “did build 12 beat build 11?” is a filter, not a guess:

Median session length · p90

How long a typical player actually stays. Server-derived and crash-safe; one AFK player can't move it.

CCU over time

Concurrent players on a timeline — whether anyone is playing at all, and when they do.

Installs & first launches

Unique installs arriving over time. Works for anonymous players — nobody signs up for anything.

D1 / D7 retention

Do players come back tomorrow and in a week — the first two numbers a publisher asks for.

Drop-off by stage

One stage_complete() call per checkpoint shows exactly where players stop, in unique installs.

Custom events

Anything you track() — deaths, settings changes, feature use — aggregated by name and build.

Exit survey tied to playtime

On quit, the player lands on your questionnaire with their measured session attached — answers you can weigh against real behaviour.

Crashes & bug reports

Crash detection with breadcrumbs and log tails, plus an in-game F8 bug reporter with screenshots — collected free, unlocked per game by the debug add-on.

//Install

  1. Copy addons/testit/ into your project’s addons/ folder.
  2. Project → Project Settings → Plugins → Testit Analytics → Enable. Enabling registers the TestitSDK autoload for you.
  3. Get your ingest key from the publisher cabinet: /dev/games/<your game>/sdk.

That’s the whole install. If you’d rather not use the plugin system, add res://addons/testit/testit_sdk.gd as an autoload named TestitSDK by hand — the addon does nothing else.

//Quickstart

func _ready() -> void:
    TestitSDK.init("tk_your_ingest_key", "0.4.2")

    TestitSDK.track("menu_opened", {"from": "boot"})

func _on_tutorial_finished() -> void:
    TestitSDK.stage_complete("tutorial", {"deaths": 2})

func _on_language_changed(locale: String) -> void:
    TestitSDK.set_language(locale)

There is no shutdown call to remember. The SDK closes the session and opens the exit survey on NOTIFICATION_WM_CLOSE_REQUEST (and on app pause on mobile) by itself.

//API reference

init(api_key, build_version, opts = {})

Starts the session. Call it once, as early as you can. build_version is required: it is stamped on every session and every event, and every number in the cabinet can be filtered by it — which is the only way to answer “did the change I shipped in build 12 help?”. Read it from one place (your export preset, a version resource, ProjectSettings) rather than typing a literal that will drift.

opts keyTypeDefaultMeaning
endpointStringhttps://sdk.testit.ggBase URL. Point it at http://127.0.0.1:3000 while developing.
steam_idString—Supply the Steam ID64 yourself.
steam_app_idStringauto (GodotSteam)The Steam appid this build runs as. Link your demo / playtest appids to the game in the cabinet and their sessions become separate channels (full / demo / playtest).
channelString—"full", "demo" or "playtest" — declare it for non-Steam builds (an itch demo, a zip for friends). Wins over the appid mapping.
languageString—In-game language at launch.
exit_surveybooltruefalse disables the browser popup permanently for this build.
exit_survey_every_nintserver's valueOverride the frequency cap. 0 = first session only.
heartbeat_secondsfloat60Heartbeat interval — CCU resolution and the crash fallback. Minimum 15.
flush_secondsfloat15How often buffered events are sent. Minimum 5.
auto_end_on_quitbooltruefalse if you want to call end_session() yourself.
debugboolfalsePrints what the SDK is doing.

track(name, props = {})

Record a custom event. Batched, buffered, and fire-and-forget — safe from a hot loop, safe before init() (it is simply ignored), and it will never raise or block.

Props are flattened to scalars: strings, ints, floats, bools. Nested dictionaries and arrays are dropped, because an aggregate over a JSON blob is not a metric. Caps: 16 keys, 200 characters per string, 64 characters per event name. Names are lower-cased and non-[a-z0-9_.-] characters become _, so Stage_Complete and stage_complete are one row and not two.

set_language(lang)

The language the player picked in game — call it whenever they change it. The OS locale (OS.get_locale()) is captured automatically and stored separately, so you can see both “what their machine is set to” and “what they chose to play in”.

set_steam_id(steam_id)

For projects using a Steamworks binding other than GodotSteam. Must be a 17-digit Steam ID64; anything else is ignored rather than stored. Automatic detection: if a Steam singleton or autoload is present (GodotSteam, GDExtension or module build), the SDK calls getSteamID64() at init. It is checked at runtime and never imported, so a project without GodotSteam works unchanged.

stage_complete(stage_id, props) · run_complete(run_index, result, props) · bug_report(text, props)

Thin wrappers over track() for the three events the platform gives extra meaning to. stage_complete is the important one: the cabinet builds the drop-off curve out of it, counted in distinct installs.

flush() · end_session(open_survey = true) · open_exit_survey()

flush() sends now (normally unnecessary). end_session() closes the session by hand — for a “quit to desktop” button, or with auto_end_on_quit: false. open_exit_survey() opens the survey immediately, ignoring the frequency cap — wire it to a “give feedback” menu item. Getters: get_install_id(), get_session_id(), is_ready().

set_survey_param(key, value)

Attach a value to the exit-survey link — the level the player quit on, the difficulty, a branch: set_survey_param("level", "forest_2") adds &level=forest_2. If your platform Form declares level as a hidden field, every answer arrives with it and the responses page breaks answers down by value; a custom survey URL simply receives it. Lowercase keys, testit_ reserved, up to 10 keys, values up to 200 characters, "" removes a key. Don't put names or emails in here.

Signals

SignalFires
flushed(accepted: int)After a successful send. accepted counts events the server actually stored — a replayed duplicate counts 0.
config_loaded(config: Dictionary)Once the remote config arrives (or fails, with an empty dictionary).
exit_survey_opening(url: String)Just before a browser tab is opened.

//The exit survey

When the player quits, the SDK opens their system browser at the platform’s exit URL, and the platform redirects to whichever survey your game is set up with. It carries the session reference through the redirect, so the answers land attached to a measured session — this build, this much playtime, these events. That link is the entire point of the feature; a free-floating survey link you could already have had.

Where it lands, first match wins:

  1. Your own link (Google Forms, Typeform, your Discord…) if you set one in the cabinet — the session reference is appended as ?testit_session=<id> so you can carry it into your own form.
  2. A platform Form at /f/<token>, whose responses show up in the form-responses view you already use. If you never set one up, one is created for you from a default five-question playtest sheet, owned by your account and fully editable.

How often it opens: the first session a player ever plays, then every Nth session (default 5). Both the on/off switch and N live on the server, so you can turn it off for a build that is already out on Steam. The client can always refuse (exit_survey: false), but it can never turn it on over a server “off”.

Web exports: OS.shell_open may be blocked by the popup blocker — treat the exit survey as desktop-only.

//Crashes & bug reports

Both ship inside the same addon and need zero extra integration. Both are always captured; reading them in the cabinet is the paid debug add-on (per game, per month, from your balance). While a game stays unlocked, only the newest reports are kept.

Crash detection. The SDK writes a liveness marker at init and removes it on a clean shutdown. If the next launch finds the marker, the previous run died — and the SDK speaks for it: how long the session lived, the last ~30 events you tracked (breadcrumbs; heartbeats excluded), a device snapshot (OS, GPU, CPU, RAM), and the tail of the previous run’s engine log when Godot’s file logging is on (on desktop it is by default). One report per dead session, riding the same offline-safe queue as everything else — so it survives being offline the same way the telemetry does.

The bug overlay. The player presses F8 (configurable via bug_hotkey, or call open_bug_report() from your own menu): the game pauses, a panel shows a screenshot of the frame they were just looking at and asks what happened. The report carries their words, the screenshot (JPEG, ≤1280 px), breadcrumbs, device info and the session reference — so it lands in the cabinet next to the session that produced it. Offline, the text is queued without the image and sent on the next launch. bug_overlay: false removes the hotkey for a build.

What this deliberately is not: no native minidumps, no file scanning, nothing captured while the panel is closed. It answers the playtest question — where, on what hardware, after which actions — not the symbolicated-stack-trace question.

//What is collected

InstallAn anonymous UUID v4 generated on first launch, stored in user://testit_state.json.
SessionStart, last heartbeat, end, platform, OS locale, in-game language, SDK version, build version.
Steam IDOnly when a Steamworks binding exposes one, or you supply it.
Steam app id / channelWhich Steam app of your game the build ran as (full game, demo or playtest) — so a demo's playtime never blurs into the full game's median.
EventsName, timestamp, flat props, plus the install/session/build they belong to.

No IP address, no file paths, no screenshots, no logs, no personal data of any kind is collected by this SDK. If you attach something personal in your own props, that is on you — don’t. Remember to mention this telemetry in your game’s own privacy notice.

//Reliability

Offline is normal. Anything that fails to send is written to user://testit_queue.json and replayed on the next launch. Up to 200 envelopes are kept; past that the oldest are dropped, because newer telemetry describes the build people are playing now.

Retries are free. Every write on the server is idempotent — sessions are upserted, events deduped — so replaying the same envelope twice changes nothing.

Crashes are measured, not lost. A build that dies never sends session_end, so the server falls back to the last heartbeat:

duration = clamp(0, (ended_at ?? last_heartbeat_at) - started_at, 12h)

That is short by at most one heartbeat interval — a bounded under-count, which is the right direction to be wrong in. Sessions with no ended_at are also reported separately in the cabinet as a crash/kill proxy.

Quit is the one blocking moment. An async request cannot outlive the process that started it, so at quit the SDK does a synchronous send with a hard 1.2-second total budget, after having already written the queue to disk. Worst case is a slightly slower quit, never lost data.

//Reading the dashboard

Everything on the cabinet’s SDK page filters by build version and date range. The numbers, and exactly what they mean:

NumberHow it is computed
Session lengthServer-derived, never client-reported: from session start to session end, falling back to the last heartbeat for crashed sessions. Shown as the median (one AFK player moves a mean by minutes and a median by nothing), with p90 beside it.
CCUA session counts toward every time bucket it overlaps. Bucket width follows the window: hourly up to 2 days, 6-hour up to 14, daily beyond. It reads high when the bucket is wider than a typical session — the bucket width is printed next to the chart for exactly that reason.
InstallsDistinct anonymous install ids; the first-launch curve is their arrival over time.
D1 / D7 retentionOver installs whose day-N window has fully elapsed; shown as n/a below 10 installs because a percentage of seven people is noise.
Drop-offBuilt from stage_complete events, counted in distinct installs, ordered by first appearance.
Top eventsCustom event volume by name.

//Local development

TestitSDK.init(KEY, "dev", {"endpoint": "http://127.0.0.1:3000", "debug": true})

debug: true prints every decision the SDK makes. Watch the cabinet’s SDK page — it shows the last time your key sent anything, which is the fastest way to tell a wrong key from a wrong endpoint.

//Wire format

One POST /api/sdk/v1/ingest per envelope, key in the X-Testit-Key header — useful if you are porting the SDK to another engine:

{
  "sdk_version": "1.0.0",
  "install_id": "f81d4fae-7dec-41d0-a765-00a0c91e6bf6",
  "build_version": "0.4.2",
  "steam_id": "76561198000000001",
  "session": {
    "id": "0c6a1e1e-...",
    "started_at": 1788130000000,
    "last_heartbeat_at": 1788130060000,
    "ended_at": null,
    "first_launch": false,
    "platform": "Windows",
    "os_locale": "en_US",
    "language": "ru"
  },
  "events": [
    {"id": "9b2f...", "name": "stage_complete", "ts": 1788130030000,
     "props": {"stage_id": "tutorial", "deaths": 2}}
  ]
}

Writes are idempotent per (game, session id) and (game, event id). Rate limit: 240 requests per 60 s per key+IP — a 60 s heartbeat plus a 15 s flush is ~5 req/min per player.

Ready to wire it up? Grab your ingest key in the cabinet.

Godot SDK docs — testit