# Ravensight documentation > The whole of https://ravensight.io/docs/ as Markdown, one topic after another, generated from the same sources as the pages. Each topic ends with its own address. # From zero to your first event, in about five minutes Ravensight is hosted. You do not run a server, you point your game at ours. 1. **Create an account.** Sign in at `https://app.ravensight.io` through RealitySE, the identity system Ravensight runs on. Use email and password, or one of the SSO providers: Apple, Google, Facebook, GitHub, Twitch, Xbox, or Steam. 2. **Create a project.** A project is one title, and it holds one game per environment. The first time you sign in the dashboard asks who your studio is, then a name, an id and an engine for your game, creates the project with its production environment, and waits for your first event. Every feature is available right away, no upgrade required. See [Projects and environments](https://ravensight.io/docs/projects/) for the shape. 3. **Copy the ingest key.** Each environment has its own. It is shown once on the confirmation screen and looks like `gt_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`. A key that ships inside a build is not a secret: anyone with the build can read it. It can only create sessions, read the tracking on/off switch and the AI suggestions feed, submit player reports and submit doctor reports; it cannot read analytics or manage your account. If you lose it, rotate it from **Settings > Projects** for a new one. For a demo, a web build anyone can open or an open-source game, use a [public key](https://ravensight.io/docs/public-builds/) (`gt_pub_`) with an event allowlist and a ceiling instead, and keep live keys on your own server when possible. 4. **Add the autoload.** Copy `Ravensight.gd` into your Godot project, e.g. `res://autoload/Ravensight.gd`. Open **Project > Project Settings > Autoload**, add the script, name it `Ravensight`, and enable it. Set `ingest_key` to the key from step 3 before Ravensight's `_ready()` runs: edit the default at the top of `Ravensight.gd`, or set it from an autoload listed above `Ravensight`. `api_url` already points at `https://api.ravensight.io`. Not on Godot? Install the SDK for your engine from the [SDK list](https://ravensight.io/docs/platform-support/) instead (Unity, Unreal, web, iOS, Android, C++, Odin or LÖVE, or a preview for GameMaker, Defold, Flutter, Cocos Creator, Construct 3 or Roblox), or call the [HTTP API](https://ravensight.io/docs/http-api/) directly from anything else. 5. **Send your first event.** Call `track_event()` from anywhere in your game. 6. **See the dashboard.** Pick your game in the switcher, and the environment beside it if the game has more than one. The SDK sends events in batches, 5 seconds after the first one waits, so they typically show up within a few seconds, no restart needed. ## Which environment does this key hit? The SDK needs only the ingest key at initialization. The key alone decides which game and environment receive the events, so project and game ids do not belong in your app configuration; treat them as a release audit check instead. The free confirmation is `GET /api/v1/settings` with the key in `X-API-Key`, which returns the game's slug, name and environment (see [the HTTP API](https://ravensight.io/docs/http-api/)), or `npx ravensight-doctor --live`, which from 0.4.2 prints `key belongs to (,)`. Neither counts toward your usage. Godot, res://autoload/ravensight.gd ``` Ravensight.track_event("level_completed", { "level": 3, "score": 15000, "time_seconds": 87.4 }) ``` **Not on Godot?** The same account and ingest key work against the plain [HTTP API](https://ravensight.io/docs/http-api/): three headers and a JSON body from any engine or client that can make a POST request. Source: https://ravensight.io/docs/quickstart/ Last updated: 2026-11-20 --- # One title, one project, one game per environment Your development build and your shipped build must not share an event stream, or a week of debugging quietly becomes your retention number. Ravensight keeps them apart by making each one its own game, and groups the games of one title into a project. ## The three scopes | Scope | What lives there | | --- | --- | | Environment, one game | Its own ingest key, its own tracking, history and weekly digest switches, and its own events, sessions, players, funnels, journeys, retention, reports and digests. The presets are production, early access, demo, beta, alpha, staging and development, and a project can also name its own, such as qa. At most one game per label per project. | | Project, one title | Name and engine, the environments underneath it, and the studio records filed under it. Project-scoped pages read the project rather than one build. | | Studio, your org | Members and roles, billing and the prepaid balance, the studio context graph, studio notes, cross-game analytics and the audit log. | ## Picking one The switcher at the top of the sidebar picks a project. Beside it in the header, on the pages whose numbers come from one build, an environment control picks which environment you are looking at. A project with a single environment needs no second choice, and the pages that belong to the whole project do not show the control at all. The switcher also offers **All games**. Brainstorm, Strategy matrix, Design, Dashboards, Muninn, Marketing, Sales, Pulse, Publishers and Studio data follow the selection: one game shows that game's records, and All games shows every game's, along with records that have no game. There, each record can be moved to a game with Move to game. Every other page shows one game at a time and asks you to pick one under All games. This is a filter inside your studio, not a change in who can see what: every member still sees every game. ## Managing them **Settings > Projects** is where projects are renamed, merged, and given new environments. Because every existing game was migrated into a project of its own, two environments of the same title can start out as two projects. Ravensight proposes the merge when their names normalize to the same thing and their environment labels do not collide, and nothing is merged until you accept the proposal. Dismiss one and it stays dismissed. You can also move a single environment from one project to another, or delete a project once it is empty. Creating, renaming, merging and deleting all need an admin role or above. Everyone in the studio can read the list. Analytics queries are still keyed on one game, which is why a number on screen always belongs to exactly one environment. A project-level or studio-level number is the same per-game query asked of several games and summed, never a new aggregation with its own rules. Source: https://ravensight.io/docs/projects/ Last updated: 2026-11-15 --- # Where the SDKs run Every SDK ships as source and speaks plain HTTPS to the same four endpoints. There is no prebuilt binary in any of them. The platform specific code is small: the LÖVE SDK's HTTPS transports, and the app background handling on iOS and Android. The C++ and Odin SDKs link libcurl for the HTTP calls. The LÖVE SDK runs on the desktop, and on the web through the JavaScript SDK; see the [LÖVE SDK reference](https://ravensight.io/docs/love-sdk/). A cell says Untested where no build of that SDK has been run on that platform yet. ## Support matrix | SDK | Desktop | iOS | Android | Web | Console | | --- | --- | --- | --- | --- | --- | | Godot | Yes | Untested | Untested | Yes, on the web export | Untested, subject to cert | | Unity | Yes on macOS, in the Unity 6 Editor and a macOS player. Windows and Linux untested | Untested | Untested | Untested, on WebGL | Untested, subject to cert | | Unreal | Untested. Mac editor and game targets build on Unreal Engine 5.8.3, no packaged game has run yet | Untested | Untested | No web target in UE5 | Untested, subject to cert | | JavaScript (web and Node) | Yes, in Electron or Node | Untested, in a web view | Untested, in a web view | Yes | Not applicable | | C++ | Yes on macOS, C++17 plus libcurl. Linux in CI, Windows untested | Untested | Untested | Not applicable | Untested, subject to cert | | Odin | Yes on macOS, via libcurl. Windows and Linux untested | Untested | Untested | Not applicable | Untested | | Go (preview) | Yes on macOS, in its own tests. Windows and Linux untested | Untested | Untested | Untested | Untested | | LÖVE | Yes on macOS. Windows and Linux untested | Not supported yet | Not supported yet | Through ravensight-js and the love.js bridge | Not supported yet | | iOS native Swift | Yes, macOS 12+ | iOS 15+. Tests pass on the iOS Simulator, untested on a device. tvOS 15+: tests pass on a tvOS simulator | Not applicable | Not applicable | Not applicable | | Android native Kotlin | Not applicable | Not applicable | minSdk 24. Tests pass under Robolectric, untested on a device or emulator. Meta Quest runs Horizon OS, which is Android, so the same SDK runs there unchanged | Not applicable | Not applicable | | GameMaker (preview) | Untested on Windows, macOS and Linux | Untested | Untested | Untested, on the HTML5 export | Untested, subject to cert | | Defold (preview) | Linux, inside the Defold 1.14 engine against a test server. macOS and Windows untested | Untested | Untested | Untested, on the HTML5 export | Untested | | Flutter (preview) | Untested on Windows, macOS and Linux | Untested | Untested | Untested | Not supported | | Cocos Creator (preview) | Untested, native Windows and macOS builds | Untested | Untested | Untested in Cocos Creator, through the JavaScript SDK | Not supported | | Construct 3 (preview) | Untested, through a desktop wrapper | Untested, through Cordova | Untested, through Cordova | Untested in Construct, through the bundled JavaScript SDK | Untested | | Roblox (preview) | Through your game server: every player reports as Roblox, whatever they play on | Through your game server | Through your game server | Not applicable | Through your game server | | Any engine via HTTP | Yes | Yes | Yes | Yes | Yes, subject to cert | These are honest cells, not a marketing grid. A Yes here means a build of that SDK has run there, and Untested means it has not yet. What we have not done is ship a title on every one of them, so treat even a Yes in the mobile and console columns as "nothing in the way" rather than "verified in a submitted build". Each SDK's README lists exactly what was run. The preview SDKs are described under Preview SDKs below. ## Consoles Nothing in any SDK is blocked on a console. What is blocked is everything else about console networking: each platform holder requires that outbound traffic, privacy disclosure, and any data collection be declared and approved as part of certification, and NDA restrictions mean we cannot ship console specific code publicly anyway. Ravensight is an ordinary HTTPS call from your title's own network stack, and passing cert with it is the developer's responsibility, exactly as it would be for a leaderboard or a patch notes fetch. ## Mobile privacy Ravensight does not touch an advertising identifier. Every SDK generates its own random device id on first run and stores it locally. The Godot and LÖVE SDKs write 32 lowercase hex characters, a hyphen and the OS name, so `3f9ac2e17b5d4c0e8a61f2b9d7c04e5a-android` is what one looks like. The Unity, C++, Odin, Go, iOS and Android SDKs write `dev_` and 32 hex characters from 16 random bytes; Unreal writes `dev_` and a random UUID, and the JavaScript SDK writes `dev_` and a random UUID where the browser or Node offers one, else 32 hex characters. The preview SDKs differ in places, Roblox most of all, and that section says how. No IDFA on iOS, no Android advertising id, no hardware identifier, and no IP based fingerprinting. That id is meaningless outside your game's own data, and nothing in Ravensight ever joins it to a name, an email or an account, because the SDK has no field for any of those. An event row holds the game id, the device id, the session id, the event name, a timestamp, and the level, platform, version and payload you sent. Unless you switch them off, it also holds the country the session connected from and the device model, OS version and GPU the SDK sent (see [country and device](https://ravensight.io/docs/platform-support/#country-device)). It holds no IP address, no user agent and nothing finer than a country, and it is deleted after 90 days. To detect abuse, a keyed hash and a masked form of the address a session connects from are kept for 30 days, or for as long as you keep that address blocked, never the full address (see [traffic sources](https://ravensight.io/docs/traffic/)). Two things outlive that window: one record per game and device with the first day it was seen, kept for the game's lifetime so lifetime and new-player counts stay correct, and any feedback text a player typed, kept until you delete it or the game. ## Country and device Two more things are collected by default, and one switch per game turns both off: **Record country and device fields** on the game's card under **Settings > Projects**, or `countryDeviceEnabled: false` on `PATCH /api/v1/games/:gameId`. - **Country.** When a session starts, the server looks up the country of the address the request connected from, in an offline database bundled with the server, so no request leaves Ravensight to answer it. Only the two-letter country code (such as `US`) is kept, on the session and on each of its events. The address itself is never stored. A private or unknown address gives an empty value, and the SDK cannot send or change the country. IP geolocation by [DB-IP](https://db-ip.com), used under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). - **Device.** SDK builds that support it send an optional `device` object when a session starts: `model` (the device model name, never a serial or other unique id), `osVersion` (the version only, since the platform already names the OS) and `gpu` (the graphics adapter name). Each is trimmed and cut to 128 characters, and a value with a control character is stored as empty. An SDK sends only what its engine exposes without a permission prompt: Godot, Unity and Unreal 0.5.0 or later send all three, C++ 0.5.0 or later, Odin 0.6.0 or later and Go 0.1.0 or later send the values your game sets in their config, iOS 0.6.0 or later and Android 0.5.0 or later send the model and OS version, and LÖVE 0.7.0 or later sends the GPU name. A Meta Quest headset reports its model as `Meta Quest 3`, and so on, to tell it from a phone. With the switch off, new sessions store empty values for all four, the game's live sessions are cleared, and every batch that arrives after the switch is written without them. Events already accepted and waiting to be written at the moment you switch it off may still carry them. Events written before the fields existed, or while the switch was off, read as unknown: nothing is filled in afterwards. ## Tracking prompt, opt-out and reset **No App Tracking Transparency prompt is required for Ravensight.** Apple defines tracking as linking data collected from your app about a user or device with data collected from other companies' apps, websites or offline properties for targeted advertising or advertising measurement, or sharing it with a data broker. Ravensight does neither: the id is yours alone, it is never combined with another company's data, and nothing reaches an ad network or a data broker. So on Ravensight's account you do not need to call `requestTrackingAuthorization`. If something else in your app does track across companies, that decision is unchanged by this. Two SDK calls exist for studios that show their own consent screen. Ravensight ships no consent UI; wire these to your own settings menu if your audience or your lawyer wants one. - **The opt-out** stops the SDK sending anything: queued events are dropped and no further request is made, not even the startup check. Every SDK except JavaScript saves the choice locally, so it survives a restart until the player turns it back on. The JavaScript SDK does not store it: keep the choice in your own settings and apply it before the first event on every launch. - **The reset** saves a new random id and opens a new session under it, so a player can start a fresh analytics identity from your game's own settings. Rows already stored under the old id are not rewritten; they expire with the game's selected raw-event window (90 days by default, or 180 or 400 days with extended retention), or sooner if you delete the game. | SDK | Opt-out | Reset | | --- | --- | --- | | Godot | `Ravensight.set_tracking_enabled(false)` | `Ravensight.reset_device_id()` | | JavaScript | `rs.setEnabled(false)`, not saved | `await rs.resetDeviceId()` | | LÖVE | `ravensight.setTrackingEnabled(false)` | `ravensight.resetDeviceId()` | | Unity | `Ravensight.SetTrackingEnabled(false)` | `Ravensight.ResetDeviceId()` | | Unreal | `SetTrackingEnabled(false)` on the subsystem | `ResetDeviceId()` | | C++ | `client.set_tracking_enabled(false)` | `client.reset_device_id()` | | Odin | `rs.set_tracking_enabled(client, false)` | `rs.reset_device_id(client)` | | Go | `client.SetTrackingEnabled(false)` | `client.ResetDeviceID()` | | iOS | `Ravensight.setTrackingEnabled(false)` | `Ravensight.resetDeviceId()` | | Android | `Ravensight.setTrackingEnabled(context, false)` | `Ravensight.resetDeviceId()` | ## Store disclosures and the privacy manifest You do still have disclosure obligations, and they are yours rather than ours, because Apple and Google ask the publisher of record. The answers below cover what Ravensight collects on its own account; add whatever your own events carry on top, and if you send something personal, disclose it. - **App Store privacy details.** Declare **Device ID** under Identifiers and **Product Interaction** under Usage Data, both under **Data Not Linked to You**, purpose **Analytics**, and answer **Data Not Used to Track You**. With the country and device fields on (the default), also declare **Coarse Location** under Location and **Other Diagnostic Data** under Diagnostics, the same way. Add **Crash Data** under Diagnostics only if you send crash events. - **Apple privacy manifest.** With any SDK other than the Swift package, add the `NSPrivacyCollectedDataTypes` entries below to your `PrivacyInfo.xcprivacy`, with `NSPrivacyCollectedDataTypeLinked` false and `NSPrivacyCollectedDataTypeTracking` false on both, and `NSPrivacyTracking` false. The required-reason entries depend on the SDK. The Swift package ships its own `PrivacyInfo.xcprivacy`, which Xcode merges into your app's privacy report: it declares `NSPrivacyAccessedAPICategoryUserDefaults` with reason `CA92.1`, tracking false, and Device ID and Product Interaction as collected, so you do not add those two yourself. With the country and device fields on, add `NSPrivacyCollectedDataTypeCoarseLocation` and `NSPrivacyCollectedDataTypeOtherDiagnosticData` to your app's own manifest with any SDK, the Swift package included, linked false, tracking false, purpose Analytics. Unity's `PlayerPrefs` is `UserDefaults` on iOS, so a Unity game's manifest must declare `NSPrivacyAccessedAPICategoryUserDefaults` with `CA92.1` if the engine's own manifest does not already. Godot and Unreal store a file in the app's own container and add no required-reason entry of their own, so leave whatever your engine's export already declares exactly as it is. - **Android.** The `android.permission.INTERNET` permission is the only one any SDK needs. No `AD_ID` permission, and nothing that triggers a runtime permission dialog. In the Play Console Data safety form declare **Device or other IDs** and **App interactions** as collected, not shared, for Analytics, not for advertising, and with the country and device fields on also **Approximate location** and **Diagnostics** the same way; answer yes to encrypted in transit, because every request is HTTPS; and answer yes to a deletion path, which is the reset call above plus deleting the game. With the native Android SDK, merge its Auto Backup rules so the device id and the saved opt-out stay on the device rather than following the player's cloud backup to a new phone. PrivacyInfo.xcprivacy, the Ravensight entries ``` NSPrivacyTracking NSPrivacyCollectedDataTypes NSPrivacyCollectedDataType NSPrivacyCollectedDataTypeDeviceID NSPrivacyCollectedDataTypeLinked NSPrivacyCollectedDataTypeTracking NSPrivacyCollectedDataTypePurposes NSPrivacyCollectedDataTypePurposeAnalytics NSPrivacyCollectedDataType NSPrivacyCollectedDataTypeProductInteraction NSPrivacyCollectedDataTypeLinked NSPrivacyCollectedDataTypeTracking NSPrivacyCollectedDataTypePurposes NSPrivacyCollectedDataTypePurposeAnalytics NSPrivacyCollectedDataType NSPrivacyCollectedDataTypeCoarseLocation NSPrivacyCollectedDataTypeLinked NSPrivacyCollectedDataTypeTracking NSPrivacyCollectedDataTypePurposes NSPrivacyCollectedDataTypePurposeAnalytics NSPrivacyCollectedDataType NSPrivacyCollectedDataTypeOtherDiagnosticData NSPrivacyCollectedDataTypeLinked NSPrivacyCollectedDataTypeTracking NSPrivacyCollectedDataTypePurposes NSPrivacyCollectedDataTypePurposeAnalytics ``` **What our sub-processors see**, so your "shared with third parties" answer is honest. The event stream is stored with our cloud, event database and operational database providers, who process it only to run Ravensight for you. When you use the AI analyst, the model provider receives the text a player typed into feedback and the rows and totals the analyst's tools queried, under contract; it never receives a player's report image. The embedding provider receives feedback text so you can search it. A product analytics service runs in the dashboard and on this website, never inside a game. Nothing reaches an ad network or a data broker, and nothing is sold. Both stores treat a service provider acting on your instructions as your own processing rather than sharing, which is why "not shared" is the correct answer. The [privacy policy](https://ravensight.io/privacy/) names every provider. Ravensight itself is the processor here, not the controller. What ends up in an event payload is entirely what you chose to put there, so if you send something personal, disclose it. ## What your privacy label can say These are the answers for a game that uses Ravensight and nothing else that collects data. Each row says why, against the store's own definition, so you can defend it in review. Apple's rule for "not linked": direct identifiers are stripped before collection and you never try to link the data back to a person afterwards. Ravensight never collects a direct identifier in the first place, and there is no account to link to. App Store privacy details | Data type | Answer | Why | | --- | --- | --- | | Identifiers: Device ID | Collected. Analytics. Data Not Linked to You. Data Not Used to Track You. | A random per-install id that is never joined to a name, email or account, and never combined with another company's data, so it meets neither the "linked" test nor the tracking definition. | | Usage Data: Product Interaction | Collected. Analytics. Data Not Linked to You. Data Not Used to Track You. | Event names, levels and session timing from your own game only, stored against the same unlinked id and used for nothing but your dashboard. | | Diagnostics: Crash Data | Only if you send crash events. Same answers as above. | Ravensight has no crash reporter; a crash you report as an event is Product Interaction unless it carries a stack trace, in which case declare Crash Data too. | | User Content: Other User Content | Only if you enable player feedback or Player Reports. Analytics. Not Linked. Not Used to Track. | Free text a player types and any image they attach are stored under the device id until you delete them; disclose what your players can type. | | Contact Info, Location, Financial Info, Health, Browsing History, Search History, Purchases | Not collected. | The SDK has no field for any of these, and the privacy policy commits that it never will. | Google Play Data safety | Question or data type | Answer | Why | | --- | --- | --- | | Device or other IDs | Collected. Not shared. Analytics. Not used for advertising or marketing. | The random per-install id above; it leaves your game only for Ravensight's own storage, which Play treats as your processing, not sharing. | | App activity: App interactions | Collected. Not shared. Analytics. | Your gameplay events, under the same id, used only for your dashboard. | | App info and performance: Crash logs | Only if you send crash events. | Ravensight has no crash reporter of its own. | | Messages or other user-generated content | Only if you enable player feedback or Player Reports. | Text a player types is stored until you delete it and reaches the model provider for analysis under contract. | | Is the data encrypted in transit? | Yes. | Every SDK talks to Ravensight over HTTPS only. | | Is there a way to request deletion? | Yes. | The SDK's reset call (see the table under Mobile privacy) severs the player from their history and the old rows expire under the game's selected raw-event retention (90 days by default, optionally 180 or 400); deleting the game removes its stored gameplay data. | | Is collection required or optional? | Optional if you wire the SDK's opt-out call (see the table under Mobile privacy) to a setting, otherwise required. | The switch sends nothing while off, and every SDK except JavaScript saves it; Ravensight ships no consent screen, so this one is your call. | For a game that runs no ads, the one sentence this lets you put on your store page, and mean it: **"No ads, no tracking, no account needed."** If you later add an ad network, an attribution SDK or a sign-in, revisit every row above, because the first two are exactly what the tracking definition is about. A public demo that asks before it sends keeps the player's opt-in choice on the player's own device, in the game's save folder or the browser's storage, so clearing it asks again. A random device id is still an identifier: it is not linked to a person, but it is collected, so declare it as the rows above do. ## SDK repositories | SDK | Status | Repository | | --- | --- | --- | | Godot | Stable | [ravensight-godot](https://github.com/Reality-Software-Entertainment/ravensight-godot) | | JavaScript | Stable | [ravensight-js](https://github.com/Reality-Software-Entertainment/ravensight-js), [ravensight on npm](https://www.npmjs.com/package/ravensight) | | Unity | Beta: verified in the Unity 6 Editor and a macOS player | [ravensight-unity](https://github.com/Reality-Software-Entertainment/ravensight-unity) | | Unreal | Beta: compiled and spec tested on Unreal Engine 5.8.3 | [ravensight-unreal](https://github.com/Reality-Software-Entertainment/ravensight-unreal) | | C++ | Beta | [ravensight-cpp](https://github.com/Reality-Software-Entertainment/ravensight-cpp) | | Odin | Beta | [ravensight-odin](https://github.com/Reality-Software-Entertainment/ravensight-odin) | | Go | Preview: not yet in a released game | [ravensight-go](https://github.com/Reality-Software-Entertainment/ravensight-go) | | LÖVE | Desktop, web through the JavaScript SDK | [ravensight-love](https://github.com/Reality-Software-Entertainment/ravensight-love) | | iOS | Beta | [ravensight-ios](https://github.com/Reality-Software-Entertainment/ravensight-ios) | | Android | Beta | [ravensight-android](https://github.com/Reality-Software-Entertainment/ravensight-android) | | GameMaker | Preview | [ravensight-gamemaker](https://github.com/Reality-Software-Entertainment/ravensight-gamemaker) | | Defold | Preview | [ravensight-defold](https://github.com/Reality-Software-Entertainment/ravensight-defold) | | Flutter | Preview | [ravensight-flutter](https://github.com/Reality-Software-Entertainment/ravensight-flutter) | | Cocos Creator | Preview | [ravensight-cocos](https://github.com/Reality-Software-Entertainment/ravensight-cocos) | | Construct 3 | Preview | [ravensight-construct](https://github.com/Reality-Software-Entertainment/ravensight-construct) | | Roblox | Preview | [ravensight-roblox](https://github.com/Reality-Software-Entertainment/ravensight-roblox) | Beta means the SDK meets the same contract as the others and its own tests pass, but no released game has shipped with it yet; it becomes Stable when one does. Preview means the SDK is written to the same contract but has not yet been verified in a game built with its engine. Every SDK implements the common ingest protocol, and its batching and retry logic is tested with a fake network rather than the live API. For the 0.2.0 releases these suites were run: the Godot behaviour tests, headless on macOS and in CI; the Unity SDK's engine-free core tests in CI and, for 0.2.1, its 58 EditMode and 4 Play Mode tests in the Unity 6000.6.5f1 Editor, plus a macOS player run end to end; the Unreal plugin for 0.2.1, built on Unreal Engine 5.8.3 with warnings treated as errors, its 78 automation specs run headless in the editor, and the Mac editor and game targets built, though no packaged game has run yet; the C++ and Odin suites on macOS; the Swift package's tests on macOS and the iOS Simulator; the Android SDK's JVM and Robolectric tests; and the LÖVE SDK's suite (`luajit spec/run.lua`). Each SDK's README names the commands and toolchain versions. If your engine is not here, the [HTTP API](https://ravensight.io/docs/http-api/) is three headers and a JSON body. Current SDK versions are Godot 0.7.0, JavaScript 0.12.0, LÖVE 0.8.0, Unity 0.6.0, Unreal 0.6.0, C++ 0.6.0, Odin 0.7.0, iOS 0.7.0 and Android 0.6.0. They include typed event helpers, opt-in performance sampling, remote config and experiment exposure, and every one keeps a saved queue across launches, compresses large requests (C++ when built with zlib, Odin on macOS and Linux), signs requests on a public key, and sends ad and attribution events. JavaScript 0.12.0, Doctor 0.5.3 and skills 0.2.5 are available from npm. Native SDKs are available from their linked repositories and version tags. The engine results above describe earlier versions. Each repository's validation notes record the current checks and remaining platform limits. The [Go SDK](https://ravensight.io/docs/go-sdk/) is a preview at 0.1.0: it has typed event helpers, remote config and experiment exposure, a saved queue, compression and signing, but no performance sampling and no ad or attribution helpers. ## Preview SDKs Six more SDKs are previews, each at version 0.2.0: [GameMaker](https://github.com/Reality-Software-Entertainment/ravensight-gamemaker), [Defold](https://github.com/Reality-Software-Entertainment/ravensight-defold), [Flutter](https://github.com/Reality-Software-Entertainment/ravensight-flutter), [Cocos Creator](https://github.com/Reality-Software-Entertainment/ravensight-cocos), [Construct 3](https://github.com/Reality-Software-Entertainment/ravensight-construct) and [Roblox](https://github.com/Reality-Software-Entertainment/ravensight-roblox). Each sends sessions, events, errors, remote config and experiments, and has [identify](https://ravensight.io/docs/identify-players/) and [campaign links](https://ravensight.io/docs/campaign-links/#campaign-links-players), but none has been verified yet in a game built with its engine. Nothing is published to a package registry or an asset store: each installs from its repository at the tag `v0.2.0`, and its README says what was tested and where it does less than the SDKs above. | SDK | Install | Worth knowing | | --- | --- | --- | | GameMaker | Copy its five scripts and one object into your project by hand. GameMaker 2023.1 or later. | Quit with `ravensight_quit()` in place of `game_end()`. GameMaker has no system random source, so the device id is a hash of the time and the generator's state. | | Defold | Add the `v0.2.0` archive to your `game.project` dependencies. | Call `ravensight.update(dt)` every frame and `ravensight.final()` from `final()`, and quit with `ravensight.quit(code)`. | | Flutter | A git dependency on the repository, pinned to `v0.2.0`. | Device model, OS version and GPU are sent only when your game passes them to `init`. Its tests and the analyzer pass in CI for the Dart core, the package and the example app; the only change since `v0.2.0` is in the example. | | Cocos Creator | `npm install ravensight` (0.12.0 or later for identify and campaign links), then copy the glue folder from the repository. | It runs the JavaScript SDK, so its sessions read as JavaScript. | | Construct 3 | Build the addon from the repository. Run `npm install ravensight@latest` before building, or Identify player, Reset identity and Set campaign link do nothing. | It bundles the JavaScript SDK. In worker mode, Construct's default, the game cannot see the page address and sends no `game_exited`. | | Roblox | Sync the repository into ServerScriptService with Rojo, or copy it into Studio, and turn on Allow HTTP Requests. | It runs on your game server and reports each player there. The device id is a keyed hash of the player's Roblox user id under a secret salt you set, so it follows the player across devices; declare it as a pseudonymous identifier. | | SDK | Opt-out | Reset | | --- | --- | --- | | GameMaker | `ravensight_set_tracking_enabled(false)`, saved | `ravensight_reset_device_id()` | | Defold | `ravensight.setTrackingEnabled(false)`, saved | `ravensight.resetDeviceId()` | | Flutter | `Ravensight.setTrackingEnabled(false)`, saved | `Ravensight.resetDeviceId()` | | Cocos Creator | `client.setEnabled(false)`, not saved: apply it at every start | `await client.resetDeviceId()` | | Construct 3 | The Set tracking enabled action, saved when the Consent property is Opt in | The Reset device ID action | | Roblox | `Ravensight.setTrackingEnabled(player, false)`, saved | None: `Ravensight.forgetPlayer(userId)` deletes what the SDK saved for that player | Source: https://ravensight.io/docs/platform-support/ Last updated: 2026-11-21 --- # Ravensight.gd One autoload script. It owns device identification, session creation, batching, retries, and the offline queue, so your game code only ever needs to call `track_event()`. Code samples scroll horizontally when needed. Focus a sample and use the arrow keys, or swipe to read a long line. ## Options Set these before Ravensight's `_ready()` runs: edit the defaults at the top of `Ravensight.gd`, or set them from an autoload listed above `Ravensight`. | Property | Type | Default | Notes | | --- | --- | --- | --- | | `api_url` | String | `https://api.ravensight.io` | With or without `/api/v1`, with or without a trailing slash. Empty means the default. `api_base()` returns the normalised root. | | `ingest_key` | String | `gt_live_your_ingest_key_here` | Your game's ingest key. It ships in your build and is not a secret. For a web export, a demo or an open-source game, use a public key (`gt_pub_`); keep live keys on your own server when possible. See [Public builds](https://ravensight.io/docs/public-builds/). | | `game_version` | String | `1.0.0` | Sent with every session. | | `enabled` | bool | `true` | `false` turns the SDK off for this run: no request of any kind, nothing queued, no `game_started`, until `set_enabled(true)`. Never saved. `set_tracking_enabled()` still saves the player's choice while it is `false`. | | `max_queue_size` | int | `500` | Unsent events kept. The oldest are dropped first; a queued `game_started` is kept. | | `flush_interval` | float | `5.0` | Seconds an event waits so it can go out with others. 50 waiting events go at once. | | `handle_quit` | bool | `true` | The SDK sets `auto_accept_quit` to false, flushes on a close request (and the Android back button when `quit_on_go_back` is on), then calls `get_tree().quit()` itself within 1.5 seconds. Set false if your game has its own "really quit?" dialog; the SDK then only flushes on a close request, and your dialog calls `Ravensight.quit()`. | | `session_timeout` | float | `1800.0` | Android and iOS only: seconds in the background after which the session counts as over. See Automatic events. | ## Public functions | Function | Description | | --- | --- | | `track_event(event_name: String, data: Dictionary = {})` | Queue an event. It only queues: events go out in batches of up to 50, `flush_interval` seconds after the first waiting event, at once when 50 are waiting, on `flush()`, when the app goes to the background, and on quit. Safe to call from any autoload, even before Ravensight's own `_ready()`. | | `flush()` | Send what is queued now instead of waiting for the timer. Cuts a backoff wait short; a server's Retry-After wait still holds. | | `quit(exit_code = 0)` | Send `game_exited` and the queue, then quit. Call it from your own Quit button instead of `get_tree().quit()`. | | `submit_feedback(message: String, category: String = "", rating: int = 0)` | Send player feedback. `category` is optional and one of `FEEDBACK_CATEGORIES`: `bug`, `suggestion`, `complaint`, `praise`, `playtest`, `other`. `rating` is 0 to leave it out, or a whole number from 1 to 5. Anything else fails at once with `invalid_category` or `invalid_rating` and no request is made. Needs an open session; unlike `track_event()`, a call made before one exists fails immediately rather than queueing. | | `set_tracking_enabled(on: bool)` | The player's opt-out, saved across launches. See Player privacy below. | | `is_tracking_enabled()` | `true` while events are collected: enabled, not opted out, kill switch on. | | `reset_device_id()` | Start a fresh analytics identity for this install. Returns the new id. | | `set_enabled(on: bool)` | The game's own switch for this run (see `enabled`). | | `get_status_reason()` | Why nothing is being sent, or `""`. See Startup and failures. | | `api_base()` | The API root requests go to, for example `https://api.ravensight.io/api/v1`. | | `is_playtest()` | `true` in a run driven by the Ravensight playtest runner. | | `set_playtest_context(ctx)` | Puts a running game into playtest mode. The SDK already does this from the playtest runner's variables, so a game never needs to call it by hand. | | `track_ad(network, format, result, options = {})` | Queue an ad lifecycle step as an [`ad` typed event](https://ravensight.io/docs/dashboard/#typed-events). Returns `false` and sends nothing when a field is malformed. | | `track_ad_revenue(network, format, placement, revenue_micros, currency)` | Queue a paid impression (result `shown`). Revenue is a digit string of whole micros. | | `micros_from_decimal_string(text)`, `micros_from_revenue(value)` | Revenue as a micros digit string, without multiplying a float. | | `set_attribution(attribution)` | Queue where this install was acquired, once per install. | | `get_device_id()` | This install's random device id, for an attribution partner's customer user id. | | `get_delivery_stats()` | Events let go of since launch: `dropped_overflow`, `dropped_too_old` and `dropped_refused`. | | `fetch_suggestions()` | Experimental. Answers on `suggestions_received`; while tracking is off nothing is requested and it answers with an empty list. | `Ravensight.tracking_enabled` is read-only and gives the same answer as `is_tracking_enabled()`. `Ravensight.session_token` is the open session's token, or `""` until one opens. If your game server should report into the player's session, hand it this token and have it send it as `joinToken` when it opens its own session (see the [HTTP API](https://ravensight.io/docs/http-api/)). The SDK never computes a session id itself. ## Signals | Signal | Fires when | | --- | --- | | `session_ready` | A session is open. | | `session_failed(reason: String)` | Opening a session failed: `"invalid_key"` for a refused key, otherwise the server's error code or `"offline"`. Retried for you unless the key was refused. | | `tracking_disabled(source: String)` | `"server"` for the kill switch, `"player"` after an opt-out, `"init"` when `enabled` is `false` or after `set_enabled(false)`. | | `status_changed(reason: String)` | `get_status_reason()` changed. | | `events_flushed(count: int)` | A batch was accepted. `count` is the number sent, which can be more than the server stored: an event timestamped more than 90 days ago is dropped (see [HTTP API](https://ravensight.io/docs/http-api/)). | | `flush_failed(reason: String)` | A batch failed. It is retried for you, except events the server refuses with a 400, or one event refused with a 413, which are dropped. `"event_too_large"` for an event whose data is over 8,192 bytes as JSON, dropped before it was queued. | | `feedback_submitted` | Feedback was accepted. | | `feedback_failed(reason: String)` | Feedback failed: `"disabled"`, `"empty_message"`, `"invalid_category"`, `"invalid_rating"` or `"no_session"` before sending (no request is made), or the server's error code. | | `suggestions_received(suggestions: Array)` | Experimental. Carries the result of `fetch_suggestions()`. | | `event_tracked(event_name: String, data: Dictionary)` | Every time `track_event()` queues an event, with the data actually queued (playtest tags included in a playtest run). Use it to mirror tracked events elsewhere in the running game. | ``` func _ready(): Ravensight.session_ready.connect(func(): print("ready")) Ravensight.session_failed.connect(func(reason): print("session failed: ", reason)) Ravensight.tracking_disabled.connect(func(source): print("tracking off: ", source)) Ravensight.status_changed.connect(func(reason): print("status: ", reason)) Ravensight.events_flushed.connect(func(count): print("sent ", count, " events")) ``` ## Automatic events The SDK sends exactly two events by itself: - **`game_started`**, once per session. It is queued at launch, first in the queue with the launch time, and sent once the kill switch check allows it. It is never queued while the SDK is disabled or the player has opted out; a game enabled later in the run queues it then, once. - **`game_exited`**, once, when the game quits through `Ravensight.quit()`, or through the window close or the Android back button when the SDK handles that quit (`handle_quit`). Losing focus on a desktop is not an exit: it only sends what is queued. **Android and iOS.** Going to the background tries to send what is queued and saves a small marker (`user://ravensight_bg.save`); no event is sent. Back in the foreground within 30 minutes (`session_timeout`), nothing happens. After 30 minutes or more, the old session gets `game_exited` stamped with the moment the app went to the background, and a new session starts with `game_started`. If the player swipes the app away while it is in the background, the next launch sends that `game_exited` from the marker (one attempt, before anything else) and deletes the marker. **Web export.** The browser gives a Godot web game no close notification, so a web build never sends `game_exited`. `game_started` and everything you track are sent as usual. From your own Quit button, call `Ravensight.quit()` instead of `get_tree().quit()`, which quits at once and sends no `game_exited`: ``` func _on_quit_pressed() -> void: Ravensight.quit() ``` ## Startup and failures `get_status_reason()` says why nothing is being sent, and `status_changed` fires when that changes. | Reason | Meaning | | --- | --- | | `""` | Nothing is wrong: a session is open, or opening normally. | | `disabled` | `enabled` is `false`, or the player opted out. | | `invalid_key` | The server refused the ingest key (401, or a 403 that is not one of the codes below). Logged once as `Ravensight: ingest key refused (invalid_key), sending stopped for this run. Check your gt_live_ key.` Nothing more is sent or retried this run; the queued events stay on disk for the next launch. A 401 on a batch is an expired session instead: the SDK opens a new session once, and a second 401 in a row waits for the backoff. | | `tracking_disabled` | The kill switch is off for your game. Nothing more is sent this run; the queued events stay on disk. | | `offline` | No answer (no connection, or no reply within 15 seconds). Retried after 10 seconds, doubling up to 5 minutes, each wait multiplied by a random factor from 0.5 up to 1; events are kept. | | `rate_limited` | The server said slow down (429, or 503 with Retry-After). The SDK waits exactly the Retry-After time. | | `session_failed` | Opening a session failed for another reason (retried with the same backoff), or a playtest token was refused. | | `playtest_job_closed` | The playtest job this run belongs to has closed. Nothing more is sent. | ## Delivery - **Saved queue.** Unsent events are written to `user://ravensight/queue-.json`, one file per ingest key, through a temporary file renamed over the old one. The file is read once when sending starts. At most 500 events are kept across launches, oldest dropped first, and events older than 89 days are dropped when it is read. An event leaves the file only after a 2xx answer, or a 400 that refuses it. `get_delivery_stats()` counts what was let go. - **Device backups.** Godot gives a script no way to keep a file out of Android and iOS backups, so the game does it. The [README](https://github.com/Reality-Software-Entertainment/ravensight-godot) gives the export option and backup rules. Desktop builds need nothing. - **Origin.** Each session's events are saved with that session's `origin`, so events a later launch sends are filed under the session, build and platform they happened in. Timestamps are unix milliseconds, so events in one second keep their order. - **Errors behind gameplay.** Gameplay events, a game's own `track_error` included, go before captured errors, also after the queue is read from disk. A capture evicts only the oldest capture, never a gameplay event, and an error's `rs_trail` is never written to the file. - **Compression and signing.** A request body of 1,024 bytes or more is sent gzip compressed; a 415 is sent once more uncompressed. When the session answer has `signing` ([public keys](https://ravensight.io/docs/public-builds/)), every batch carries `X-Ravensight-Timestamp` and an HMAC-SHA256 `X-Ravensight-Signature`. The secret is never written to disk. - **Refusals.** A 400 naming one event by `index` drops that event and resends the rest. Only `batch_too_large` and 413 halve the batch. Any other 400 drops the request's events, reported on `flush_failed`. ## Kill switch On boot, the SDK calls `GET /api/v1/settings` once with `ingest_key`. If tracking is off for your game, it goes idle for that run: no session is created and nothing is sent, and the `tracking_disabled` signal fires with source `"server"`. A `403 tracking_disabled` from any request has the same effect mid-run. Flip `trackingEnabled` from the dashboard's game settings and it takes effect on the game's next launch, no update required. ## Levels and deaths Ravensight builds the level funnel, per-level deaths and journeys from your event names, with no configuration: names containing `died`, `destroyed` or `killed` count as deaths, `start`, `begin` or `enter` as level starts, and `complet`, `finish`, `win` or `clear` as completions. The `level`, `location` or `track` field says where. To say what an event means instead, set `rs_kind` in its data to `level_start`, `level_complete`, `death` or `none`. It is read before the name, and `none` opts an event out. Keys that start with `rs_` are reserved for Ravensight. ``` Ravensight.track_event("boss_phase_begin", {"level": "castle", "rs_kind": "none"}) Ravensight.track_event("run_over", {"level": "castle", "rs_kind": "death"}) ``` ## Typed events and performance Four helpers send the [typed events](https://ravensight.io/docs/dashboard/#typed-events) without you writing the reserved keys. Each builds the `rs_` properties and calls `track_event()`, so queueing, retries and the player's opt-out are unchanged. Every helper takes an optional last `options` dictionary. | Function | What it does | | --- | --- | | `track_purchase(item_type, item_id, amount, currency, options)` | A purchase. `amount` is whole minor units and the currency is upper-cased. `options` takes `cart` and `transaction_id`. Event name `purchase`. | | `track_resource(flow, resource, amount, options)` | A resource gained (`"source"`) or spent (`"sink"`). `options` takes `item_type` and `item_id`. Event name `resource_source` or `resource_sink`. | | `track_progression(status, p1, options)` | A progression step: `"start"`, `"complete"` or `"fail"`. `options` takes `p2`, `p3` and `score`. Event name `progression_start`, `progression_complete` or `progression_fail`. | | `track_event_at(event_name, position, data)` | An event with a position for [Level heatmaps](https://ravensight.io/docs/dashboard/): `position` is a `Vector2` in your game's units, sent as `rs_x` and `rs_y`. A component that is not finite sends the event without a position. Since 0.6.0. | | `track_error(severity, message, options)` | An error. The message is cut to 200 characters and the stack (`options.stack`) to 2000. Event name `error`. | | `performance` option | Off by default. When on, the SDK samples the frame rate once a second and sends one `health` event per session, on background (Android, iOS), page hide (web) or quit (desktop). | `options.data` adds your own properties (the reserved keys win if they clash) and `options.event_name` replaces the default event name. The helpers never throw: a wrong value becomes an event the server flags. ## Player privacy The device id is 16 random bytes from the operating system's secure random source, as hex, plus the OS name, generated on first run and saved in `user://`. `set_tracking_enabled()` writes the choice at once and can be called at any time, even from an autoload that runs before Ravensight's `_ready()`, or while `enabled` is `false`. A saved opt-out wins over `enabled = true`: on the next launch nothing is sent, not even the kill switch check. Turning it off drops the queue and deletes the saved queue file. `reset_device_id()` saves a new random id, drops the queue (and its file), the session and the attribution flag, and returns the new id. In a playtest run both do nothing but print one line. ## Telling players You do not need a permission prompt, but saying what the game sends is good manners. A paragraph your game can show, in a settings screen or on its store page: This game sends anonymous gameplay events (what happens in the game, never who you are) to Ravensight so we can improve it. You can turn this off in Settings at any time. And the toggle behind "turn this off": ``` # an "Analytics" switch in your settings screen func _on_analytics_toggled(on: bool) -> void: Ravensight.set_tracking_enabled(on) # remembered across launches # a "Forget me" button: a fresh random identity from now on func _on_forget_me_pressed() -> void: Ravensight.reset_device_id() ``` ## Player Reports Add an optional in-game form that captures the current game screen, lets players highlight or hide an area, and sends a short message. Bind the reporting action to a key, controller input or pause-menu button. The dashboard groups reports into issues and tracks fixes through verification. Download [Ravensight.gd](https://ravensight.io/sdk/godot/Ravensight.gd), [RavensightReports.gd](https://ravensight.io/sdk/godot/RavensightReports.gd) and [RavensightReportOverlay.gd](https://ravensight.io/sdk/godot/RavensightReportOverlay.gd). Add the latter two as children of the Ravensight autoload, named RavensightReports and ReportOverlay. Bind `ravensight_report` in Input Map. The overlay captures only the game viewport and never pauses multiplayer. Reports draw from your included events and prepaid balance automatically. A text report counts as 1 event on the event meter; a screenshot adds 20,000 events to the meter, covering processing, storage and delivery. There is no separate screenshot budget to configure. Failed or canceled uploads release their reserved usage. Retention and file limits are listed in Settings. Text-only reporting remains available if capture or upload fails. Screenshots are not automatically sent to AI providers. Source: https://ravensight.io/docs/godot-sdk/ Last updated: 2026-11-19 --- # The ravensight package for browser games and Node One zero-dependency client for browser games and Node 18 or newer, shipped as both ESM and CommonJS. It owns sessions, batching, the offline queue, rate limits and the server-side kill switch, so your game code calls `init()` once and `track()` from then on. Code samples scroll horizontally when needed. Focus a sample and use the arrow keys, or swipe to read a long line. ## Install ``` npm install ravensight ``` There is no build step for consumers. It suits Phaser, PixiJS, three.js, Excalibur and hand-written canvas games. Godot HTML5 exports use the [Godot SDK](https://ravensight.io/docs/godot-sdk/) instead. ## Quickstart ``` import Ravensight from 'ravensight'; const rs = new Ravensight({ ingestKey: 'gt_pub_your_public_key', gameVersion: '1.4.0', }); // Reads the server kill switch and opens a session. Call it once at startup. await rs.init(); rs.track('level_completed', { level: 3, deaths: 2, seconds: 91 }); // Optional: player feedback from an in-game form. await rs.submitFeedback('The boss fight is too long', 'suggestion', 4); ``` A key in a web page is public, because anyone can read it from the page: in a browser use a public key (`gt_pub_`) with an event allowlist and a monthly ceiling, and keep `gt_live_` keys on your own server, such as a Node process. See [Public builds](https://ravensight.io/docs/public-builds/). In a browser the SDK sends `game_started` and `game_exited` for you; pass `autoEvents: false` to send your own. If your game shares a site with public pages, create the client only inside the game, never at app start: a client created on a landing page counts every visitor as a player. See [Web games: your website and your game](https://ravensight.io/docs/web-games/). In CommonJS, use `const Ravensight = require('ravensight');`. Events go out in batches on a timer and when the page is hidden, so you never have to call `flush()` yourself. A Node process should `await rs.dispose()` before it exits, so the last batch goes out. ## Options Pass these to `new Ravensight(options)`. | Option | Default | Notes | | --- | --- | --- | | `ingestKey` | required | Your game's key: a public key (`gt_pub_...`) in a web page, a `gt_live_...` key only on a server. See [Public builds](https://ravensight.io/docs/public-builds/). | | `apiUrl` | `https://api.ravensight.io/api/v1` | `/api/v1` is appended if you leave it off. | | `gameVersion` | `'1.0.0'` | Reported with the session. | | `platform` | auto | `'web'` in a browser, `node-` in Node. | | `autoFlushMs` | `15000` | Flush interval. `0` flushes only on demand. | | `maxQueueSize` | `500` | Offline queue cap. The oldest events are dropped first. | | `persistQueue` | `true` | Keep the queue across a reload, a crash or a lost network: one `localStorage` entry per ingest key in a browser, one file per key in Node. `false` keeps it in memory only. | | `queueDir` | `~/.ravensight` | Node only: the folder the queue file is written to. | | `maxSessions` | `64` | Sessions cached at once, one per device id. The least recently used is dropped first, never the current id, and reopens on that device's next event. | | `storage` | auto | Anything with `getItem` and `setItem`. Holds the device id. | | `deviceId` | auto | Overrides the generated device id. | | `enabled` | `true` | Pass `false` to start opted out. | | `autoEvents` | `true` | Send `game_started` and `game_exited` for you, in a browser only. A client that starts with `enabled: false` sends neither. | | `fetch` | global | Inject a custom fetch. | | `debug` | `false` | Logs SDK activity to the console, and warns about reserved `rs_` keys. | | `performance` | `false` | Sample the frame rate and send one `health` event per session on page hide. Browser only. See [typed events](https://ravensight.io/docs/dashboard/#typed-events). | ## Methods | Method | Description | | --- | --- | | `await rs.init()` | Reads the kill switch from `GET /api/v1/settings`, then opens a session. Resolves with `{ trackingEnabled, sessionReady, reason }` and never throws on a network failure. `reason` is `null` when the session is ready, otherwise one of the values in the table below. If tracking is off for your game, nothing further is sent. | | `rs.track(event, data?, { deviceId }?)` | Queues an event and records its timestamp at the moment of the call. Safe before `init()`. Returns `false` when tracking is off. `deviceId` sends this one event as another device, under that id's own session, so one Node client can serve many players. It must be a non-empty string or `track()` throws a `TypeError`. | | `rs.trackPurchase({ amount, currency, itemType, itemId, cart?, transactionId?, data?, event? })` | A typed purchase. `amount` is whole minor units, an integer or a digit string, and the currency is upper-cased. Event name `purchase`. Returns what `track()` returns. | | `rs.trackResource({ flow, resource, amount, itemType?, itemId?, data?, event? })` | A resource gained (`'source'`) or spent (`'sink'`). Event name `resource_source` or `resource_sink`. | | `rs.trackProgression({ status, p1, p2?, p3?, score?, data?, event? })` | A progression step: `'start'`, `'complete'` or `'fail'`. Event name `progression_start`, `progression_complete` or `progression_fail`. | | `rs.trackAt(event, { x, y }, data?, { deviceId }?)` | An event with a position for [Level heatmaps](https://ravensight.io/docs/dashboard/): sets `rs_x` and `rs_y` from `x` and `y` in your game's units, then sends it like `track`. A coordinate that is not a finite number sends the event without a position. Since 0.11.0. | | `rs.trackError({ severity, message, stack?, data?, event? })` | An error. `severity` is `'debug'`, `'info'`, `'warning'`, `'error'` or `'critical'`; the message is cut to 200 characters and the stack to 2000. Event name `error`. | | `rs.trackAd(network, format, result, { placement, revenueMicros, currency }?)` | An [`ad` typed event](https://ravensight.io/docs/dashboard/#typed-events). Revenue is a digit string of whole micros, sent only with `shown` and always with a currency. Returns `false` and sends nothing for a value the server would flag. | | `rs.trackAdRevenue(network, format, placement, revenueMicros, currency)` | A paid impression. `microsFromDecimalString('0.0015')` and `microsFromRevenue(0.0015)` both give `"1500"` without multiplying a float; `adFormatFrom` maps a mediation format name. | | `rs.setAttribution({ source, network, campaign, adset, creative, touchTime })` | One `attribution` event per device id; every later call returns `false`, across restarts. In a browser the SDK sends one for you on the first load of a new device id when the landing URL has a UTM parameter. | | `await rs.flush()` | Sends what is queued now and resolves with `{ sent, queued }`. Concurrent calls are safe. It cuts a backoff wait short, never a server `Retry-After`. | | `await rs.submitFeedback(message, category?, rating?)` | Sends player feedback. `category` is one of the values below, exported as `FEEDBACK_CATEGORIES`. `rating` is an integer from 1 to 5. Leave either out with `undefined`, `null` or an empty string. Anything else is invalid and throws before any request is made, with code `invalid_category` or `invalid_rating`; an empty message throws `empty_message`. | | `rs.setEnabled(bool)` | Local opt in and opt out. `false` stops sending and clears anything queued. The SDK does not store the choice: keep it in your own settings and call this before the first event on every launch. | | `await rs.setDeviceId(id)` | Changes the device id, for example after a player signs in on a shared machine. The switch is immediate: nothing is flushed or waited for. The new id is stored and its session opens on the next flush. Events already queued keep the id they were tracked under and go out under that id's own session, so nothing is ever sent under the wrong id. Resolves with `{ previousId, queuedUnderPreviousId }`. Setting the current id again changes nothing. | | `await rs.resetDeviceId()` | The same with a fresh random id, which it resolves with. Use it for a reset analytics id button. | | `rs.joinSession(token, { deviceId }?)` | Joins a session opened elsewhere, normally the browser's `rs.sessionToken`, so the next session opened for `deviceId` (default: the client's own id) shares its analytics session. Any session already cached for that id is dropped, and the token is used once. See Joining the browser's session below. | | `await rs.dispose({ flush = true, timeoutMs = 2000 })` | Shuts the client down and resolves with `{ sent, dropped, kept }`. The timer and page listeners stop at once and `track()` returns `false` from that moment. The queue is then flushed by default, bounded by `timeoutMs`, even if `init()` was never called; in a browser, whatever is still queued after that goes out in one last keepalive or beacon request. With the persisted queue on, anything left stays stored for the next launch and is counted as `kept`; with `persistQueue: false` it is counted as dropped. Events in a request that timed out are counted as dropped, even if it later lands. Pass `{ flush: false }` to discard the queue. After dispose, `setDeviceId()` and `resetDeviceId()` reject with code `disposed`. | | `await rs.fetchSuggestions()` | Experimental. The AI-generated design suggestions for your game, empty until a weekly digest has run. The shape may change, so do not build game logic on it. | ## Why a session is not ready | Reason | Meaning | | --- | --- | | `invalid_key` | The key was refused (`401`, or a `403` other than the kill switch) by the settings check or `POST /session`. The run ends, because a retry cannot fix a revoked, rotated or wrong key: the queue is cleared, the timer stops, `track()` returns `false`, and `init()` and `flush()` do not try the key again. It warns once on the console. | | `tracking_disabled` | Tracking is switched off for this game. Nothing is sent. | | `disabled` | The client is opted out (`enabled: false` or `setEnabled(false)`). `init()` makes no network call. Call `setEnabled(true)` and then `init()` to start. | | `offline` | No answer from the network. Retried with backoff. | | `rate_limited` | `429`. Retried after `Retry-After`. | | `session_failed` | Any other answer. Retried with backoff. | `rs.stats.lastError` holds the last failed request as `{ code, status, at }`, from the session, settings or batch requests, or `null`. Read it when events are not arriving. It can show `session_expired` after a routine `401` the SDK has already recovered from, so read it together with whether the queue is draining. ## Feedback categories | Category | Use it for | | --- | --- | | `bug` | Something is broken. | | `suggestion` | An idea or a change the player wants. | | `complaint` | Something the player dislikes. | | `praise` | Something the player enjoyed. | | `playtest` | Notes from a playtest session. | | `other` | Anything else. | ## How delivery works - **Batches of 50.** The server's limit per request. A flush keeps sending batches until the queue drains. - **Persisted queue.** On by default. In a browser the queue lives in one `localStorage` entry per ingest key; in Node it is one file per key under `~/.ravensight` (or `queueDir`), written through a temporary file and a rename. It is read back once at start. At most 500 events are kept, the oldest go first, and anything older than 89 days is dropped at start. Two tabs of the same game share one entry, so the last tab to write wins. - **Removed only once delivered.** An event leaves the queue only after a `2xx`, or a `400` that names it by `index`. Each event remembers the `origin` of the session it was tracked under, so an event sent on a later launch is stored under the session, build and platform it happened in. Timestamps are unix milliseconds of the moment it was tracked. - **Errors behind gameplay.** Gameplay events go ahead of queued automatic error captures. In a full queue an incoming capture evicts the oldest capture, or is dropped, and never evicts gameplay. `rs_trail` is never written to storage, and `resetDeviceId()` and an opt-out delete persisted captures. - **One device per batch.** Each request carries the leading run of queued events that share one device id, under that id's own session, then the next run. - **Answers.** A `400` with `index` drops that event and resends the rest; `400 batch_too_large` halves the batch; any other `400` drops the request's events. A `401` opens one new session for that device and resends; a second `401` in a row waits for the backoff. A `403` on a batch keeps the events and stops sending until the next launch. `413` splits the batch, `415` resends once uncompressed, and `429`, or `503` with `Retry-After`, waits exactly the server's time. - **Backoff.** From 10 seconds, doubling to 5 minutes, each wait multiplied by a random factor between 0.5 and 1. `flush()` cuts a backoff short; nothing cuts a `Retry-After` short. - **Compression and signing.** A request body of 1,024 bytes or more is sent gzip compressed; page-hide sends never are. When `POST /session` answers with `signing` ([public keys](https://ravensight.io/docs/public-builds/)), every batch carries `X-Ravensight-Timestamp` and `X-Ravensight-Signature`, an HMAC-SHA256 over the uncompressed body. The secret is kept in memory only; a beacon carries a signed body envelope instead. - **Page hide.** When the page goes hidden the SDK sends one last batch, preferring `fetch` with `keepalive`. Where that is unavailable it falls back to `navigator.sendBeacon`, which cannot set headers, so the session token travels in the JSON body as `sessionToken`, never in the URL. Those events stay in the persisted queue marked unconfirmed; the next launch resends them if it comes within 23 hours, inside the server's 24 hour duplicate window. - **No re-send while in flight.** The SDK never sends a batch again while it is still in flight, so a batch cut off by a real page unload can be lost rather than counted twice. A batch whose response is lost, from a network error or a 5xx after the server already stored it, can be sent again on the next flush, and ingest does not remove duplicates. Session creation and tracked events are rate limited per game, not per client. See [Usage, billing and limits](https://ravensight.io/docs/limits/). ## What the dashboard reads The dashboard gives meaning to some fields and event names. Name your events with these in mind. - **One place per event.** `level`, `location` and `track` in the event data fold into one place, and the first non-empty one wins, in that order. The level funnel, per-level deaths and journeys only see events that have a place. - **Event names.** A name containing `start`, `begin` or `enter` is a level start; `complet`, `finish`, `win` or `clear` is a completion; `died`, `destroyed` or `killed` is a death. These are lowercase substring matches. - **`rs_kind` overrides the name.** Set `rs_kind` in the event data to `level_start`, `level_complete`, `death` or `none` and it is read before the name. `none` opts an event out, so `checkout_started` is not a level start. An unknown value falls through to the name match. Keys that start with `rs_` are reserved for Ravensight. The SDK exports the four values as `RS_KINDS`, and with `debug: true` it warns once per event and key about an `rs_kind` outside that list or an `rs_` key Ravensight does not read. It never throws and still sends the event. The server counts the same two mistakes on the Implementation health card. - **Potentially stuck** is one event repeated 10 or more times at the same level in a session of fewer than 20 events. The same event at a new level each time is movement, not stuck. Events with no place are grouped together, so ten repeats of a placeless event in a short session count; send a place or accept it. ``` rs.track('boss_phase_begin', { level: 'castle', rs_kind: 'none' }); rs.track('run_over', { level: 'castle', rs_kind: 'death' }); ``` The full rules, including the player flags, are in [how the built-in detections read your events](https://ravensight.io/docs/dashboard/#detection-rules). ## Node servers with many players The server takes the device id from the session, so every device needs its own session. The SDK keeps one per device id for you. On a game server, create one client and pass each player's id as the third argument to `track()`: a pseudonymous id your game generates, never an email or account name. Node has no `localStorage`, so pass an explicit `MemoryStorage` to keep the server's own id out of any shared storage. ``` import Ravensight, { MemoryStorage } from 'ravensight'; const rs = new Ravensight({ ingestKey: process.env.RAVENSIGHT_KEY, gameVersion: '1.4.0', platform: 'dedicated-server', storage: new MemoryStorage(), }); await rs.init(); function onMatchFinished(player, match) { rs.track('match_finished', { mode: match.mode, seconds: match.seconds }, { deviceId: player.analyticsId }); } // On shutdown, the last flush for every player at once. process.on('SIGTERM', async () => { await rs.dispose({ timeoutMs: 5000 }); process.exit(0); }); ``` - **One request is one device.** A flush sends the run of queued events that share the device id at the head of the queue, up to 50, then the next run. Interleaved players cost more requests than one player, but nothing is ever sent under the wrong id. - **Sessions are cached per id**, up to `maxSessions`. Past that the least recently used is dropped and reopens on that player's next event. Raise it if more players than that are active at once. - **Limits are per game, shared by every player** on the client: 60 session creations and 600 tracked events a minute. A burst past that gets a `429`, and the SDK holds the events and retries. See [Usage, billing and limits](https://ravensight.io/docs/limits/). - **`dispose()` is the last flush.** Call it on shutdown. Anything it cannot send inside `timeoutMs` stays in the queue file for the next start and is counted as `kept`, or as dropped with `persistQueue: false`. ## Joining the browser's session When the same player also runs the browser SDK, the browser can hand its session to your server, so server-side events land in the same analytics session as the player's own, under the browser's device id. ``` // Browser: send the token to your server with your own request. await fetch('/api/link-analytics', { method: 'POST', body: JSON.stringify({ rsToken: rs.sessionToken }), }); // Server: one call per player, before that player's next event. rs.joinSession(body.rsToken, { deviceId: player.analyticsId }); rs.track('purchase_verified', { sku: 'gold_pack' }, { deviceId: player.analyticsId }); ``` The next session opened for that id sends the token once as `joinToken`. The server answers with a session of its own that shares the browser's session id and device id, and never lives longer than the browser's. The local id is only the key the SDK caches that session under. If the server refuses the token, the SDK opens a plain session instead and records `invalid_join_token` in `stats.lastError`. Only a live session of the same game can be joined. A join from a playtest session stays synthetic, so the game server's events are marked as the playtest's too. ## Campaign links A [campaign link](https://ravensight.io/docs/campaign-links/) that points at a web page adds `rs_link` to the address. From 0.8.0, the SDK reads it from `location.search` once, when it starts, and sends it with the first session it opens, so the Campaign links page can count the players and sessions each link brought. There is nothing to call. Later sessions do not send it, nothing is stored, the page address is left as it is, and consent applies as to everything else. Outside a web page (a desktop or mobile app built on the SDK), read `rs_link` from the address your deep link, universal link or App Link handler received and pass it to `rs.setCampaignLink(id)` (0.12.0 or later). It returns `true` for a link id and sends it with the next session, once, the same way; anything else returns `false` and changes nothing. See [Campaign links](https://ravensight.io/docs/campaign-links/#campaign-links-players). ## Privacy The SDK generates a random device id and stores it under `ravensight_device_id`. It collects no hardware identifier, advertising id or personal data, only the events you send. If you pass your own `deviceId`, as on a server, make it a pseudonymous player id your game generates, never an email or account name. The row by row answers for the App Store and Google Play forms are in [what your privacy label can say](https://ravensight.io/docs/platform-support/#privacy-label). Source: https://ravensight.io/docs/javascript-sdk/ Last updated: 2026-11-19 --- # Web games: your website and your game A browser game usually shares a domain with its own website: a landing page, a pricing page, a sign in page, then the game. If the game SDK starts on every page, every visitor opens a game session and counts as a player, and your player numbers stop meaning players. Keep the two apart: the website tracker on your site, the game SDK inside your game. ## Two trackers, two jobs Ravensight has two separate ways to measure a web game, each with its own key, and they are meant to run on different pages. | Where | Use | Key | What it counts | | --- | --- | --- | --- | | Public pages: landing, marketing, pricing, blog | The [website tracker](https://ravensight.io/docs/websites/), `createSiteTracker()` | Your website key, `gt_site_...` | Visitors, page views, sources and goals, with no player identity | | Inside the game, for a player who is playing | The [game SDK](https://ravensight.io/docs/javascript-sdk/), `new Ravensight()` | Your game's public key, `gt_pub_...` | Players, sessions, retention, funnels and everything else on the dashboard | A key shipped in a web page is public, because anyone can read it from the page: use a public key with an event allowlist and a monthly ceiling, and keep `gt_live_` keys on your own server. See [Public builds](https://ravensight.io/docs/public-builds/). In a browser the game SDK sends `game_started` as soon as the client is created and `game_exited` when the page is hidden. That is right inside a game and wrong on a landing page: a visitor who reads one page and leaves becomes a player with a two event session. Two of our own web games did exactly this: over 30 days, more than 80% of their new players were really website visitors. ## Start the game SDK only inside the game In a single page app, decide on every route change which tracker runs. Create the game client the first time a signed in player reaches a game route, never at app start and never on a public route. Run the website tracker on public routes and destroy it before a game route. Leaving the game for a public page keeps the game client, so the player's session carries on when they come back. ``` import Ravensight, { createSiteTracker } from 'ravensight'; let site = null; // the website tracker, public pages only let game = null; // the game SDK, created once, inside the game only // Your own rule for which routes are the game. const isGameRoute = (path) => path === '/play' || path.startsWith('/play/'); // Call this from your router after every completed navigation. export async function onRoute(path, account) { if (isGameRoute(path) && account) { if (site) { site.destroy(); site = null; } if (!game) { game = new Ravensight({ ingestKey: 'gt_pub_your_public_key', gameVersion: '1.4.0' }); await game.init(); } // A random id stored with the account, never a sequential one: see below. await game.identify(account.analyticsId); } else if (!isGameRoute(path) && !site) { site = createSiteTracker({ key: 'gt_site_your_website_key' }); } } ``` - **Never create the game client to "warm it up".** Creating it is what sends `game_started`, so a client built at app start counts the visitor even if nothing else is tracked. - **Drop gameplay events from public pages.** If shared code tracks an event before the game client exists, discard it instead of queueing it for later: a queued visitor event would be sent under the next player. - **Your sign in, sign up and account pages are public pages** for this purpose. The website tracker already leaves out sign in, account and receipt routes on its own; see [Connect a website](https://ravensight.io/docs/websites/#websites-setup) for its consent and excluded path options. - **A game with no public pages** (the page is the game, as in a typical HTML5 export) needs none of this: create the client when the game starts. ## Identify on sign in, reset on sign out A browser does not know who is playing, so without help the same person on a phone and a laptop counts twice, and two people on one browser count once. If your game has its own accounts, tell the SDK who signed in. This needs version 0.12.0 or later of the [ravensight package](https://www.npmjs.com/package/ravensight). ``` // After your own sign in succeeds, and at boot when a session is already signed in. // analyticsId: a random UUID made once per account and stored with it. await game.identify(account.analyticsId); // When the player signs out. await game.resetIdentity(); ``` - **Pass a random, high-entropy id**, such as a random UUID or a random analytics id you make once for each account and store with it. Never pass a sequential database key, an email, a name or a handle: your game's salt reaches every browser that plays it, so anyone could hash 1, 2, 3 and onward and match a guessable id, while a random one cannot be guessed. A value containing `@`, an empty value and a value over 256 bytes are refused, and `identify` rejects with a `TypeError`, so await it or catch it. - **Only a salted hash leaves the browser.** The SDK hashes the id with your game's own salt and sends the hash once per session. The raw id is never sent or stored. The hash still identifies one player across sessions, so it is a pseudonymous identifier: declare it in your game's privacy notice. - **Each identified session uses one event** from your included allowance, then from your prepaid balance. The same account again in the same session sends nothing and uses nothing. With an empty balance the request is refused, costs nothing, and is tried again at the next session. - **`resetIdentity()` also switches the browser to a fresh device id**, so the next person on that browser is not linked to the last one. Every Ravensight SDK has the same pair of calls under its own language's spelling; see the page for your engine. ## How Ravensight tells you The Data quality card on your game's Health page, and `visitorSessions` in the [`get_data_quality`](https://ravensight.io/docs/mcp/#get-data-quality-game-id-from-to) tool, check for this on every web game. They look at the devices first seen in the selected range (30 days by default) that sent a web event, real players only, and count how many never sent more than 3 events in any session: a session start and very little else. Events your game server sends into the browser's session count toward that session. - **Flagged** when we are 95% sure at least 60% of those devices did nothing past a session start. The card shows a warning with the fix and a link to this page. - **Clear** below that. A game where even half its new players leave at once stays clear. - **Too few to read** with fewer than 10 new web devices. Players who open your game and leave at once look the same as visitors, so a flag means "check where your site starts the SDK", not proof. After you fix it, the check reads only devices first seen since then, so it clears as the range moves past the fix; choose a shorter range on the Health page to see it sooner. Events already stored are not rewritten, so earlier visitors stay in your history. To check by hand, open a public page in a private window with your browser's network panel open. Nothing should go to the `/session` endpoint and no `game_started` event should be sent until you sign in and open the game. Source: https://ravensight.io/docs/web-games/ Last updated: 2026-11-19 --- # The ravensight folder for LÖVE games Pure Lua for LÖVE 11.x and 12.x on Windows, macOS and Linux. It owns the device id, sessions, batching, retries and the offline queue, and it sends requests from a background thread, so a slow network never costs a frame. There are no native files to bundle, sign or notarize. Code samples scroll horizontally when needed. Focus a sample and use the arrow keys, or swipe to read a long line. ## Install Copy the `ravensight` folder from [ravensight-love](https://github.com/Reality-Software-Entertainment/ravensight-love) into your game, next to `main.lua`. It can live in a subfolder too (`lib/ravensight`); require it by that path. The same files are published here: [init.lua](https://ravensight.io/sdk/love/init.lua), [core.lua](https://ravensight.io/sdk/love/core.lua), [config.lua](https://ravensight.io/sdk/love/config.lua), [errors.lua](https://ravensight.io/sdk/love/errors.lua), [hmac.lua](https://ravensight.io/sdk/love/hmac.lua), [json.lua](https://ravensight.io/sdk/love/json.lua), [reports.lua](https://ravensight.io/sdk/love/reports.lua), [transport.lua](https://ravensight.io/sdk/love/transport.lua), [typed.lua](https://ravensight.io/sdk/love/typed.lua), [web.lua](https://ravensight.io/sdk/love/web.lua) and [worker.lua](https://ravensight.io/sdk/love/worker.lua), the love.js bridge [ravensight-love-bridge.js](https://ravensight.io/sdk/love/ravensight-love-bridge.js) (only for a web build, it goes on the page, not in the game), the [README](https://ravensight.io/sdk/love/README.md) and the [MIT license](https://ravensight.io/sdk/love/LICENSE). ``` my-game/ main.lua conf.lua ravensight/ init.lua core.lua config.lua errors.lua hmac.lua json.lua reports.lua transport.lua typed.lua web.lua worker.lua ``` Set an identity in `conf.lua`, so the SDK has a save folder for its device id: ``` function love.conf(t) t.identity = "my-game" end ``` ## Use ``` local ravensight = require("ravensight") function love.load() ravensight.init({ apiUrl = "https://api.ravensight.io", ingestKey = "gt_live_...", -- from your game's page in the dashboard gameVersion = "1.0.0", }) end function love.update(dt) ravensight.update(dt) end function love.quit() return ravensight.quit() end -- anywhere in your game ravensight.track("level_start", { level = "forest_1" }) ravensight.track("level_complete", { level = "forest_1", seconds = 74, deaths = 2 }) ``` `game_started` is sent for you on launch and `game_exited` on quit. `ravensight.quit()` returns `true` the first time, which tells LÖVE to wait while the last events are sent; the SDK quits again by itself once they are answered, or after 1.5 seconds. If your game already has a `love.quit`, return its answer from your own handler, or pass `handleQuit = false` so the SDK never delays a quit. ``` function love.quit() if not saveGame() then return true end return ravensight.quit() end ``` ## Options Pass these to `ravensight.init(options)`. | Option | Default | Notes | | --- | --- | --- | | `ingestKey` | required | Your game's ingest key. It ships in your build and is not a secret. For a web build, a demo or an open-source game, use a public key (`gt_pub_`); keep live keys on your own server when possible. See [Public builds](https://ravensight.io/docs/public-builds/). | | `apiUrl` | `https://api.ravensight.io` | With or without `/api/v1`. | | `gameVersion` | `1.0.0` | Sent with every session. | | `enabled` | `true` | `false` sends and queues nothing for this run, and is not saved. The player's opt out is `setTrackingEnabled`. | | `maxQueueSize` | `500` | Unsent events kept. The oldest are dropped first. | | `flushInterval` | `2` | Seconds an event waits so it can go out with others. 50 waiting events go at once. | | `handleQuit` | `true` | Hold the quit up to 1.5 seconds to send the last events. | | `transport` | automatic | `"https"`, `"winhttp"`, `"libcurl"` or `"curl"` to try first, or `"web"` for the love.js bridge (chosen for you in a web build). | | `timeout` | `15` | Seconds per request. | | `debug` | `false` | Print informational messages too. Warnings always print. | | `performance` | `false` | Sample the frame rate once a second and send one `health` event per session, on quit. Call `update(dt)` every frame. See [typed events](https://ravensight.io/docs/dashboard/#typed-events). | ## Functions | Function | What it does | | --- | --- | | `track(name, data)` | Queue an event. `data` is a flat table of strings, numbers and booleans. Safe before the session is ready. | | `purchase(amount, currency, itemType, itemId, opts)` | A typed purchase. `amount` is whole minor units and the currency is upper-cased. `opts` takes `cart`, `transactionId`, `props` and `name`. | | `resource(flow, resource, amount, opts)` | A resource entering (`"source"`) or leaving (`"sink"`) the economy. `opts` takes `itemType` and `itemId`. | | `progression(status, p1, opts)` | A progression step: `"start"`, `"complete"` or `"fail"`. `opts` takes `p2`, `p3` and `score`. | | `error(severity, message, opts)` | An error or warning, with an optional `opts.stack`. The message is cut to 200 characters and the stack to 2000. | | `trackAd(network, format, result, opts)` | An [`ad` typed event](https://ravensight.io/docs/dashboard/#typed-events). Returns `true`, or `false` and the reason when a field is malformed (nothing is sent). | | `trackAdRevenue(network, format, placement, revenueMicros, currency, opts)` | A paid impression (result `shown`). | | `microsFromDecimalString(text)`, `microsFromRevenue(number)` | Revenue in micros as a digit string, without multiplying a float. | | `setAttribution(attribution)` | Where this install was acquired, sent once per install. | | `getDeliveryStats()` | Desktop: events let go of since launch, `dropped_overflow`, `dropped_too_old` and `dropped_refused`. | | `flush()` | Send what is queued now. It cuts a backoff wait short, never a server Retry-After. | | `submitFeedback(message, category, rating)` | Send player feedback. `category` and `rating` (1 to 5) are optional. Needs an open session. | | `setTrackingEnabled(enabled)` | The player's opt-out, remembered across launches. `false` drops the queue and sends nothing, not even the startup check. | | `isTrackingEnabled()` | `false` when the player opted out or tracking is switched off for your game. | | `resetDeviceId()` | Start a fresh analytics identity for this install. | | `getDeviceId()` | This install's random id. | | `getTransport()` | How requests are sent here, or `nil` if nothing works. | | `on(event, fn)` | Listen for an SDK event. Returns a function that stops listening. | | `update(dt)` | Call every frame. Delivers answers and runs retries. | | `quit()` | Return it from `love.quit`. | ## Events | Event | Arguments | When | | --- | --- | --- | | `session_ready` | none | A session is open. | | `session_failed` | `reason` | Opening a session failed. It is retried for you. | | `tracking_disabled` | `source` | `"server"` when tracking is switched off for your game, `"player"` after an opt-out. | | `events_flushed` | `count` | A batch was accepted. | | `flush_failed` | `reason` | A batch failed. It is retried for you. `"event_too_large"`: one event's data was over 8,192 bytes as JSON and the event was dropped, not retried. | | `feedback_submitted` | none | Feedback was accepted. | | `feedback_failed` | `reason` | Feedback failed, including `"no_session"` when sent too early. | | `event_tracked` | `name, data` | Every queued event, with the data actually queued. | ``` ravensight.on("tracking_disabled", function(source) print("analytics off:", source) end) ``` ## How requests are sent LÖVE 11 has no built-in HTTPS, and the API only accepts HTTPS, so the SDK uses the first of these that works. Nothing native is bundled. 1. **`require("https")`**: built into LÖVE 12, or the lua-https library if you added it to an 11.x game. 2. **WinHTTP** on Windows, the HTTP library every Windows version ships, called through LuaJIT's FFI. 3. **libcurl** on macOS and Linux, the system's own copy, through the FFI. 4. **The `curl` command** on macOS and Linux, if libcurl would not load. If none of them works, the SDK prints one warning, keeps events queued, saves them when the game quits and tries again next launch. `getTransport()` tells you which one is in use. The libcurl and `curl` paths have been run against the live API on macOS. The WinHTTP path and Linux are written but not yet verified in a shipped build. ## Delivery On the desktop; a love.js build delivers through the page's JavaScript SDK. - **Batches of 50.** Up to 50 events per request. - **Saved queue.** Unsent events are written to `ravensight/queue-.json` in the save folder, one file per ingest key, whenever the queue changes, through a temporary file renamed over the old one. At most 500 events are kept, oldest dropped first, and events older than 89 days are dropped when it is read. An event leaves the file only after a 2xx answer, or a 400 that refuses it. The 0.5 `ravensight_queue.json` is read once and removed. - **Device backups.** On macOS the SDK excludes the file from Time Machine itself. On Android and iOS the game does it; the [README](https://github.com/Reality-Software-Entertainment/ravensight-love) says how. - **Origin.** Each session's events are saved with that session's `origin`, so a later launch sends them under the session, build and platform they happened in. Timestamps are unix milliseconds. - **Errors behind gameplay.** Gameplay events, a game's own `error()` included, go before captured errors. A capture evicts only the oldest capture, never a gameplay event, and an error's `rs_trail` is never written to the file. - **Compression and signing.** A request body of 1,024 bytes or more is sent gzip compressed; a 415 is sent once more uncompressed. When the session answer has `signing` ([public keys](https://ravensight.io/docs/public-builds/)), every batch carries `X-Ravensight-Timestamp` and an HMAC-SHA256 `X-Ravensight-Signature`, computed in `hmac.lua`. The secret stays in memory. - **Backoff.** A failed request is retried after 10 seconds, doubling up to 5 minutes, each wait multiplied by a random factor from 0.5 up to 1. A `429`, or a `503` with `Retry-After`, waits exactly the server's time. A batch `401` opens a new session once, then waits for the backoff. - **Refusals.** A `400` naming one event by `index` drops that event and resends the rest. Only `batch_too_large` and `413` halve the batch. Any other `400` drops the request's events. An event whose data is over 8,192 bytes as JSON is dropped before it is queued. - **Refused key and kill switch.** Either stops the SDK for the rest of the run; the queued events stay on disk for the next launch. Turning tracking off as the player, or `resetDeviceId()`, deletes the saved queue. ## Privacy and the opt-out The SDK generates a random device id per install: 32 hex characters, a dash and the OS name, from the operating system's random source on first launch, saved in your game's save folder. It is not derived from hardware or an account, and `resetDeviceId()` replaces it. Each event carries a timestamp, your game version and the OS. There is no advertising identifier, and no field for names, emails or accounts, so a game using it needs no tracking permission prompt. The row by row store answers are in [what your privacy label can say](https://ravensight.io/docs/platform-support/#privacy-label). Ravensight ships no consent screen. If your game shows one, wire it to `setTrackingEnabled(false)`, which is saved and holds across launches, and `resetDeviceId()`. ## Public builds For a demo, a web build or an open-source game, ship a [public key](https://ravensight.io/docs/public-builds/) with ravensight-love 0.3.0 or later. Without a key, `init` is inert: it writes no files, makes no requests, and `ravensight.enabled()` returns `false`; pass `optional = true` to silence its one warning. With `consent = "opt_in"` nothing happens, no device id, no queue and no settings call, until the player turns analytics on with `setTrackingEnabled(true)`, and that choice is saved. The `distribution` option is sent on the session, and every event carries an `rs_event_id` so a resend is never stored twice. A `401` or `403` on the settings check or the session stops the run instead of retrying a revoked key. On the web, `installRavensightBridge(null, Module)` installs a sink for a page with no key: the game's tagged lines are swallowed and the game never knows, and the bridge's opt-in check defaults to off when storage is missing or blocked. Keep the key out of your repository. A tracked example file with placeholders sits beside an untracked config file that your ignore list excludes; your release job writes the real config from a CI secret when it builds a release. A clone or a fork has only the example, so its builds run with analytics off. ``` -- analytics.config.example.lua (tracked) return { ingestKey = "", -- written by the release job, never committed distribution = "native-dev", } -- main.lua: analytics.config.lua is untracked, and absent in a clone local file = "analytics.config.lua" local config = love.filesystem.getInfo(file) and love.filesystem.load(file)() or {} ravensight.init({ ingestKey = config.ingestKey ~= "" and config.ingestKey or nil, distribution = config.distribution or "native-dev", optional = true, consent = "opt_in", gameVersion = "1.0.0", }) ``` ## Shipping to the web A love.js build cannot make requests from Lua, so the page does the sending. Load the [JavaScript SDK](https://ravensight.io/docs/javascript-sdk/) (0.4.0 or newer; 0.5.1 or newer for the bridge to report experiment exposure, and 0.7.0 for millisecond timestamps) on the page and install `web/ravensight-love-bridge.js` from the repository before `Love(Module)` runs. The Lua SDK notices the web build by itself and hands every `track`, `submitFeedback`, `setTrackingEnabled` and `flush` to the page, whose SDK owns the session, the device id and the two lifecycle events. The snippet and the details are in the README's [shipping to the web](https://github.com/Reality-Software-Entertainment/ravensight-love#shipping-to-the-web-lovejs-itchio) section. ## Not supported yet Android and iOS are not supported yet. Ravensight Playtest plays a love.js build like any web build, in the cloud or locally with `--build-dir` (see [Which builds play where](https://ravensight.io/docs/playtest/#playtest-engines)); a desktop build driven through the experimental desktop adapter (with an automation server you run yourself) or a custom bridge reads the `RAVENSIGHT_PLAYTEST_TOKEN` and `RAVENSIGHT_PLAYTEST_RUN_ID` variables, so its persona sessions are tagged synthetic. Where each SDK finds a playtest run: Godot, LÖVE, Unity (desktop), Unreal, C++ and Odin read `RAVENSIGHT_PLAYTEST_TOKEN` and `RAVENSIGHT_PLAYTEST_RUN_ID`; iOS reads them from the launch environment; Android reads the intent extras `ravensight_playtest_token` and `ravensight_playtest_run_id`; the JavaScript SDK reads the page global `__RAVENSIGHT_PLAYTEST__`. The table below has the other sources each one accepts. ## How the SDKs compare JavaScript SDK 0.12.0, LÖVE 0.8.0, Godot 0.7.0, Unity 0.6.0, Unreal 0.6.0, C++ 0.6.0, Odin 0.7.0, iOS 0.7.0 and Android 0.6.0, side by side on the behaviour that most often differs. A cell that says not yet is a feature that SDK does not have. Unity, Unreal, C++, Odin, iOS and Android are Beta: see [where the SDKs run](https://ravensight.io/docs/platform-support/) for what has been verified. | Behaviour | JavaScript | LÖVE | Godot | Unity | Unreal | C++ | Odin | iOS | Android | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | Automatic events | `game_started` and `game_exited` in a browser only, option `autoEvents` | `game_started` and `game_exited` | `game_started` and `game_exited` | `game_started` and `game_exited`; pause events only with Track Pause Events | `game_started` and `game_exited`; pause events only with Track Pause Events | `game_started` and `game_exited` | `game_started` and `game_exited` | `game_started` and `game_exited`; pause events only with `trackPauseEvents` | `game_started` and `game_exited`; pause events only with `trackPauseEvents` | | Mobile background | Not applicable | Not applicable, desktop only | 30 minute rule on Android and iOS (`session_timeout`) | 30 minute rule on iOS and Android | 30 minute rule on iOS and Android | Not yet: call `flush()` from your own background handler | Not applicable, desktop only | 30 minute rule (`sessionTimeout`) | 30 minute rule (`sessionTimeoutMs`) | | `apiUrl` form | With or without `/api/v1` | With or without `/api/v1` | `api_url` with or without `/api/v1` | Api Url with or without `/api/v1` | Api Url with or without `/api/v1` | `api_url` with or without `/api/v1` | `api_url` with or without `/api/v1` | `apiUrl` with or without `/api/v1` | `apiUrl` with or without `/api/v1` | | Queue cap default | `maxQueueSize` 500 | `maxQueueSize` 500 | `max_queue_size` 500 | Max Queue Size 500 | Max Queue Size 500 | `max_queue_size` 500 | `max_queue_size` 500 | `maxQueueSize` 500 | `maxQueueSize` 500 | | Option that turns sending off | `enabled` | `enabled` | `enabled` | Enabled On Start | Enabled | `enabled` | `start_disabled` | `enabled` | `enabled` | | Player opt out | `setEnabled(false)` | `setTrackingEnabled(false)` | `set_tracking_enabled(false)` | `SetTrackingEnabled(false)` | `SetTrackingEnabled(false)` | `set_tracking_enabled(false)` | `set_tracking_enabled(client, false)` | `setTrackingEnabled(false)` | `setTrackingEnabled(context, false)` | | Opt-out saved | No: keep it in your own settings | Yes, in the save folder | Yes, in `user://` | Yes, in `PlayerPrefs` | Yes, in `GameUserSettings.ini` | Yes, in a state file | Yes, in a JSON file | Yes, in `UserDefaults` | Yes, in `SharedPreferences` | | Reset call | `resetDeviceId()` | `resetDeviceId()` | `reset_device_id()` | `ResetDeviceId()` | `ResetDeviceId()` | `reset_device_id()` | `reset_device_id(client)` | `resetDeviceId()` | `resetDeviceId()` | | Batching | On a timer, every 15 seconds by default (`autoFlushMs`), or at 50 queued | 2 seconds after the first waiting event (`flushInterval`), or at 50 queued | 5 seconds after the first waiting event (`flush_interval`), or at 50 queued | Every 15 seconds (Auto Flush Seconds), or at 50 queued | Every 5 seconds (Flush Interval Seconds), or at 50 queued | Every 5 seconds (`flush_interval_seconds`), or at 50 queued | At least every 5 seconds (`flush_interval_ms`), or at 50 queued | Every 5 seconds (`flushInterval`), or at 50 queued | Every 5 seconds (`flushIntervalMs`), or at 50 queued | | Startup reason | `reason` in the result of `init()` | Not yet | `get_status_reason()`, signal `status_changed` | `Ravensight.StatusReason`, event `StatusChanged` | `GetStatusReason()`, delegate `OnStatusChanged` | `client.status()`, callback `on_status` | `init_reason(client)`, callback `on_reason_changed` | `Ravensight.statusReason`, callback `Ravensight.shared?.onStatusChange` | `Ravensight.statusReason`, listener `onStatusChanged` | | Playtest token source | Page global `__RAVENSIGHT_PLAYTEST__`, then `localStorage` `ravensight.playtest` | `RAVENSIGHT_PLAYTEST_*` variables, command line arguments, or `setPlaytestContext` | `set_playtest_context`, `RAVENSIGHT_PLAYTEST_*` variables, or command line arguments | `SetPlaytestContext`, then on desktop `RAVENSIGHT_PLAYTEST_*` variables or command line arguments | `SetPlaytestContext`, `RAVENSIGHT_PLAYTEST_*` variables, or command line arguments on desktop | Config fields, `RAVENSIGHT_PLAYTEST_*` variables, then command line arguments through `apply_playtest_args` | Config fields, `RAVENSIGHT_PLAYTEST_*` variables, then command line arguments | Configuration fields, then the launch environment | Config or `setPlaytestContext`, intent extras (debuggable builds, or with a manifest opt-in), then environment variables | | Session token | `rs.sessionToken` | Not yet | `session_token` | `Ravensight.SessionToken` | `GetSessionToken()` | `client.session_token()` | `session_token(client)` | `Ravensight.sessionToken` | `Ravensight.sessionToken` | | Web | Native | Through the ravensight-js bridge | Native, on the web export, without `game_exited` | WebGL, not yet verified in a browser | No web target in UE5 | Not applicable | Not applicable | Not applicable | Not applicable | | Typed event helpers | Yes: `trackPurchase`, `trackResource`, `trackProgression`, `trackError` | Yes: `purchase`, `resource`, `progression`, `error` | Yes: `track_purchase`, `track_resource`, `track_progression`, `track_error` | Yes: `TrackPurchase`, `TrackResource`, `TrackProgression`, `TrackError` | Yes: `TrackPurchase`, `TrackResource`, `TrackProgression`, `TrackError` | Yes: `track_purchase`, `track_resource`, `track_progression`, `track_error` | Yes: `track_purchase`, `track_resource`, `track_progression`, `track_error` | Yes: `trackPurchase`, `trackResource`, `trackProgression`, `trackError` | Yes: `trackPurchase`, `trackResource`, `trackProgression`, `trackError` | | Performance sampling | Yes: option `performance`, one `health` event when the page is hidden; browser only | Yes: option `performance` with `update(dt)`, one `health` event on quit | Yes: option `performance`, one `health` event on background, page hide or quit | Yes: Performance field, one `health` event on background (iOS, Android) or quit (desktop) | Yes: Performance setting, one `health` event on background (iOS, Android) or quit | Yes: `Config::performance` with `sample_frame(dt)`, one `health` event on shutdown | Yes: `Config.performance` with `tick(client, dt)`, one `health` event from `shutdown`; no memory figure | Yes: `performance`, one `health` event when the app enters the background | Yes: `performance`, one `health` event when the app first goes to the background | Source: https://ravensight.io/docs/love-sdk/ Last updated: 2026-11-21 --- # The Ravensight Swift package for iOS, tvOS and macOS One Swift package for iOS 15 or newer, tvOS 15 or newer and macOS 12 or newer, with no third party dependencies and a URLSession transport. It owns the device id, sessions, batching, the offline queue, rate limit handling and the server kill switch, and it sends player feedback and Player Reports with a screenshot. Verified so far: the package's tests on macOS, on the iOS Simulator and on a tvOS simulator. On tvOS the saved queue and pending crash records live in Caches, the only folder a tvOS app may keep files in, so the system can purge them under storage pressure. It has not yet run inside a shipping app or on a physical device, so read the code before a release build. The source and the full README are at [ravensight-ios](https://github.com/Reality-Software-Entertainment/ravensight-ios). Code samples scroll horizontally when needed. ## Install Swift Package Manager only. In Xcode choose File > Add Package Dependencies, paste the repository URL and add the `Ravensight` library to your app target. Or declare it in `Package.swift`: ``` dependencies: [ .package( url: "https://github.com/Reality-Software-Entertainment/ravensight-ios.git", from: "0.6.0" ), ], targets: [ .target(name: "YourGame", dependencies: ["Ravensight"]), ] ``` ## Initialise Call `start` once, early, from the main thread (your `App` init or `application(_:didFinishLaunchingWithOptions:)`), with your game's ingest key from the dashboard. It queues `game_started`, reads the kill switch, opens a session, sends batches every 5 seconds and hooks the app lifecycle so the queue is flushed when the player leaves. The key ships inside your app, so it is not a secret: anyone with the app can read it, though it can only write events. For a demo or an open-source app use a public key (`gt_pub_`) with an event allowlist and a ceiling, and keep live keys on your own server when possible. See [Public builds](https://ravensight.io/docs/public-builds/). ``` import Ravensight Ravensight.start(ingestKey: "gt_live_your_key") Ravensight.track("level_completed", data: ["level": 3, "deaths": 2]) // Or the full configuration: var configuration = RavensightConfiguration(ingestKey: "gt_live_your_key") configuration.gameVersion = "1.2.0" configuration.persistQueue = true // the default; false keeps the queue in memory Ravensight.start(configuration) ``` On iOS a session ends by time in the background: a player who comes back within `sessionTimeout` (30 minutes by default) carries on the same session, and one who comes back later, or after the app was swiped away, gets the old session's `game_exited` stamped with the time they left, then a new session. ## Xcode configuration Keep the ingest key out of source and give each build configuration its own: an ignored `.xcconfig` with per-configuration keys, an explicit `Info.plist` template that substitutes `$(RAVENSIGHT_INGEST_KEY)`, suppression under XCTest and SwiftUI previews so tests and canvases send nothing, and a check of the built bundle before you ship. The steps are in the SDK repo's [`docs/XCODE_SETUP.md`](https://github.com/Reality-Software-Entertainment/ravensight-ios/blob/main/docs/XCODE_SETUP.md). To confirm which environment a build's key reaches, see [Which environment does this key hit?](https://ravensight.io/docs/quickstart/#which-environment) ## Timing and privacy The SDK stamps events with wall clock time. If your app reads `systemUptime` (or another boot-relative clock) for its own timing, Apple treats that as a required-reason API, so your app needs its own privacy manifest declaration for it. Send elapsed in-app intervals, such as seconds spent in a level, as event data, and never raw uptime, which can be used to tell devices apart. ## Privacy: two controls that do different things `setTrackingEnabled(false)` is the player's choice. It is saved in `UserDefaults` before the call returns, works before `start`, clears the queue and stops every request on this launch and every later one. `stopAllTelemetry()` is a stop for this run only: nothing is saved, the queue and the persisted queue file are cleared, `track` returns false, and feedback and reports are refused. The difference that matters is the playtest run: a synthetic session is driven by an agent on a test build, not by a player, so it ignores the saved opt-out, and only `stopAllTelemetry()` silences it. | Call | Saved | Normal session | Synthetic (playtest) session | | --- | --- | --- | --- | | `setTrackingEnabled(false)` | Yes | Queue cleared, no request of any kind, now and on every later launch. | Ignored, with one console line. The run carries on. | | `stopAllTelemetry()` | No | Everything stops for this run. The next launch starts normally. `resumeTelemetry()` undoes it, and a saved opt-out still wins. | The run stops sending. | | `resetDeviceId()` | Yes | A new durable id is saved and returned, the queue is cleared and the session ends. | A new durable id is saved for the next normal launch. The run keeps its playtest id. | An analytics switch in your settings screen uses both: ``` func setAnalytics(_ on: Bool) { Ravensight.setTrackingEnabled(on) // saved: holds on every later launch if on { Ravensight.resumeTelemetry() } else { Ravensight.stopAllTelemetry() // also stops a playtest run, right now } } ``` ## Playtest tagging, and why a synthetic id is never mirrored A Ravensight Playtest run identifies itself with a token and a run id, from `RavensightConfiguration.playtestToken` and `playtestRunId`, or else from the `RAVENSIGHT_PLAYTEST_TOKEN` and `RAVENSIGHT_PLAYTEST_RUN_ID` launch environment variables (on the Simulator, `xcrun simctl launch` passes a variable through when you prefix it with `SIMCTL_CHILD_`). With a token, every request carries the `X-Ravensight-Playtest` header and the run sends the device id `pt-`, held in memory only and exposed as `playtestDeviceId`. The persisted queue is not used. A token without a run id never runs as a real player: nothing is sent. `Ravensight.deviceId` always returns the durable id, never the synthetic one, and `resetDeviceId()` never returns a synthetic id either, so an app that copies the id into its own storage or its own server is safe. Never copy `playtestDeviceId` anywhere that outlives the run. A mirrored `pt-` id would come back on a later launch: a real player's events would then be filed under a persona's run and left out of every report that hides playtest sessions, and your own records would count a persona as a player. `Ravensight.isSynthetic` tells you which kind of run this is. Leave the token and run id unset in a build for real players. ## Player Reports with a screenshot `submitReport` sends what a player wrote about a problem, with your own metadata and, only if you pass one, a screenshot. The SDK never captures the screen: capture it yourself after the player chose to attach it, with anything private hidden. On macOS pass `screenshotData:` with JPEG, PNG or WebP bytes. Reports land in the dashboard's Player Reports inbox. ``` // A failed report kept for a retry, with the session it was sent under. var pendingReport: (report: RavensightReport, session: String?)? // Build the report once: its clientId, capture time and screenshot bytes // are fixed here, so resubmitting this value sends the same submission. let report = RavensightReport( category: "bug", message: "The ferry never arrives", screenshot: capturedImage, // UIImage?, nil for a text report metadata: ["zone": "harbour", "attempt": 3] ) let session = Ravensight.sessionToken Ravensight.submitReport(report) { result in switch result { case .success(let receipt): print("report \(receipt.reportId ?? receipt.id) saved") case .failure(let error) where error.code == "upload_failed" || error.code == "report_processing" || error.status == 0: // Retry later with the same value, and only while the session is the same one. pendingReport = (report, session) case .failure(let error): print("report refused: \(error.code)") } } // Later: if let pending = pendingReport, pending.session != nil, pending.session == Ravensight.sessionToken { Ravensight.submitReport(pending.report) { _ in } } ``` **What it costs.** A text report counts as 1 event on the shared event meter. A screenshot adds 20,000 events, reserved when the report is accepted, which is about $0.01 once the included events are spent. The SDK makes one attempt per step and never retries a report on its own, because a screenshot reserves usage. **When to retry.** The server recognises a resubmission by the report's `clientId` within one session only. Retry only after `upload_failed`, `report_processing` or a status of 0, with the same `RavensightReport` value and the same session token as the failed attempt: the server finds the existing submission and the SDK carries on from where it stopped. A retry under a different session (after a session expiry, a timeout in the background, `resetDeviceId` or a relaunch) is a new submission, stored again, and a screenshot reserves its events again. The server allows two upload attempts per submission and releases an unfinished screenshot report after 15 minutes. Limits are checked on the device first: a message of 1 to 500 characters, a screenshot of at most 1,000,000 bytes and 4,000,000 pixels, scaled to fit 1600 by 1600. `submitFeedback` stays as the lighter text only call. ## The persisted queue By default (`persistQueue`; set it to `false` to keep the queue in memory only) the queue is mirrored to one JSON file under Application Support, excluded from backups: at most the newest 500 events, written atomically through one temporary file, coalesced over a quarter of a second, and read right after the client is created. Restored events go out under the current session, each with the `origin` of the session it was tracked in and its original timestamp, and events older than 89 days are not restored. Session tokens, signing secrets and an error's `rs_trail` are never written. The file is deleted on an opt-out, on `stopAllTelemetry`, on `resetDeviceId`, on the kill switch and when the queue drains, and a playtest run never reads or writes it. It narrows the window in which events can be lost; an event tracked a moment before a crash may not have been written yet. From 0.6.0 timestamps are unix milliseconds, a request body of 1,024 bytes or more is sent gzip compressed, a session that answers with `signing` signs every batch with an HMAC-SHA256 whose secret stays in memory, and `trackAd`, `trackAdRevenue` and `setAttribution` send the [ad and attribution events](https://ravensight.io/docs/dashboard/#typed-events). `sendDeviceInfo` (on by default) sends the model and OS version on the session. ## Queued, accepted and delivered `track` returning `true` means the event is in the queue on the device, nothing more. Delivery is reported separately: `Ravensight.stats` counts `queued`, `delivered` (events in batches the server answered `202` for), `pending`, `droppedEvents` and `restored`; `lastDelivery` is `.accepted`, `.failed(status:)` or `.offline`; and `onFlush` is called on the main queue after every request that carried events. The server's own `accepted` count in that `202` answer can be lower than the batch the SDK counts as delivered, because an event timestamped more than 90 days ago is dropped without failing the request (see the [HTTP API](https://ravensight.io/docs/http-api/)). Accepted events reach your reports after the server's insert buffer flushes, which takes a few seconds. ``` Ravensight.shared?.onFlush = { outcome in if outcome.succeeded { print("delivered \(outcome.sent), \(outcome.pending) still queued") } else { print("not delivered (status \(outcome.status)), will retry") } } ``` ## What each SDK supports Read from each SDK's own source. A cell that says not in this SDK is a feature that SDK does not have. No SDK has a journeys call: journeys are built by the server from the place on the level events you track, with any SDK, on deployments with journey graphs configured. | SDK | Feedback text | Reports with screenshot | Playtest tagging | Player opt-out | Persisted queue | Journeys | | --- | --- | --- | --- | --- | --- | --- | | JavaScript | `submitFeedback` | `submitReport`, from 0.5.1, with `captureScreenshot` for a canvas | Yes | `setEnabled(false)`, not saved by the SDK | `persistQueue`, on by default, from 0.7.0 | Not in this SDK | | Godot | `submit_feedback` | `submit_report` and an optional capture overlay, from 0.3.1 | Yes | `set_tracking_enabled(false)`, saved | Always on, from 0.5.0 | Not in this SDK | | LÖVE | `submitFeedback` | `submitReport` with PNG bytes, from 0.5.0 | Yes | `setTrackingEnabled(false)`, saved | Always on, desktop, written on every change from 0.7.0 | Not in this SDK | | Unity | `SubmitFeedback` | `SubmitReport`, from 0.3.1 | Yes | `SetTrackingEnabled(false)`, saved | Persist Queue, on by default, from 0.5.0 | Not in this SDK | | Unreal | `SubmitFeedback` | `PrepareReport` and `SubmitReport`, from 0.3.1 | Yes | `SetTrackingEnabled(false)`, saved | Always on, from 0.5.0 | Not in this SDK | | C++ | `submit_feedback` | `submit_report`, from 0.3.1 | Yes | `set_tracking_enabled(false)`, saved | `persist_queue`, on by default, from 0.5.0 | Not in this SDK | | Odin | `submit_feedback` | `submit_report` with PNG bytes, from 0.4.0 | Yes | `set_tracking_enabled(client, false)`, saved | Always on, from 0.6.0 | Not in this SDK | | iOS | `submitFeedback` | `submitReport`, from 0.3.0 | Yes | `setTrackingEnabled(false)`, saved, plus `stopAllTelemetry()` | `persistQueue`, on by default from 0.6.0 | Not in this SDK | | Android | `submitFeedback` | `submitReport`, from 0.3.1 | Yes | `setTrackingEnabled(context, false)`, saved | `persistQueue`, on by default, from 0.5.0 | Not in this SDK | Where each SDK finds a playtest run is in the [SDK comparison table](https://ravensight.io/docs/love-sdk/#sdk-compare). Source: https://ravensight.io/docs/ios-sdk/ Last updated: 2026-11-19 --- # The ravensight module for Go games and servers Player analytics for games written in Go, and server events for Go game servers and backends, from one module with no dependencies outside the standard library. A `Client` runs inside your game with its publishable game key. A `Server` runs on your own server with a website's secret server key. **Preview.** Version 0.1.0 has not yet shipped inside a released game. Read the code before you ship it in a release build, and open an issue on the repository with anything you hit. Code samples scroll horizontally when needed. Focus a sample and use the arrow keys, or swipe to read a long line. ## Install The source is [ravensight-go](https://github.com/Reality-Software-Entertainment/ravensight-go), under the MIT license. It needs Go 1.22 or newer. ``` go get github.com/Reality-Software-Entertainment/ravensight-go@v0.1.0 ``` ``` import "github.com/Reality-Software-Entertainment/ravensight-go" ``` The package name is `ravensight`. ## Quickstart A game ``` client := ravensight.New(ravensight.Config{ IngestKey: "gt_live_your_key", // from your game's page in the dashboard GameVersion: "1.0.0", }) defer client.Close() // records game_exited and sends what is left defer client.Recover() // records a panic for the next launch, then panics again client.Track("level_completed", map[string]any{ "level": 3, "deaths": 2, "seconds": 41.7, }) ``` That is the whole setup. The client reads the server's kill switch, opens a session and sends batches from its own goroutine. `Track` copies and serializes your data at once and returns. It never waits on the network or the disk, so it is safe to call from your game loop (an Ebitengine `Update`, for example). The device id is saved in a per-user directory, so the same install counts as the same player across launches. A game that wants one client and no plumbing can use the package-level functions: ``` ravensight.Init(ravensight.Config{IngestKey: key}) defer ravensight.Close() ravensight.Track("level_start", map[string]any{"level": "forest_1"}) ravensight.Default().Identify(account.AnalyticsID) // every other call ``` A game server or backend ``` srv := ravensight.NewServer(ravensight.ServerConfig{ ServerKey: os.Getenv("RAVENSIGHT_SERVER_KEY"), // gt_srv_..., never in a game build }) defer srv.Close() // In the background, batched: err := srv.Track(ravensight.ServerEvent{ Name: "match_finished", ActorID: account.AnalyticsID, // your own opaque id, passed explicitly Properties: map[string]any{"mode": "ranked", "won": true}, }) // Or now, waiting for the answer: result, err := srv.Send(ctx, ravensight.ServerEvent{Name: "signup_completed", ActorID: id}) ``` See [server mode](https://ravensight.io/docs/go-sdk/#go-server-mode) below. ## The client's calls | Call | What it does | | --- | --- | | `ravensight.New(cfg)` | Makes a client and starts its goroutine. Never fails: without a key it is inert. | | `client.Track(name, data)` | Queues an event. Returns `false` when it was not queued. Never blocks. | | `TrackPurchase`, `TrackResource`, `TrackProgression`, `TrackError` | [Typed events](https://ravensight.io/docs/go-sdk/#go-typed-events). | | `client.Flush(ctx)` | Sends what is queued and waits until the queue is empty, nothing more can be sent for now, or `ctx` ends. | | `client.Close()` | Records `game_exited`, sends for at most about 1.5 seconds, saves what is left for the next launch, and stops. | | `client.Shutdown(ctx)` | `Close` with your own time limit. | | `client.SetTrackingEnabled(on)`, `TrackingEnabled()` | The player's analytics choice, saved and remembered across launches, and whether it allows collecting. | | `client.ResetDeviceID()` | A fresh random device id from now on. Returns the new id. | | `client.SetEnabled(on)`, `IsEnabled()` | A runtime switch for your own logic. Not saved. | | `client.Identify(accountID)`, `ResetIdentity()`, `IsIdentified()` | Links this device to your game's own account, and unlinks it at sign-out (see [players who sign in](https://ravensight.io/docs/go-sdk/#go-identify)). | | `client.SetCampaignLink(linkID)` | Passes on the [campaign link](https://ravensight.io/docs/go-sdk/#go-campaign-links) the game was opened with. | | `ConfigBool`, `ConfigNumber`, `ConfigString`, `ConfigJSON`, `FetchConfig()` | [Remote config](https://ravensight.io/docs/go-sdk/#go-remote-config) reads with a fallback, and a fresh fetch now. | | `client.SubmitFeedback(ctx, fb)` | Sends player feedback and waits for the answer. | | `client.Recover()`, `LogHandler(next)`, `Log(level, msg)`, `WrapTransport(rt)` | Feed panics, your game's log and its failed HTTP requests to [error capture](https://ravensight.io/docs/go-sdk/#go-errors). | | `client.SetErrorCapture(on)`, `IsErrorCaptureActive()` | Automatic capture for this run. | | `client.Status()`, `IsCollecting()` | Why the client is or is not sending. | | `client.DeviceID()`, `SessionToken()`, `IsPlaytest()`, `Stats()` | Read-only state. | | `ravensight.SetTrackingEnabled(cfg, on)` | Saves the player's choice before a client exists. | | `ravensight.DefaultStorageDir(key)` | Where a client keeps its files by default. | Every method is safe from any goroutine, and safe on a nil `*Client`, where it does nothing. Event data is a `map[string]any` of strings, numbers, bools, nil or anything `encoding/json` can write. Keys that start with `rs_` are reserved for Ravensight. An event's name must not be empty and is at most 200 characters, and its data is at most 8,192 bytes as JSON. Otherwise `Track` returns `false`, drops the event and logs one warning for the run. ## Configuration Fields of `ravensight.Config`. The zero value of each is its default. | Field | Default | Meaning | | --- | --- | --- | | `IngestKey` | empty | Your game's `gt_live_` key, or a public `gt_pub_` key. Empty makes the client inert. | | `Optional` | `false` | Silences the one warning an inert client logs. | | `APIURL` | `https://api.ravensight.io` | With or without `/api/v1`; trailing slashes are ignored. | | `GameVersion` | `1.0.0` | Sent on every session. | | `Platform` | the build's operating system | Such as `windows`, `macos` or `linux`; `web` for a WebAssembly build. | | `Distribution` | empty | A short label for this build, such as `steam` or `itch-demo`. At most 40 characters, otherwise not sent. | | `Device` | empty | Optional `Model`, `OSVersion` and `GPU`, sent once on the session. The SDK never probes for them. | | `DeviceID` | empty | Your own stable per-install id. Empty uses a random saved `dev_` id. | | `StorageDir` | per-user | Where the SDK keeps its files (see [privacy and storage](https://ravensight.io/docs/go-sdk/#go-privacy)). | | `Consent` | `ConsentOptOut` | `ConsentOptIn` sends nothing, and makes no device id, until `SetTrackingEnabled(true)`. | | `StartDisabled` | `false` | Start switched off, as `SetEnabled(false)`. | | `MaxQueueSize` | `500` | Unsent events kept, oldest dropped first. At most 500. | | `FlushInterval` | 5 seconds | How long an event may wait to go out with others. A negative value sends only on `Flush`, at 50 waiting events and on `Close`. | | `RequestTimeout` | 15 seconds | Per request. | | `NoLifecycleEvents` | `false` | Turns off `game_started` and `game_exited`. | | `NoErrorCapture` | `false` | Turns off automatic error capture. | | `MemoryOnlyQueue` | `false` | Keeps unsent events in memory only. | | `JoinToken` | empty | A session token from the player's client (see [dedicated servers](https://ravensight.io/docs/go-sdk/#go-dedicated-servers)). | | `CampaignLink` | empty | A campaign link id the game was opened with. | | `Playtest` | empty | Overrides the playtest values read from the environment and the command line. | | `HTTPClient` | the SDK's own | Sends the requests. | | `Logger` | warnings to standard error | A `*slog.Logger` that receives the SDK's own lines, each starting `Ravensight:`. | | `OnStatus` | none | Called when `Status()` changes, on any goroutine. Keep it quick. | | `OnConfigReady` | none | Called after each remote config fetch: `true` for a fresh answer or a confirmed cache. | ## Automatic events and status Two events are sent for you, unless `NoLifecycleEvents` is set: `game_started`, queued once when the client may first collect, so it is the first event and carries the real start time, and `game_exited`, queued once by `Close` or `Shutdown`. The SDK has no engine hooks, so it does not see a mobile app go to the background. Call `client.Flush(ctx)` from your own pause handler. `client.Status()` returns a `ravensight.Status`, with the codes every Ravensight SDK shares. | Status | Meaning | | --- | --- | | `StatusOK` (empty) | Sending, or about to. | | `no_key` | Made with no key. Inert for its lifetime. | | `disabled` | Switched off, opted out, or waiting for an opt-in yes. Nothing touches the network. | | `invalid_key` | The key was refused. Logged once, and nothing more is sent this run. | | `tracking_disabled` | The game's kill switch on the server. Nothing more is sent this run. | | `offline` | No connection, a timeout or a server error. Retried with a backoff. | | `rate_limited` | Waiting out the server's `Retry-After`. | | `session_failed` | The session could not be opened, or a playtest token was refused. | | `playtest_job_closed` | The playtest job finished. Nothing more is sent this run. | ## Delivery The client follows the Ravensight delivery contract, so an event survives a lost connection, a crash, a kill and a build update. - **Batching.** `Track` only queues. An event waits at most 5 seconds to go out with others; 50 waiting events go at once, and `Flush` and `Close` send at once. At most 50 events go in one request. - **Bounded.** At most 500 events wait. At the cap the oldest go first, automatic error captures before gameplay events. - **Saved queue.** Unsent events are kept in `queue-.json` in the storage directory, one file per key, written through a temporary file and a rename about a second after a change and right after every answer, and deleted when empty. The next launch sends what is left. Events older than 89 days are dropped when the file is read. - **Origin.** Each session's events are saved with that session's `origin`, so a later launch sends them under the session, build and platform they happened in. - **Event ids.** Every event carries an `rs_event_id`, kept across resends, so a resend after a lost answer is stored once. - **Answers.** An event leaves the queue on a `2xx` answer, or a `400` that names it by `index`. A `400 batch_too_large` or a `413` halves the batch, and a single event still too large is dropped. Any other `400` drops the request's events. A `401` opens a new session once and resends the same ids; a second in a row waits for the backoff. A `403` stops sending for the run and keeps the events for the next launch. - **Backoff.** Any other failure keeps the events and waits 10 seconds, doubling to 5 minutes, each wait multiplied by a random factor from 0.5 up to 1. A `429` or `503` with `Retry-After` waits exactly that long. `Flush` and `Close` cut a backoff short, never a `Retry-After`. - **Compression and signing.** A body of 1,024 bytes or more is sent gzip compressed; a `415` is sent again uncompressed. When the session answer carries a signing secret ([public keys](https://ravensight.io/docs/public-builds/)), every batch is signed over the uncompressed body, with the device clock corrected by the server's time. The secret is kept in memory only. ## Typed events ``` // Money is whole minor units: 499 is 4.99. Default name: purchase. client.TrackPurchase(ravensight.Purchase{Amount: 499, Currency: "usd", ItemType: "pack", ItemID: "gems_500"}) // Default name: resource_source or resource_sink. client.TrackResource(ravensight.Resource{Flow: "sink", Resource: "gold", Amount: 120, ItemType: "weapon"}) // Default name: progression_start, progression_complete or progression_fail. score := 1250.5 client.TrackProgression(ravensight.Progression{Status: "complete", P1: "world1", P2: "level3", Score: &score}) // Severity is debug, info, warning, error or critical. Default name: error. client.TrackError(ravensight.ErrorReport{Severity: "error", Message: "save file unreadable"}) ``` Each takes `Extra` properties (a reserved key always wins) and a `Name` that replaces the default. The currency is sent upper-cased. To mark a level or death event without a typed helper, set `rs_kind` to `level_start`, `level_complete`, `death` or `none`. What the dashboard reads from each is in [typed events](https://ravensight.io/docs/dashboard/#typed-events). ## Errors Captured errors appear in the game's [Errors view](https://ravensight.io/docs/error-capture/). An error is an ordinary event on your usage balance, and spend is bounded on the device by the caps below. | What | How it starts | What is sent | | --- | --- | --- | | A panic | `defer client.Recover()` | On the next launch, with source `crash` and severity `critical`: the panic's type, its message and the stack. A panic the program survived is sent at once with source `uncaught`. | | Your game's log | `client.LogHandler(next)`, or `client.Log(level, msg)` from your own logger | A record at `slog.LevelError` or above, with source `log` and severity `warning`. Every record feeds the trail. | | Your game's HTTP requests | `client.WrapTransport(rt)` | A network failure or a `5xx` as `error`, a `4xx` as `warning`, with source `request`. | | `client.TrackError(...)` | Your call | As you wrote it, never held back by the switches below. | ``` func main() { client := ravensight.New(cfg) defer client.Close() defer client.Recover() // here, and at the top of each goroutine you start // Your game's log: every record still reaches your own handler. slog.SetDefault(slog.New(client.LogHandler(slog.NewTextHandler(os.Stderr, nil)))) // Your game's own HTTP requests. httpClient := &http.Client{Transport: client.WrapTransport(http.DefaultTransport)} // ... } ``` The source and severity are sent as `rs_source` and `rs_severity`. Through `LogHandler`, a record's message also carries its first error-valued attribute, whose type becomes `rs_error_type`. A failed request's message is ` `, with `network` as the status when there was no answer, and path segments that are numbers, long hex or UUIDs become `:id`. The SDK's own requests are never captured, and the answer reaches your code unchanged. **Recover.** It writes one small file at once, readable by the player's account only, then panics again with the same value, so the game ends exactly as it would have. The next launch sends it, and deletes the file once the event is received, so a failed send never loses it. If the program is still running two seconds after the panic, an outer `recover` caught it (`net/http` does this for its handlers), so it was not a crash: the file is deleted and the panic is sent at once with source `uncaught` and severity `error`. At most 5 records are written a run and 5 kept, and one older than 30 days is deleted unsent. Go cannot recover a fatal runtime error (a concurrent map write, running out of memory), and a panic in a goroutine without its own `defer client.Recover()` is not recorded. **The gate.** Nothing is captured without a key, before consent, while the game's Errors switch on the server is off, with `NoErrorCapture`, or after `SetErrorCapture(false)`. With a key and consent, capture starts before the first answer: up to 5 captures wait in memory, sent if the server says on and discarded unsent if it says off. **Caps and scrubbing.** Per run, dropped silently on the device: 30 captures, 3 per local key (the type, the message with its numbers, ids and quoted text templated away, and the first stack line), 6 a minute and 10 trails. Text is scrubbed on the device before it is queued, with the server's rules: emails become `[email]`; `Bearer` tokens, JWT-shaped strings, `gt_` keys, and runs of 32 or more letters, digits and `+ / = _ -` that contain a digit become `[token]` (a run that is a file path is kept); IP addresses become `[ip]`; home folders (`/Users/`, `/home/`, `C:\Users\`) become `~`; a URL loses its query, fragment and `user:password@`. The message is cut to 200 characters, the stack to 2,000 and the type to 100. **The trail** is an in-memory ring of the last 20 lines (log records at any level, and the names of events you track), each `+ `, scrubbed and cut to 120 characters, at most 1,500 in all. It is sent only with an error, only while the game's trail switch is on (it is off by default), and never written to the queue file. A crash record keeps the trail only while the switch is on. **Never sent:** request bodies, headers, query strings, the SDK's own log lines (anything starting `Ravensight`) and its own requests, and `rs_fp` (the server computes the fingerprint). Gameplay events always go ahead of captured errors. ## Players who sign in If your game has its own login, call `Identify` once the player signs in and `ResetIdentity` when they sign out. One person on two devices, or before and after signing in, then counts as one player (see [identify players](https://ravensight.io/docs/identify-players/)). ``` // after your own sign-in: a random id stored with the account if err := client.Identify(account.AnalyticsID); err != nil { // *ravensight.RefusalError: empty, too_long or looks_like_email } // on sign-out client.ResetIdentity() ``` - **What is sent.** A salted hash of the id (`accountHash`, HMAC-SHA256 keyed with your game's own salt from the session answer) and the session token, once per session. The raw account id is never sent and never saved; until the first session answer it is held in memory only. - **Pass a random, high-entropy id**, such as a random UUID stored with the account, never a sequential database key, an email, a name or a handle. Your game's salt reaches every copy of the game, so anyone could hash 1, 2, 3 and onward and match a guessable id. The hash is still a pseudonymous identifier for the player: declare it in your privacy notice. - **Refused.** An empty id (`empty`), more than 256 bytes of UTF-8 (`too_long`), or any `@` (`looks_like_email`). The id is used exactly as given, never trimmed. A refusal sends nothing and changes nothing. - **One event per identified session** on your usage balance. The same account again sends nothing. A failed request is tried again at the next session, never in a loop. When the server does not offer identify, it is off until the next launch. - **A different account** first runs `ResetIdentity`, which deletes the saved hash and switches to a fresh device id, so the next player is not linked to the last one. `ResetDeviceID` alone keeps the identity. - **Where it is kept.** The hash is saved as `identity.json` beside the device id. Without a key, before consent, while switched off, or in a playtest run it is held in memory only, and an opt-out deletes it. ## Campaign links A Ravensight [campaign link](https://ravensight.io/docs/campaign-links/) adds `rs_link=` to the address it sends players to. Pass it on from the address your game was opened with, such as a custom URL scheme or a deep link your game already handles. The SDK never reads the command line for it. ``` if link := openedURL.Query().Get("rs_link"); link != "" { _ = client.SetCampaignLink(link) } ``` `SetCampaignLink` accepts 24 hex characters in any case and returns a `*RefusalError` (`invalid_link`) for anything else. The id goes lowercased, as `campaignLink`, on the next session the client opens for its own player, and is cleared once a session answers with a token. Set it before the first session with `Config.CampaignLink`. It is kept in memory only, and never sent without consent, without a key or in a playtest run. ## Remote config and experiments Every session start fetches the game's public [remote config](https://ravensight.io/docs/remote-config/). `FetchConfig` asks again, and `OnConfigReady` says when an answer arrived. ``` speed := client.ConfigNumber("enemy_speed", 2.0) hint := client.ConfigBool("show_hint", true) label := client.ConfigString("welcome_text", "Welcome") layout := client.ConfigJSON("layout", json.RawMessage(`{}`)) ``` Each read returns the fallback before the first answer, offline, or when the value is another type; values are never converted. The last good answer is cached on disk for the same key, device, platform and build, and its ETag is reused. A fetch alone is not an exposure. The first typed read marks every [experiment](https://ravensight.io/docs/experiments/) the last fetch assigned as exposed and queues one `rs_exposure` event, and every event queued after it carries `rs_exp_` set to the variant. An experiment missing from a later fetch is no longer tagged. Do not log or show the device id beside config values. Config is public game data, never a place for secrets. A fresh fetch costs one ordinary event; a confirmed cache costs none. ## Feedback ``` err := client.SubmitFeedback(ctx, ravensight.Feedback{ Message: "The boss fight drags", Category: "suggestion", // optional: bug, suggestion, complaint, praise, playtest, other Rating: 3, // 0 to leave it out, or 1 to 5 }) ``` Bad input is refused on the spot with no request: `empty_message`, `message_too_long` (over 2,000 characters), `invalid_category` or `invalid_rating`. While the client is not sending, the error's code is the status, such as `disabled`. A refusal from the server comes back as a `*RefusalError` with its code. Feedback is never retried on its own. ## Privacy, storage and the opt-out The SDK makes a random device id, `dev_` and 32 hex characters from the system's random source, and saves it once the player has not opted out. By default it lives in a per-user directory named after your key: | Platform | Default storage directory | | --- | --- | | Windows | `%APPDATA%\ravensight\` | | macOS | `~/Library/Application Support/ravensight/` | | Linux and others | `$XDG_DATA_HOME/ravensight/`, else `~/.local/share/ravensight/` | `` is the first 12 hex characters of the SHA-256 of the key. Set `StorageDir` where there is no such directory, such as a browser build or a console. If no directory can be used the SDK logs one warning and keeps everything in memory for the run. The directory holds `device_id`, `state.json` (the player's choice), `identity.json`, the queue file, `config.json` (the config cache) and pending crash records. Keep it out of cloud saves and device backups: the queue file holds scrubbed error captures and the origin of earlier sessions. The SDK itself collects no hardware identifier, no advertising id and no personal data, and never sends a country. Only the events you choose to send leave the machine, plus the optional device fields you set. The store answers are in [what your privacy label can say](https://ravensight.io/docs/platform-support/#privacy-label). ``` client.SetTrackingEnabled(false) // saved at once; nothing more is sent client.SetTrackingEnabled(true) // back on, also saved fresh := client.ResetDeviceID() // a new identity; the queue is cleared ``` `SetTrackingEnabled(false)` saves the choice before it returns, clears the queue and deletes its file, pending crash records, the stored identity and the config cache, and stops every request. Every later client with the same storage reads it, and a saved opt-out wins: such a client makes no request of any kind. To save the choice before a client exists, call `ravensight.SetTrackingEnabled(cfg, false)` with the config you will use. `ResetDeviceID` makes and saves a new id, clears the queue and drops the session, so nothing links the old id to the new one. `SetEnabled(false)` is a runtime switch for your own logic, and is not saved. You do not need a permission prompt, but saying what the game sends is good manners. A paragraph your game can show, in a settings screen or on its store page: This game sends anonymous gameplay events (what happens in the game, never who you are) to Ravensight so we can improve it. You can turn this off in Settings at any time. If your game calls `Identify`, its events are linked to a pseudonymous hash of the player's account, so say that instead of "anonymous" and declare the hash in your privacy notice. ## Public builds - **No key, no analytics.** A client made with an empty `IngestKey` is inert: it starts no goroutine, makes no request, and every call is a quiet no-op. So a public repository can ship with no key in it. Set `Optional: true` to silence its one warning. - **Inject the key at build time, never commit it.** Use a [public `gt_pub_` key](https://ravensight.io/docs/public-builds/) for builds anyone can download, set by your release build (example below). - **The game key ships in your build.** It is not a secret, and you can rotate it from the dashboard at any time. A `gt_srv_` server key is a secret and never belongs in a game build (see [server mode](https://ravensight.io/docs/go-sdk/#go-server-mode)). - **`ConsentOptIn`** sends nothing until the player says yes: no device id is made, and not even the kill switch is read before `SetTrackingEnabled(true)`. Events tracked before the yes are dropped, not held. ``` // go build -ldflags "-X main.ravensightKey=gt_pub_..." var ravensightKey string client := ravensight.New(ravensight.Config{IngestKey: ravensightKey, Optional: true}) ``` ## Dedicated servers A game server written in Go can share the player's session, so its events land in the same session as the player's own instead of counting a second player. The player's client reads its token and sends it to your server however your game talks to it: ``` token := client.SessionToken() // on the player's client; empty until a session opens // On the game server, one client per player connection: c := ravensight.New(ravensight.Config{ IngestKey: key, JoinToken: token, NoLifecycleEvents: true, // the player's client sends those MemoryOnlyQueue: true, StorageDir: perPlayerDir, }) c.Track("match_result", map[string]any{"won": true}) ``` The token is sent once, as `joinToken` (see [the session request](https://ravensight.io/docs/http-api/#post-api-v1-session)). If the server refuses it, the client opens a plain session instead. For events about your backend rather than a player's session, use server mode. ## Server mode A `Server` sends [server events](https://ravensight.io/docs/server-events/) from your own server into a website's analytics (a title's website or your company website) with that website's secret server key, made in the dashboard. The events show in the website's Server events report. - **Keep the key on your server.** A request that carries an `Origin` header is refused, so a server key never works from a browser, and the SDK never sends one. - **Identity is explicit.** `ActorID` is your own opaque id for the person or device, 8 to 128 letters, digits, `_`, `.`, `:` or `-`, so never an email. The server stores only a keyed hash of it. Without it the event belongs to your backend itself. Server mode never reads or sends a player's device id. - **Checked before sending.** Every event is checked the way the server checks it (the name, the ids, the time, at most 24 short properties, no value that looks like an email, a credential, a JWT or a key), so one bad event never costs a batch. `Send` and `Track` return a `*ValidationError` naming the event and the field. - **Idempotent.** Each event has an `EventID` (the SDK makes one when you leave it empty) that stays the same across retries. The same id and content again is a duplicate, never counted twice. - **Answers.** A `429`, a `5xx`, a timeout or a `409 site_changed` is sent again later, after the answer's `Retry-After` when it gives one. A pause for your studio's balance is not an error: the paused ids come back in `RefusedIDs`, cost nothing, and `Track` sends them again later. A refused key, or website analytics being off, stops the `Server` and returns a `*RefusalError`. - **Memory only.** `Track` keeps at most `MaxQueueSize` events (10,000 by default) in memory and returns `queue_full` past it. `Close` sends for at most about 1.5 seconds; events still waiting after that are dropped. - **Usage.** One accepted event is one event on your studio's usage, at the usual rate. Duplicates, refusals and paused events are free. | Call | What it does | | --- | --- | | `ravensight.NewServer(cfg)` | Makes a `Server`. Never fails: without a valid `gt_srv_` key it is inert, and `Track` and `Send` return a `*RefusalError`. | | `srv.Track(ev)` | Validates and queues an event to be sent in the background. Never blocks. | | `srv.Send(ctx, evs...)` | Validates and sends now, in batches of 50, and returns the server's answer. Retries until `ctx` ends. | | `srv.Flush(ctx)` | Sends the queued events now and waits. | | `srv.Close()`, `srv.Shutdown(ctx)` | Sends what is left and stops. | | `srv.Stats()` | Counters. | `ServerConfig` takes the `ServerKey`, `Optional`, `APIURL`, `HTTPClient`, `Logger`, `MaxQueueSize`, `FlushInterval` (5 seconds) and `RequestTimeout` (15 seconds). ## Playtest During a [Ravensight Playtest](https://ravensight.io/docs/playtest/) run the runner gives the build a token. The client reads it from `Config.Playtest`, then the environment (`RAVENSIGHT_PLAYTEST_TOKEN`, `RAVENSIGHT_PLAYTEST_RUN_ID`, `RAVENSIGHT_PLAYTEST_JOB_ID`, `RAVENSIGHT_PLAYTEST_PERSONA`), then the command line (`--ravensight-playtest-token=` and `--ravensight-playtest-run-id=`). With a token the device id is `pt-` in memory only, every request carries the token, events are tagged as the run's, nothing is written to disk, the player's saved opt-out is ignored, and identify and campaign links send nothing. A token without a run id never runs as a real player: nothing is sent. ## Compatibility | ravensight-go | Go | Notes | | --- | --- | --- | | 0.1.0 | 1.22 or newer | Preview. Built and tested on macOS with the race detector, against a fake HTTP server. Windows, mobile and browser builds have not been run, and no released game has shipped with it yet. | The tests run with `go vet./...` and `go test -race./...`, against a fake HTTP server and temporary directories: no network, and nothing written to your real storage directory. See [where the SDKs run](https://ravensight.io/docs/platform-support/) for every SDK side by side. Source: https://ravensight.io/docs/go-sdk/ Last updated: 2026-11-20 --- # Ingestion for anything that isn't Godot Building for the web or Node? The [JavaScript SDK](https://ravensight.io/docs/javascript-sdk/) wraps everything below in a zero-dependency client with batching, an offline queue, and tab-close flushing. Unity developers use the [Unity SDK](https://github.com/Reality-Software-Entertainment/ravensight-unity), and LÖVE games use the [LÖVE SDK](https://ravensight.io/docs/love-sdk/). Everything else speaks plain HTTP. Sending from your own backend into your website analytics, such as an account created or a payment confirmed? That is not game ingestion: use [server events](https://ravensight.io/docs/server-events/), with the website's secret server key. The Godot SDK is a client for this same surface. If you're on Unity, Unreal, a browser game, or anything else, this is what to call directly. The ingest endpoints answer any web origin, so browser games on GitHub Pages, itch.io or your own site need no CORS setup. Base URL ``` https://api.ravensight.io ``` ## POST /api/v1/session Opens a session for a device. Auth: `X-API-Key` (your ingest key). The game identity comes from the key, never from the body. Request ``` POST /api/v1/session X-API-Key: gt_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Content-Type: application/json { "deviceId": "3f9ac2e17b5d4c0e8a61f2b9d7c04e5a-windows", "gameVersion": "1.4.2", "platform": "Windows" } ``` Response, 201 ``` { "token": "st_9f2c...redacted", "expiresAt": "2026-08-29T16:00:00.000Z", "expiresIn": 86400 } ``` Errors: `400 missing_device_id` when `deviceId` is absent, `401 invalid_api_key` or `missing_api_key`, `403 tracking_disabled` when the game's kill switch is off, `429 rate_limited` at more than 60 session creations per minute for the game. A live key is never refused over what a device sends here, because an SDK would resend the same request for ever. A `platform` or `gameVersion` loses any control characters (line breaks, tabs, escape codes) and is then cut to 128 characters, one that is neither text nor a number is left out, and a `deviceId` past 256 characters is stored as a short id derived from it by hash, so the same device stays one device. **Distribution.** The body may carry an optional `distribution`, a string of at most 40 characters naming where the build was distributed, such as `native-release` or `web-itch`, with no control characters. It is stored on the session as the client declared it and added to each of the session's events as a `distribution` property unless the event sends its own (`400 invalid_distribution` for anything that is not such a string). **With a [public key](https://ravensight.io/docs/public-builds/)**, `/session` can also answer `403 key_expired`, `403 key_paused`, `403 origin_not_allowed` when the key enforces its origin list, `403 origin_required` when it also requires one and the request sends no `Origin`, `403 version_not_allowed` when `gameVersion` is missing or not on the key's version list, `403 public_key_forbidden` for a doctor session or a playtest run, which need the game's live key, `400 invalid_device_id` for a device id that is not text or over 256 characters, `400 invalid_platform` or `invalid_game_version` for one past 128 characters, not text, or holding a control character such as a line break or tab, and `429 rate_limited` from the key's own session limits. The session token lives the key's `session_ttl_seconds`, or until the key's expiry date if that comes first. **Joining a session.** Send `joinToken`, the token of a live session from the same game, instead of a `deviceId`, and the new session shares that session's analytics session id and device id. Use it when a second client of the same player, such as your game server, should report into the player's session. The new session keeps its own `platform` and `gameVersion` and never outlives the one it joined. The answer carries the same `token`, `expiresAt` and `expiresIn` plus `joined: true` and `synthetic`, which the server decides from the session that was joined, so your game server can rely on it instead of a flag the browser sends. A fresh session's answer carries neither field. A `deviceId` in the same body never becomes the new session's device id. A join from a synthetic (playtest) session stays synthetic: the new session belongs to the same run, its events are marked synthetic and are never metered, and feedback sent through it is marked synthetic too. It keeps the playtest's own platform whatever the body says, and once the run or its job has finished, its events and feedback answer `403 playtest_job_closed`. When a join from a synthetic session also sends the player's own `deviceId`, that device's real sessions in the same game from the last 15 minutes join the run too, their events are marked synthetic, and the answer adds `adopted` with how many. Events they sent before the join were already counted on the event meter and are not refunded, so have your game server open its session with the browser's session token as `joinToken` before it tracks the sign-up, and nothing is tracked as real first. ``` { "joinToken": "st_9f2c...redacted", "gameVersion": "1.4.2", "platform": "dedicated-server" } ``` A join from a playtest session that adopted one earlier session answers: ``` { "token": "st_41ab...redacted", "expiresAt": "2026-10-15T19:30:00.000Z", "expiresIn": 3600, "joined": true, "synthetic": true, "adopted": 1 } ``` A token that is unknown, expired, revoked, from another game, or from a doctor session answers `401 invalid_join_token`, the same answer for each, so a token's existence never leaks; so does a join sent with `"platform": "doctor"` or a playtest header. A `platform` or `gameVersion` that is not a string or number answers `400 invalid_platform` or `invalid_game_version` on a public key join; a live key joins, stores a number as text and leaves anything else out. Joins count toward the same 60 a minute. ## GET /api/v1/settings Reads the tracking kill switch, and names the game the key belongs to, so a client or the doctor can confirm it ships the key for the game and environment it meant. Auth: `X-API-Key`. Response, 200 ``` { "trackingEnabled": true, "game": { "slug": "nebula-drifter", "name": "Nebula Drifter", "environment": "production" }, "key": { "kind": "live", "label": null } } ``` `slug` is the key's own game id, never another game's, and the answer never includes the key or its hash. `key` says which kind of key answered: `live` for the game's `gt_live_` key, or `public` with the label you gave a [public key](https://ravensight.io/docs/public-builds/). An address on the game's block list gets `403 ip_blocked`, and more than 30 reads a minute from one address on one key get `429 rate_limited` with a `Retry-After` header. ## POST /api/v1/track Sends a single event. Auth: `X-Session-Token` (from step above). Request ``` POST /api/v1/track X-Session-Token: st_9f2c...redacted Content-Type: application/json { "event": "level_completed", "data": { "level": 3, "score": 15000, "time_seconds": 87.4 }, "timestamp": } ``` Response, 202 ``` { "accepted": 1 } ``` `timestamp` is optional and defaults to the time the server receives the event. Send unix milliseconds, so that events in one second keep their order in funnels and sessions. A value below 100,000,000,000 is read as unix seconds and stored on the whole second, so a client that sends seconds keeps working exactly as it did, and funnels read its events in one second by step. A timestamp in the future is stored as now. For timestamps in milliseconds, a clock up to a minute ahead moves its whole batch back by that much instead, so the batch keeps its order. An event whose timestamp is more than 90 days old is dropped: it is not stored and not charged, and it is counted as `timestamp_too_old` on the Implementation health card. The request still succeeds, so `accepted` can be lower than the number of events you sent, on this endpoint and on `/track/batch`. A [typed event](https://ravensight.io/docs/dashboard/#typed-events) that breaks its contract is stored with `rs_invalid` rather than refused, and the 202 body adds `"invalid": n` only when there was one. A purchase of 4.99 US dollars, in minor units: ``` { "event": "gem_pack_bought", "data": { "rs_kind": "purchase", "rs_amount": 499, "rs_currency": "USD", "rs_item_type": "gems", "rs_item_id": "gem_pack_small" } } ``` ## POST /api/v1/track/batch Sends up to 50 events in one call. Same auth as `/track`. Request ``` POST /api/v1/track/batch X-Session-Token: st_9f2c...redacted Content-Type: application/json { "events": [ { "event": "level_started", "data": { "level": 3 } }, { "event": "checkpoint_reached", "data": { "idx": 2 } } ] } ``` Response, 202 ``` { "accepted": 2, "duplicates": 0 } ``` `duplicates` counts events skipped because their `rs_event_id` was already stored for that device on this game within the key's dedupe window (at least 24 hours by default); they are not stored twice and not charged (see [duplicates and retries](https://ravensight.io/docs/public-builds/#public-timestamps-retries)). A public key always answers both fields. The live key adds `duplicates` only when an event in the request carried an `rs_event_id`; otherwise its answer is `{ "accepted": 2 }`. Errors: `400 invalid_batch` when `events` is missing or empty, `400 batch_too_large` above 50 events or past the 512 KB body limit, so an SDK splits the batch and sends again, `400 missing_event` if any entry lacks an `event` name. **With a [public key](https://ravensight.io/docs/public-builds/)**, the key's policy adds these `400` answers, each naming the `index` of the first event that broke it (0 on `/track`): `missing_event`, `event_not_allowed` (the name is not on the allowlist), `event_too_large` (above `max_event_bytes`), `invalid_event_data`, `too_many_properties`, `payload_too_deep`, `string_too_long`, `invalid_number` (a number that is not finite), `reserved_key` (an `rs_` key Ravensight does not read, or an `rs_kind` outside its values) and `invalid_event_id`. `batch_too_large` (above `max_batch`) refuses the whole batch and has no index. A session whose key was paused, revoked or expired answers `401 public_key_inactive`: open a new session. It can also answer `429 public_key_ceiling` when the batch would take the key past its optional monthly ceiling; the whole batch is refused and `Retry-After` runs to the start of the next UTC month. On any key, `429 quota_exceeded` with `reason: "needs_funds"` means the included allowance is used and the prepaid balance cannot buy the next block of events. Add funds to keep accepting events. None of these refusals is charged. Keys that start with `rs_` in event data are reserved. An `rs_kind` that is not one of the nine kinds, `level_start`, `level_complete`, `death`, `none`, `purchase`, `resource`, `progression`, `error` or `health`, and any other `rs_` key Ravensight does not read, is stored as sent and counted as `rs_kind_unknown` or `rs_key_unknown` on the Implementation health card. One is the server's own: `rs_link`, the [campaign link](https://ravensight.io/docs/campaign-links/#campaign-links-players) a session arrived by. Send it as `campaignLink` on `POST /session`, never in event data: one in event data is replaced by the session's, or dropped. **What the dashboard reads from your events.** `level`, `location` and `track` in `data` fold into one place, and the first non-empty one wins. The level funnel counts three kinds at a place: `level_start`, `level_complete` and `death`. Set `rs_kind` to say which one an event is; without it the kind is read from the event name. An event with a place and none of those kinds is shown as navigation only, stays out of the funnel, and is counted as `place_without_kind` on the Implementation health card. Send `rs_kind: "none"` when the place is intentional. The full rules are in [how the built-in detections read your events](https://ravensight.io/docs/dashboard/#detection-rules). ## GET /api/v1/agent/suggestions Experimental, machine-readable design suggestions from your weekly digest. Auth: `X-API-Key`. Returns an empty array until a digest has run for your game. ``` { "suggestions": [] } ``` ## GET /api/v1/doctor/ping/:nonce The read-back for [the doctor's live check](https://ravensight.io/docs/doctor/). Auth: `X-API-Key`. A session opened with `"platform": "doctor"` lives ten minutes, gets a device id the server chooses, and may send only `ravensight_doctor_ping`, ten a minute per game (`400 doctor_event_only` for any other name, and for feedback and player reports). Its events are kept out of your analytics and your event usage. This endpoint answers whether the ping whose `rs_doctor` value is `:nonce`, 32 lowercase hex characters, was stored for the key's game in the last 15 minutes. Response, 200 ``` { "found": true, "acceptedAt": "2026-10-10T12:00:01.250Z" } ``` `404 {"found": false, "error": "ping_not_found"}` until the event is stored, which can take a few seconds while it is batched. `400 invalid_nonce` for a malformed nonce, `429 rate_limited` above 30 reads a minute for the game, `503 storage_unavailable` when event storage is down. A nonce sent by another game reads as not found. ## POST /api/v1/feedback Auth: `X-Session-Token`. Request ``` POST /api/v1/feedback X-Session-Token: st_9f2c...redacted Content-Type: application/json { "message": "Level 3's second checkpoint feels unfair.", "category": "suggestion", "rating": 4 } ``` Response, 201 ``` { "id": "66c1f2a9d4e8b0021f9a7c31" } ``` `category` and `rating` are both optional. When present, `category` must be one of `bug`, `suggestion`, `complaint`, `praise`, `playtest`, or `other`. ## Errors | Status | Error | Meaning | | --- | --- | --- | | 400 | `missing_device_id`, `missing_event`, `invalid_batch`, `batch_too_large`, `event_name_too_long`, `event_too_large`, `invalid_event_data`, `missing_message`, `message_too_long`, `invalid_category`, `invalid_feedback`, `doctor_event_only`, `invalid_nonce`, `invalid_distribution` | Malformed request body or a payload ceiling (see Limits). | | 400 | `missing_event`, `event_not_allowed`, `batch_too_large`, `event_too_large`, `invalid_event_data`, `too_many_properties`, `payload_too_deep`, `string_too_long`, `invalid_number`, `reserved_key`, `invalid_event_id` | A public key's policy refused an event. The answer carries the `index` of the first offending event (none for `batch_too_large`, which refuses the whole batch). Drop that event and never retry it. | | 400 | `invalid_device_id`, `invalid_platform`, `invalid_game_version` | On a public key's `/session`: a device id that is not text or over 256 characters, or a platform or game version over 128 characters, not text, or holding a control character. A live key stores bounded values instead of refusing. | | 401 | `missing_api_key`, `invalid_api_key`, `invalid_join_token`, or a missing/expired session token | Bad or absent credentials for the header the endpoint expects, or a `joinToken` that cannot be joined. | | 404 | `ping_not_found` | The doctor's ping is not stored yet, or was never sent for this game. Only returned by `GET /api/v1/doctor/ping/:nonce`. | | 403 | `tracking_disabled` | The game's server-side kill switch is off. Only returned by `POST /api/v1/session`. | | 401 | `public_key_inactive` | The public key that opened this session is paused, revoked or expired. Open a new session, which answers the key's real state. | | 403 | `key_expired`, `key_paused`, `origin_not_allowed`, `origin_required`, `version_not_allowed`, `public_key_forbidden` | A public key is expired or paused, its policy refused the origin, a missing origin or the version, or it called an endpoint public keys cannot use. Stop for this run. | | 429 | `rate_limited` | Per-game ceiling hit: 60 session creations or 600 tracked events per minute, or one of a public key's own limits per key, session or device id. Carries a `Retry-After` header in seconds. | | 429 | `quota_exceeded` | Monthly event quota reached for this account. Carries a `Retry-After` header, in seconds until the quota resets at the next UTC month. With `reason: "needs_funds"`, the prepaid balance cannot buy the next block of events: add funds to keep accepting events. | | 429 | `public_key_ceiling` | A public key reached the optional monthly ceiling its owner set. Carries a `Retry-After` header to the next UTC month. Nothing in the refused batch was stored or charged. | | 503 | `storage_unavailable` | Event storage is temporarily unavailable. Carries `Retry-After: 60`; nothing was accepted or charged against quota. | Source: https://ravensight.io/docs/http-api/ Last updated: 2026-11-19 --- # Send events from your own servers Server events let your own backend send events, such as an account created, a payment confirmed or a nightly job finished, into the analytics of one of your websites: a title's Game website or your company website. Your server sends them over HTTPS with the website's secret server key, and they have their own Server events report, kept apart from what visitors do in the browser. ## When to use server events Send each event from the place that knows first that it happened. | What happened | Send it with | | --- | --- | | A visitor opened a page or clicked on your website | The [website snippet](https://ravensight.io/docs/websites/#websites-setup) in the browser, with the website's public key | | Your server did something: created an account, confirmed a payment, received a webhook, finished a scheduled job | Server events, with the website's secret server key | | A player did something in your game | The [SDK for your engine](https://ravensight.io/docs/platform-support/) or the [HTTP API](https://ravensight.io/docs/http-api/), with the game's ingest key | Server events belong to a website, not to a game. They need no game, environment or session, and they never appear in a game's reports. When the event is about a player in your game, such as a purchase your game server confirms, send it to the game instead: your game server can [join the player's session](https://ravensight.io/docs/http-api/#post-api-v1-session) and track the event there. Server events show only in their own report. They never change any other website report, so visitors, page views, events, goals and funnels stay what the browser saw (see [where the events show](https://ravensight.io/docs/server-events/#server-events-reports)). ## Create the server key Each website has at most one server key. Owners, admins and members, the roles that can configure a website, can create, replace and revoke it. 1. Open the website's setup. For your company, open website setup from the Company website card on Company home. For a title, select its project and open Live data > Game Website, then Setup. Collect website activity must be on: while it is off, the key is refused. 2. In the Server key card, choose Create server key. The key starts with `gt_srv_`. 3. Copy it straight into your server's secret settings, for example an environment variable named `RAVENSIGHT_SERVER_KEY`. The key is shown this once. Ravensight stores only a one-way hash of it and cannot show it again. Afterwards the card shows the key's first characters, when it was created and when your backend last used it. Replace key makes a new key, shown once, and the old key stops working at that moment, so update your server straight away. Revoke removes the key, and requests that carry it are refused from then on. Removing the website removes its key. Server events do not mark the website as installed. Verify installation still waits for the browser snippet; the key's last use is what shows your backend is sending. **Keep the key on your server.** Anyone who holds it can add events to your website, and those events count toward your studio's usage. Never put it in a web page, a game build, a mobile app or a repository; the website snippet's public key is the one made for browsers. A request that carries an `Origin` header, as every browser request does, is refused with `403 server_only`, so a server key never works from a web page. No MCP tool or agent token can read or change it. ## Send a request Request ``` POST https://api.ravensight.io/api/v1/site/server-events Authorization: Bearer gt_srv_... Content-Type: application/json { "events": [ { "eventId": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "name": "account_created", "timestamp": 1795076742620, "actorId": "account-48213", "properties": { "plan": "free", "method": "password" } } ] } ``` One request carries 1 to 50 events. The JSON body may be at most 512 KB, counted after any gzip is undone, and you may send it compressed with `Content-Encoding: gzip`. Send no cookie and no `Origin` header. The body holds only `events`, and each event only the five fields below. It never names a website, studio or game: the key alone decides which website the events join and which studio's usage they count toward. | Field | Rules | | --- | --- | | `eventId` | Required. 8 to 128 letters, digits, `_`, `.`, `:` or `-`. Make a new one when the event happens, such as a random UUID, and keep it for every retry (see [retries and duplicates](https://ravensight.io/docs/server-events/#server-events-retries)). | | `name` | Required. A letter, then up to 79 letters, digits, `_`, `.` or `-`, such as `account_created`. | | `timestamp` | Required. When it happened, as a whole number of Unix milliseconds. At most 5 minutes ahead and 90 days back. | | `actorId` | Optional. Your own opaque id for the person or device the event is about, 8 to 128 letters, digits, `_`, `.`, `:` or `-`. Never an email address. Leave it out for an event about your backend itself. | | `properties` | Optional. Up to 24 flat keys and values (see [actors and properties](https://ravensight.io/docs/server-events/#server-events-actors)). | The whole batch is checked before anything is stored or charged. One event that breaks a rule refuses the request with a `400`, and nothing in it is recorded. **Limits.** 600 requests a minute for each key, and 6,000 events a minute for one website. Past either, the answer is `429 rate_limited` with a `Retry-After` header. ## Actors and properties `actorId` says who or what the event is about: the id your own database already uses for an account, a player or a device. It must be opaque. An email address, a name or a phone number is never an actor id, and the allowed characters leave no room for an email address. A short number needs a prefix to reach 8 characters, such as `account-42`. Ravensight never stores the id you send. It stores a keyed one-way hash of it, made separately for each website, so the same id sent to two websites counts as two different actors, and your id cannot be read back. The report counts how many different actors sent each event. Events sent without an `actorId` belong to your backend itself and are never counted as an actor. Properties follow these rules: - At most 24 keys. A key is a letter, then up to 63 letters, digits or underscores. - Some keys are reserved, in any letter case: keys that start with `rs_`, `history_` or `ravensight_`, and the keys `context`, `identity_kind`, `session_provenance` and `profile_provenance`. - A value is a string of at most 200 characters, a finite number, `true`, `false` or `null`. No lists and no nested objects. - All of an event's properties together are at most 4 KB as JSON. - A string that looks like a person or a credential is refused: one that holds an `@`, a label such as `password=`, `token:` or `Bearer` followed by a space, a signed web token, a Ravensight key, or 80 or more letters and digits in a row. A property that breaks a rule is answered with `400 invalid_properties`. Keep identifiers in `actorId`, never in properties. ## Answers and errors Response, 200 ``` { "accepted": 2, "duplicates": 1, "conflicts": 0, "refused": 0, "acceptedIds": ["7c9e6679-7425-40de-944b-e07fc1f90ae7", "...", "..."], "conflictIds": [], "refusedIds": [], "paused": false } ``` Every event in the request is counted once: - `accepted`: stored now. - `duplicates`: already stored with the same `eventId` and content, so not stored or charged again. `acceptedIds` lists both of these. - `conflicts`: an `eventId` already stored with different content. Only those events are refused, listed in `conflictIds`; the rest of the batch is stored. - `refused`: stopped by a pause, listed in `refusedIds`. Collection pauses when your studio's included events are used up and the prepaid balance cannot cover more. The answer then has `"paused": true` and a `reason`: `needs_funds`, or `backstop` at the monthly [safety ceiling](https://ravensight.io/docs/limits/#safety-ceiling), where adding funds does not help. After adding funds, send the refused events again with the same ids. When a pause means nothing in the request was accepted, the status is `429` with `"error": "collection_paused"` and the same fields. Any other error answer names its code in `error`. | Answer | Meaning, and what to do | | --- | --- | | `400 invalid_events` | The body is not JSON, holds a field it should not, or is not a list of 1 to 50 events; or an event has a field missing, of the wrong type or outside its rules. Nothing was stored. Fix the request: sent again unchanged, it fails the same way. | | `400 invalid_timestamp` | A timestamp is more than 5 minutes ahead or more than 90 days back. Nothing was stored. Check your server's clock, and drop events older than 90 days. | | `400 before_cutover` | A timestamp is earlier than this website's cutover, the point set when its earlier history was imported. Nothing was stored. Send only events from after the cutover. | | `400 invalid_properties` | A property breaks the rules above. Nothing was stored. Fix or remove the property. | | `401 missing_server_key` | No `Authorization` header. Send the key. | | `401 invalid_server_key` | The key is unknown, was replaced or revoked, or its website is removed or has Collect website activity off. Use the website's current key, and check that collection is on. | | `403 server_only` | The request carried an `Origin` header, as every browser request does. Send from your server only. | | `404 not_found` | Website analytics is not available. Nothing was stored. | | `409 site_changed` | The website, its settings or its key changed while the request was handled, or too many of its events are waiting to be stored. Send the same request again shortly with the current key: events already accepted come back as duplicates. | | `413 payload_too_large` | The body is over 512 KB after gzip is undone. Send fewer events in each request. | | `429 rate_limited` | Over 600 requests a minute with one key, 6,000 events a minute for one website, or 3,000 requests a minute from one sending address, which backends on a shared address count together. Wait the seconds in `Retry-After`, then send the same request again. | | `429 collection_paused` | Nothing was accepted: the included events are used up and the balance cannot cover more (`needs_funds`: add funds, then send the refused events again), or the account reached the monthly safety ceiling (`backstop`). | | `5xx`, a timeout or no answer | The request may or may not have been stored. Send the same request again, waiting longer each time. | ## Retries and duplicates `eventId` makes a request safe to send again. Ravensight stores an event once for each website and id: the same id with the same content is answered as a duplicate, stored once and charged once. The same id with different content is counted in `conflicts` and not stored. So give each event its own id when it happens, keep the id and everything else about the event for every retry, and set the timestamp when the event happens, never when you send it. Retry when there was no answer (a network error or a timeout), a `5xx`, a `429 rate_limited` or a `409 site_changed`: wait, send the same events again, and wait longer each time. Never retry any other `4xx` unchanged, because it fails the same way again. After a timeout, resend the whole batch: the events that did get stored come back as duplicates, and they are free. Events refused by a pause can wait and be sent again once you add funds. An id from your own records works too, as long as it names one event, such as `payment-8812-confirmed`. That lets an event that must never be lost, such as a payment, be written to your own database with the payment and sent from there until it is accepted. ## Example for Node A complete sender for Node 18 or newer in one file. It has no dependencies and uses only the built-in `https` module. - It keeps a queue in memory of at most 10,000 events. Past that it drops the oldest, so an outage cannot fill your server's memory. - It sends batches of up to 50: as soon as 50 are waiting, and every 5 seconds otherwise. - Each request gets 10 seconds. No answer, a `5xx`, a `429` or a `409 site_changed` is retried up to five times, waiting about 1, 2, 4, 8 and 16 seconds or the `Retry-After` the answer gives, then the batch waits in the queue for the next flush. Any other `4xx` is logged and never retried. - Every retry sends the same body, so the same `eventId` values. - When collection pauses, it keeps the refused events and sends them on a later flush. It logs any conflicts. - It reads the key from the `RAVENSIGHT_SERVER_KEY` environment variable, and checks names, actor ids and properties against the rules above when you call `track`, so a mistake throws in your code instead of failing a whole batch later. - `close()` sends what is left when your process shuts down. server-events.mjs ``` // server-events.mjs: send Ravensight server events from Node 18 or newer. // No dependencies. The server key stays on your server, in an environment variable. import https from 'node:https'; import { randomUUID } from 'node:crypto'; const NAME = /^[a-zA-Z][a-zA-Z0-9_.-]{0,79}$/; const ACTOR = /^[A-Za-z0-9_.:-]{8,128}$/; const KEY = /^[A-Za-z][A-Za-z0-9_]{0,63}$/; // Property keys the server keeps for itself, in any letter case. const RESERVED_PREFIX = /^(?:rs_|history_|ravensight_)/i; const RESERVED_KEYS = ['context', 'identity_kind', 'session_provenance', 'profile_provenance']; const reserved = key => RESERVED_PREFIX.test(key) || RESERVED_KEYS.includes(key.toLowerCase()); // String values the server refuses because they look like a person or a credential. const CREDENTIAL = /@|%40|(?:bearer|password|secret|token|authorization)[=:]|(?:^|\s)bearer\s/i; const TOKEN = /^eyJ[\w-]+\.|\bgt_[a-z]+_[\w-]{8,}|[\w-]{80,}/; const sleep = ms => new Promise(resolve => setTimeout(resolve, ms)); export class ServerEvents { constructor({ key = process.env.RAVENSIGHT_SERVER_KEY, url = 'https://api.ravensight.io/api/v1/site/server-events', maxQueue = 10000, // past this, the oldest events are dropped batchSize = 50, // the most one request may carry flushMs = 5000, // send what is queued this often timeoutMs = 10000, // give up on one request after this long retries = 5, // tries after the first, then the batch waits for the next flush backoffMs = 1000, // the first wait between tries; it doubles, up to 30 seconds log = console.warn, } = {}) { if (!key?.startsWith('gt_srv_')) { throw new Error('Set RAVENSIGHT_SERVER_KEY to the website server key'); } Object.assign(this, { key, maxQueue, timeoutMs, retries, backoffMs, log }); this.url = new URL(url); this.batchSize = Math.min(batchSize, 50); this.queue = []; this.flushing = null; this.timer = setInterval(() => this.flush(), flushMs); this.timer.unref(); // the timer alone never keeps the process running } // Queue one event and return its eventId. actorId is your own opaque id, never an email. track(name, { actorId, properties, timestamp = Date.now() } = {}) { if (!NAME.test(name)) throw new Error(`Invalid event name: ${name}`); if (actorId !== undefined && !ACTOR.test(actorId)) { throw new Error('actorId must be 8 to 128 of A-Z a-z 0-9 _ . : -'); } if (properties !== undefined) checkProperties(properties); const event = { eventId: randomUUID(), name, timestamp }; if (actorId !== undefined) event.actorId = actorId; if (properties !== undefined) event.properties = properties; this.queue.push(event); this.trim(); if (this.queue.length >= this.batchSize) this.flush(); return event.eventId; } // Send everything queued. Only one flush runs at a time. flush() { this.flushing ??= this.drain() .catch(error => this.log(`Ravensight flush failed: ${error.message}`)) .finally(() => { this.flushing = null; }); return this.flushing; } // Stop the timer and send what is left. Call it before the process exits. async close(timeoutMs = 8000) { clearInterval(this.timer); this.retries = Math.min(this.retries, 1); // shutting down: two tries at most const deadline = new Promise(resolve => setTimeout(resolve, timeoutMs).unref()); await Promise.race([this.flush(), deadline]); if (this.queue.length) this.log(`${this.queue.length} Ravensight events were not sent`); } trim() { const over = this.queue.length - this.maxQueue; if (over > 0) { this.queue.splice(0, over); this.log(`Ravensight queue full: dropped the ${over} oldest events`); } } async drain() { while (this.queue.length) { const batch = this.queue.splice(0, this.batchSize); const later = await this.send(batch); if (later.length) { // keep them, oldest first, for the next flush this.queue.unshift(...later); this.trim(); return; } } } // Send one batch. Returns the events to keep for a later flush. async send(batch) { const body = JSON.stringify({ events: batch }); // the same eventIds on every try for (let attempt = 0; ; attempt++) { const res = await this.post(body).catch(error => ({ status: 0, error })); const answer = res.json || {}; if (answer.conflicts) { // An eventId reused with other content: only those events were refused. this.log('Ravensight refused reused eventIds:', answer.conflictIds); } if (res.status === 200 && !answer.paused) return []; if (answer.paused) { // The balance cannot cover more events: keep the refused ones for a later flush. this.log(`Ravensight collection paused (${answer.reason || 'needs_funds'})`); const refused = new Set(answer.refusedIds); return batch.filter(event => refused.has(event.eventId)); } const retry = res.status === 0 || res.status === 429 || res.status >= 500 || (res.status === 409 && answer.error === 'site_changed'); if (!retry) { // Any other 4xx would fail the same way again: log it and drop the batch. this.log(`Ravensight refused ${batch.length} events:`, res.status, answer.error ?? ''); return []; } // No answer, a 5xx, a 429 or site_changed: wait, then send the same body again. if (attempt >= this.retries) return batch; const backoff = Math.min(this.backoffMs * 2 ** attempt, 30000); const jittered = backoff * (0.5 + Math.random() / 2); await sleep(res.retryAfter ? Math.min(res.retryAfter, 60) * 1000 : jittered); } } post(body) { return new Promise((resolve, reject) => { const req = https.request(this.url, { method: 'POST', signal: AbortSignal.timeout(this.timeoutMs), headers: { authorization: `Bearer ${this.key}`, 'content-type': 'application/json', 'content-length': Buffer.byteLength(body), }, }, res => { let text = ''; res.setEncoding('utf8'); res.on('data', chunk => { text += chunk; }); res.on('error', reject); res.on('close', () => { if (!res.complete) reject(new Error('response cut off')); }); res.on('end', () => { let json = null; try { json = JSON.parse(text); } catch {} const retryAfter = Number(res.headers['retry-after']) || 0; resolve({ status: res.statusCode, json, retryAfter }); }); }); req.on('error', reject); req.end(body); }); } } function checkProperties(properties) { const entries = Object.entries(properties); const safe = text => text.length <= 200 && !CREDENTIAL.test(text) && !TOKEN.test(text); const valid = value => value === null || typeof value === 'boolean' || Number.isFinite(value) || (typeof value === 'string' && safe(value)); const bad = entries.find(([key, value]) => !KEY.test(key) || reserved(key) || !valid(value)); if (bad) throw new Error(`Invalid property: ${bad[0]}`); if (entries.length > 24 || Buffer.byteLength(JSON.stringify(properties)) > 4096) { throw new Error('At most 24 properties and 4 KB'); } } ``` In your server ``` import { ServerEvents } from './server-events.mjs'; const events = new ServerEvents(); // reads RAVENSIGHT_SERVER_KEY // After your own code has created the account: events.track('account_created', { actorId: account.id, // your own opaque id, never an email properties: { plan: 'free', method: 'password' }, }); // Send what is left before the process exits. for (const signal of ['SIGTERM', 'SIGINT']) { process.once(signal, async () => { await events.close(); process.exit(0); }); } ``` The queue lives in memory, so events still waiting when the process is killed without warning are lost. For an event that must never be lost, keep it in your own database and send it from there with a stable id, as above. ## Usage and billing Each accepted server event is one event on your studio's event meter, the same as a page view or custom event from the website snippet. It draws the 1,000,000 included events a month first, then your prepaid balance at the usual [events rate](https://ravensight.io/docs/limits/#rates). Server events have no price of their own. Duplicates, conflicts, refused requests and anything sent while collection is paused are free. When the included events are used up and the balance cannot cover more, collection pauses before anything is stored: answers say `paused`, or `429 collection_paused`, until you add funds. Each event is stored with its name, its time, its actor's hashed id and its properties. No IP address, user agent, page, referrer, campaign, country, device or browser is stored for a server event, and never the actor id you sent. Server events are kept for 90 days. Removing the website deletes them. ## Where the events show Server events have one report of their own, for up to 90 days at a time. It lists each event name with its count, how many different actors sent it, and when it was first and last seen. Choose an event for its daily counts and actors, and one of its properties for that property's 20 most frequent values. It holds totals only, never an actor id or a single event. Read it in two places: - In the dashboard, the Server events tab of the website's analytics: Live data > Game Website for a title, or View full website analytics on the Company website card for your company. - Over MCP, [`get_server_events`](https://ravensight.io/docs/mcp/#get-server-events), with `site:read`, at the price of any MCP call. Server events never appear in any other website report: visitors, page views, sessions, bounce rate, pages, sources, audience, Events, goals, funnels, retention, heatmaps or realtime, in the dashboard or over MCP. So a goal or a funnel cannot use a server event, and your traffic numbers stay what your visitors did. There is no link between a website visitor and an account on your server. Source: https://ravensight.io/docs/server-events/ Last updated: 2026-11-20 --- # Public builds and open-source games A free demo, a web build anyone can open, or a game whose source is public all ship the key in a place anyone can read. A public key (`gt_pub_`) is made for that case: it can only send the events you list, at the rates you set, into one environment, and you can pause or revoke it without shipping a new build. ## The trust model - **A shipped identifier is public.** Anything inside a build, a page or a download can be read by whoever has it. A Ravensight ingest key is a key to write events, never to read them: no ingest key can read your analytics, your settings beyond its own game's tracking switch, name and environment, or your account. - **A key injected at build time is not a secret.** Injecting it from CI keeps it out of your repository, which is what stops a fork from reporting into your account. It does not hide it from anyone who downloads the build. - **CORS is not a gate.** The ingest endpoints answer every web origin with `Access-Control-Allow-Origin: *`. That is what lets a browser game on any host send events; it decides nothing about who may send them. - **No token proves where an event came from.** Nothing a client sends can prove which build, which site or which fork sent it. What bounds someone who copies your key is the event allowlist and the rest of the key's policy, the rate limits, the optional ceiling and your ability to pause or revoke it. | Control | What it stops | What it does not stop | | --- | --- | --- | | Event allowlist | Every event name you did not list. An empty list refuses every event. | Fake events that use a listed name with plausible values. | | Payload rules | Large, deep, wide or malformed payloads, and reserved `rs_` keys Ravensight does not read. | Small, well formed payloads with invented values. | | Rate limits | A flood from one key, one session or one device id. | A slow, patient sender who stays under every limit, or one that makes many device ids. The per-device limits apply only when the client sends a device id. | | Monthly ceiling (optional) | Accepted events on that key past the number you set, for the rest of the month. | Spending on your other games, keys, MCP calls or AI work. It is not a cap on your bill. | | Origin hint | With enforcement on, a browser page on a site you did not list. Browsers set `Origin` and a page cannot change it. | A native build, a script or a bot, which can send any `Origin` header or none. | | Version list | Sessions that declare a game version you did not list, or none. | A client that declares a listed version string. The version is whatever the client says. | | Pause and revoke | Every new session and every event on the key, at once, including the key's live sessions. | Nothing on another key or on your live key. | ## The public key Create one in **Settings > Projects**, on the game card for the environment it should report into, beside the detection settings. A demo usually gets its own environment, so its traffic never mixes with a released game's. The full key is shown once; after that the dashboard shows its prefix and your label. A game can have at most two live public keys; a paused key still holds its place, and a revoked or expired one gives it back. A public key can call: - `POST /api/v1/session`, for an ordinary player session. - `GET /api/v1/settings`, for its own game's tracking switch and name, with `key.kind` set to `public` and `key.label` to your label. - With the session token it gets: `POST /api/v1/track` and `POST /api/v1/track/batch`; `POST /api/v1/feedback` only when the policy sets `allow_feedback`, and Player Reports only when it sets `allow_reports`. It is refused everywhere else. The agent suggestions feed, the doctor's report and ping read-back, a doctor session (`"platform": "doctor"`), a playtest run and the legacy `/api/track` answer `403 public_key_forbidden`. Every dashboard, billing, organization and MCP path answers `401`, because an ingest key is not a credential there. Like every ingest key, it never reads another game's settings: the game comes from the key, never from the request. The dashboard manages keys through the signed-in API, under `/api/v1/games/:gameId/public-keys`. `GET` lists every key of the game, revoked ones included, as `{ publicKeys, maxLive }`; each key carries its policy, this month's `accepted`, `ceiling`, `remaining` and what the ceiling's events would cost, and its `signals`. `POST` creates one and answers `201 { publicKey, key }`, the only time the full key is returned, or `409 public_key_limit` at two live keys. `PUT.../:keyId/policy` changes only the fields you send (`400 invalid_policy` names the field), and `POST.../:keyId/pause`, `.../unpause` and `.../revoke` answer `{ publicKey }`. `GET.../suggested-events` lists `game_started` and `game_exited`, which every SDK sends on its own, then the game's most frequent event names of the last 30 days, 50 names in all, which is what prefills a new key's allowlist. `GET.../suggested-policy` suggests a policy from the last 7 days of the game's real events and answers `{ policy, basis }`: `allowed_events` (the two SDK events, then the names it saw, most frequent first, at most 100), `max_properties` (the most seen plus 25 percent, at least the default), `max_event_bytes` (the 99th percentile times 1.5, rounded up to 256), `max_depth`, `max_string_length`, and the two per-minute rates (twice the busiest minute seen), each kept inside the allowed values, with the figures behind them in `basis`. It saves nothing, and a game with no recent events gets the defaults. Creating and revoking need the role that may rotate the game's key; editing, pausing and unpausing need the role that may change the game's settings. ## The policy Each public key carries its own policy, stored on the key when it is created, so a later change to a default never changes a key that already shipped. The one exception is `capture_errors`, which arrived later and is on for every key unless you turn it off. Edit it on the key's card. The limits every key already has still apply on top of it, so a policy can only make a key stricter than a live key. | Field | Default | What it does | Allowed values | | --- | --- | --- | --- | | `allowed_events` | empty | Event names the key may send. Empty refuses every event; the dashboard prefills the list from the game's recent names. | Up to 100 names. A name is any name live ingest accepts: 1 to 200 characters, no surrounding spaces, no control characters. Names starting `ravensight_` or `rs_` are reserved and refused. | | `max_batch` | 20 | Events in one `/track/batch` call. | 1 to 50 | | `max_event_bytes` | 2,048 | One event's data, serialized. | 256 to 8,192 | | `max_properties` | 40 | Keys in one event's data, counted at every level. | 1 to 50 | | `max_depth` | 2 | How deeply objects and lists may nest. Each object or list adds a level. | 1 to 4 | | `max_string_length` | 256 | Characters in one string value or key. | 1 to 1,024 | | Finite numbers | always | A number must be finite. | Always on | | `max_past_seconds` | 2,592,000 (30 days) | How old an event's timestamp may be. A game that saves its queue offline sends late events, so keep this at days. A key created before November 2026 keeps the 86,400 it was created with until you change it. | 60 to 7,689,600 (89 days) | | `sessions_per_minute` | 30 | New sessions on this key. | 1 to 60 | | `events_per_minute` | 300 | Events on this key. | 1 to 600 | | `events_per_session_per_minute` | 60 | Events from one session. | 1 to 600 | | `events_per_device_per_minute` | 120 | Events from one device id, when the client sends one. | 1 to 600 | | `sessions_per_device_per_hour` | 12 | New sessions for one device id, when the client sends one. | 1 to 120 | | `session_ttl_seconds` | 3,600 | How long a session token from this key lives. A key with an expiry date never mints a session that outlives it: the session lives the shorter of the two. | 300 to 86,400 (24 hours) | | `monthly_event_ceiling` | none | Optional and off by default. Accepted events on this key in a calendar month (UTC). The dashboard suggests 250,000 when you turn it on. | None, or 1,000 to 500,000,000 | | `dedupe_window_seconds` | 86,400 (24 hours) | How long, at least, an `rs_event_id` is remembered. 0 turns it off. A key created before November 2026 keeps the 600 it was created with until you change it. | 0 to 604,800 (7 days) | | `allowed_origins` | empty | Web origins you expect, such as `https://your-studio.example`. | Up to 20, each `scheme://host[:port]` in lower case with no path, at most 200 characters | | `enforce_origin` | false | Off: an unlisted origin is counted and shown as a signal. On: a session from an unlisted origin is refused. | Needs at least one origin on the list | | `require_origin` | false | On: a session with no `Origin` header is refused too. Native builds send none, so turn it on only for a key used by web builds alone. | Needs `enforce_origin` | | `allowed_versions` | empty | Game versions a session may declare. Empty accepts any; once set, a session with no version is refused too. | Up to 50, each 1 to 64 characters | | `allow_feedback` | false | Allow player feedback on this key. | true or false | | `allow_reports` | false | Allow Player Reports on this key. | true or false | | `capture_errors` | true | Error events (`rs_kind: "error"` with a severity of warning, error or critical, or none) pass the event allowlist under any name, and may carry a 200 character message, a 2,000 character stack and a 1,500 character log trail, even where the key's own limits are smaller. The event may grow past `max_event_bytes` by the size of its message, stack and trail only, up to 6,144 bytes. A session may send 10 a minute that need this room. The rest, and any error event larger than its room, are dropped, counted as `error_capture_limited`, and never stored or charged. A key with an empty event allowlist stays shut to error events too. On for keys created before this field existed. | true or false; false holds error events to the key's own limits | | `require_steam_ticket` | false | Require Steam verification before opening a session. | true or false; needs a Steamworks connection and app id | | `steam_app_id` | null | The Steam app whose tickets are accepted. | Positive decimal app id, or null when the requirement is off | Numbers are whole numbers. A change outside these values, an unknown field or a wrong type answers `400 invalid_policy` with the `field` it refused. A batch that breaks a payload rule answers `400` with the error and the `index` of the first event that broke it, so every SDK's batch splitting isolates and drops that event and keeps the rest. A batch longer than `max_batch` is refused whole, with no index. The codes are in [the HTTP API](https://ravensight.io/docs/http-api/). ## Rate limits, in layers A request on a public key passes every layer, and the first one that is full answers `429 rate_limited` with a `Retry-After` header. The layers run narrowest first: on `/track` the session, then the device id, then the key, then the game; on `/session` the device id, then the key, then the game. A request one layer refuses has spent only the narrower layers, so one noisy session or device cannot use up the key's or the game's minute. - **Per key:** `sessions_per_minute` and `events_per_minute`. - **Per session:** `events_per_session_per_minute`. - **Per device id:** `events_per_device_per_minute` and `sessions_per_device_per_hour`, only when the client sends a device id. The id is the client's own choice, so these bound a buggy or honest client; the key's limits and the ceiling bound one that invents ids. A public `/session` refuses a device id over 256 characters with `400 invalid_device_id`. - **Per game:** 60 sessions and 600 events a minute, shared with every other key on the game. - **Per IP address:** 100 requests a minute. Players who share one address, such as a LAN party, a school, a venue's network or a mobile carrier, share this budget, so a busy room can see `429` sooner than one player would. A rate limited request counts once per window on the key's usage, not once per retry. Each limit is counted on the API server that answers the request; see [Usage, billing and limits](https://ravensight.io/docs/limits/). ## Timestamps, duplicates and retries An event whose timestamp is older than `max_past_seconds` is dropped the way a live key drops one older than 90 days: it is not stored or charged, the call still answers `202`, and `accepted` is lower than the number you sent. Give every event a unique `rs_event_id` string in its data and a resend is never stored twice. For at least `dedupe_window_seconds` (it can run a little longer, never shorter), an id the same device already sent on this game is skipped, even under a new session: it is not stored, not counted and not charged, and the answer counts it in `duplicates` instead of `accepted`. An id is 1 to 64 letters, digits, `_` or `-`; anything else answers `400 invalid_event_id`. The game's live key dedupes the same way, with a 24 hour window, for events that carry an id. A resend later than the window can be stored twice; the Data quality card counts those as the same event stored twice. A refused or failed request gives its ids back, so the resend is accepted. The public-build SDK releases add the id for you; see [SDK behavior](https://ravensight.io/docs/public-builds/#public-sdk-behavior). | Answer | What the client does | | --- | --- | | `202` | Done. Remove the events from the queue, including any counted as duplicates. | | `400` | Drop the event at `index` and never retry it. Send the rest of the batch again. A `batch_too_large` answer has no index: split the batch. | | `401` | Authenticate again: open a new session, then send. `public_key_inactive` means the key that opened the session was paused, revoked or expired, and the new session meets its real state. A `401` on `/session` itself means the key is unknown or revoked, so stop. | | `403` | Stop for this run. The key is paused or expired, its policy refused this origin, a missing origin, this version or this endpoint, or tracking is off for the game. | | `429` | Wait for `Retry-After`, then resend the same events with the same `rs_event_id` values. | | `5xx` | Back off, then resend the same events with the same ids. | ## Rotation, pause and revocation A game can have two live public keys, so you can rotate without a gap: create the second key, ship builds with it, and revoke the first once the old builds no longer matter. Public keys are revoke only: a revoked key never comes back, and revoking one ends its live sessions at once: their next request answers `401`. Rotating the game's live key leaves public keys and their sessions alone. **Pause** is the reversible stop. A paused key answers `403 key_paused` on every new session and its live sessions end; unpause it and the same builds report again. A key can also carry an optional expiry date, after which it answers `403 key_expired`; no session it mints outlives that date. A change made in the dashboard can take up to a minute to reach every server. Above every key, the game's own kill switch still stops every session with `403 tracking_disabled`. ## What it costs - **Enabling it is free.** Creating, pausing and revoking keys costs nothing. - **Accepted events are ordinary events.** They draw the account's included monthly allowance first. Past it, each started block of 100,000 events is bought from your prepaid balance at 5 cents. A block that is only partly used is still paid for. - **An empty balance stops ingestion.** When the next block cannot be bought, the account's ingestion answers `429 quota_exceeded` with `reason: "needs_funds"` on every key, live and public, and nothing is charged for the refused events. The key's card and the Implementation card say "Add funds to keep accepting events." - **The ceiling is optional, and off by default.** Without one, the card reads "No ceiling, buys blocks while funded". Turn it on and the dashboard suggests 250,000; the key then "stops accepting at this many events for the month even when funds remain", answering `429 public_key_ceiling`. A batch that would cross it is refused whole. The card prices it in the same blocks, for example "A ceiling of 250,000 events is 3 blocks of 100,000, $0.15 at the current block price, for this key's events past the included allowance." It limits one key; your other keys, your live key and MCP calls draw the same balance, so it is not a cap on your bill. - **Refused traffic is free.** Rejected, invalid, duplicate, rate limited, over the ceiling and origin refused events are never charged. - **Usage emails are information.** The game's owner gets one email at 80 percent of a key's ceiling and one at 100 percent, or when a batch would cross it. They do not stop anything themselves, and each lists every way a public key stops: its ceiling, an empty balance, a pause, a revoke, its expiry, and its rate limits for the moment they are exceeded. - **The billing page shows the share.** It says how many of the month's player events came through public keys, and from how many keys. Those events are already inside the player events figure, never added on top. ## Forks and source releases Never commit the key. Keep it in your CI's secret store and inject it when you build a release, so the repository, the source archive and a fork's builds have none. A fork's own CI has no access to your secrets, so its builds come out keyless, and a keyless build cannot open a session, so it sends nothing. The public-build SDK releases start inert without a key, so the game still runs. If a key does reach a public repository, pause it, create a second key, and revoke the first once your builds use the new one. ## Through your own server If your game already has accounts, keep the live ingest key on your server. After authenticating the player, your server can open `POST /api/v1/session` with `X-API-Key`, using a device or player identifier it has verified. Return only that player's session token to the client over HTTPS. The client can then send events with `X-Session-Token`; it never needs your live key. Renew an expired session through the same authenticated route. Rate limit that route and never accept an arbitrary player id from the browser. This is an HTTP integration pattern. The SDKs do not all provide a method to adopt a server-minted token. Use the [HTTP API](https://ravensight.io/docs/http-api/) for that client, or keep tracking on your server. A relay can be a temporary bridge for an existing client, but it must authenticate players, validate events and apply limits. An open relay simply moves the same abuse problem to your server. For games without accounts, use a public key with an allowlist and limits instead. ## Require a Steam ticket For a Steam build, connect Steamworks in your studio with a [Publisher Web API key](https://ravensight.io/docs/connections/), then enable `require_steam_ticket` on its public key and set `steam_app_id` to your app's decimal id. The flag defaults to false and the app id to null. Turning it on without a Steamworks connection is refused with `400 steam_connection_missing`. This setting applies to new sessions, so use a separate key for builds distributed elsewhere. Your Steam integration obtains a hex ticket with `GetAuthTicketForWebApi("ravensight")` and sends it as `steamTicket` in the session request. Ravensight checks it with Steam using your Steamworks connection's Publisher Web API key, or its first key when it has none, which Steam may refuse. The SDKs do not currently obtain or attach this ticket automatically: wire it into your session transport before enabling the requirement. See [Steam's ticket verification API](https://partner.steamgames.com/doc/webapi/ISteamUserAuth). A missing ticket answers `403 steam_ticket_required`; a refused ticket answers `403 steam_ticket_invalid`. An unusable connection, or a key Steam does not allow to check tickets, answers `403 steam_connection_missing` with one fixed message saying the connection needs a working Publisher Web API key, so a player never learns which keys you hold. Your Steamworks connection in **Settings > Connections** says why. If Steam cannot be reached, the answer is `503 steam_unavailable` with `Retry-After: 30`. None opens a session or charges for verification. Successful checks are cached for ten minutes per key and app. A joined session can reuse its parent's verification only for the same Steam app. Sessions store a keyed hash of the Steam id and the verified app id, never the raw Steam id. A valid ticket verifies access to the app; it does not prove that subsequent client event values are truthful. If you enable Steam verification or use your own account identifier, review your game's privacy disclosures for that configuration. The default random-device-id guidance below does not describe account-linked sessions; hashing a Steam id does not make it an anonymous identifier. ## SDK behavior in public builds The SDK versions listed under [platform support](https://ravensight.io/docs/platform-support/) support keyless builds that send nothing, an optional opt-in consent mode, a distribution label, and event ids that remain stable on retries. Include `game_started` and `game_exited` in your allowlist. Option names and supported transports vary by SDK; follow the [SDK comparison and linked repositories](https://ravensight.io/docs/love-sdk/#sdk-compare). The doctor can warn about a live key in source or a shipped bundle; a scan that skips an unreadable file is not proof that no key exists. Keep public keys bounded and live keys on your own server when possible. ## What the server keeps, and what it cannot tell Per key and month, Ravensight keeps the number of accepted events, counts of each refusal reason, and short, bounded lists of the origins that opened sessions and the most frequent event names that were refused for not being on the allowlist. It never stores a raw IP address: for [traffic sources](https://ravensight.io/docs/traffic/) it keeps a keyed hash and a masked form of each connecting address for 30 days, or for as long as you keep that address blocked. A session records the `distribution` the client declared, and each of its events carries it as a `distribution` property unless the event sends its own. It also records the player's country and the device fields the SDK sent; see [country and device](https://ravensight.io/docs/platform-support/#country-device). The honest limit: a native build, a script or a bot can send any `Origin`, any version string and any `distribution`. Treat all three as hints that sort honest traffic, never as proof. Source: https://ravensight.io/docs/public-builds/ Last updated: 2026-11-19 --- # Error capture An SDK with error capture reports what goes wrong in a running game on its own: uncaught errors, failed requests, console errors and clicks that did nothing. Each one is an ordinary [typed error event](https://ravensight.io/docs/dashboard/#typed-events), scrubbed, grouped by fingerprint and counted on the event meter like any other event. ## The event A captured error is an event named `error` by default (any name an allowlist could hold works) with `rs_kind: "error"` and these top-level keys. Only the top level is read. | Key | Value | | --- | --- | | `rs_severity` | `debug`, `info`, `warning`, `error` or `critical` | | `rs_message` | Required. Stored up to 200 characters, scrubbed. | | `rs_stack` | Optional. Stored up to 2,000 characters, scrubbed. | | `rs_source` | Where it came from: `manual` (or absent) for an error your code reports, or `uncaught`, `unhandled_rejection`, `request`, `console`, `log`, `dead_click` or `crash` for automatic capture. Any other value breaks the contract. | | `rs_error_type` | Optional. The error's class or type, such as `TypeError`. Stored up to 100 characters. | | `rs_trail` | Optional, one string. Up to 20 log lines before the error, oldest first, joined by a line break, stored up to 1,500 characters, scrubbed. Kept only while the game's trail switch is on. | | `rs_fp` | Written by the server: the error's fingerprint, `v1:` and 16 hex characters. One your game sends is removed. | A failed request's message is the method, the host, the path with its identifiers replaced by `:id`, and the status or `network`, for example `POST api.example.com/v1/kickoff/:id 500`. It never carries a query string, a fragment, a header or a body. A dead click's message is the control's role and name, such as `Dead click: button Kick Off`. ## What is removed before it is stored The SDK scrubs the message, stack and trail on the device, and the server scrubs them again before storing them. Error text is scrubbed once more whenever it is shown or returned (the Errors view, `get_health`, `list_error_issues` and `get_error_issue`), so errors stored under an older rule are covered too. - Email addresses become `[email]`. - Bearer tokens, token-shaped strings, Ravensight keys (`gt_`) and long random strings that contain a digit become `[token]`. A file path keeps its shape. - IPv4 and IPv6 addresses become `[ip]`. - A home folder (`/Users/name`, `/home/name`, `C:\Users\name`, `C:\Documents and Settings\name`, either slash) becomes `~`. The name is the whole folder, spaces included, so `C:\Users\Jo Ann\game` becomes `~\game`. - A web address loses its query, its fragment and any user name and password. ## How errors are grouped The fingerprint is built from the source, the error type, the message with numbers, ids, quoted text and web addresses replaced, and the file of the first frame in the stack that is your game's code (frames from the engine, the browser and the Ravensight SDK are skipped, as are line numbers and build hashes). On a native build the function name counts as well; on the web it does not, because shipped web code is usually minified. Two errors that differ only in an id or a number are one group on purpose. ## Resolving and regressions Resolve an issue with the build the fix shipped in, **Fixed in build** in the Errors view (`build` on `POST /api/v1/games/:gameId/errors/:id/status`). The issue opens again, marked Regressed, when it is seen after the resolve on that build or a later one. A build older than the fix is a player who has not updated yet, and never reopens it. Every build seen since the resolve is checked, not only the latest. Builds compare as numbers part by part (`1.10` is later than `1.9`), a leading `v` is ignored, and a pre-release such as `1.3-beta` comes before `1.3`. With no build named, only a build later than the last one the issue was seen in reopens it. A build that is not a number, such as a commit hash, has no order, so any other build reopens it. ## Owner, priority, notes and the triage log Each issue can have one owner and a priority. Set either or both with `POST /api/v1/games/:gameId/errors/:id/triage`, sending the `revision` you read plus `assigneeId` (a member of your studio, or `null` to clear it) and `priority` (`none`, `low`, `medium`, `high` or `urgent`). It answers `{ issue }` with the new revision. A request that changes nothing leaves the revision where it was. The refusals are `400 invalid_revision`, `400 nothing_to_change`, `400 invalid_priority`, `400 invalid_assignee` for anyone who is not a member of the studio, and `409 revision_conflict` when someone else changed the issue first. `POST /api/v1/games/:gameId/errors/:id/notes` with `{ text }` (1 to 1,000 characters) adds a note to the issue and answers `201 { entry }`. A note does not move the revision. It is refused with `400 invalid_note`, or `409 history_full` once an issue holds 500 steps. `GET /api/v1/games/:gameId/errors/activity` is the triage log: every step on every issue of the game, newest first, as `{ entries, nextBefore }`. Each entry names the issue, the step, when it happened and who did it. Page with `limit` (1 to 100, 50 by default) and `before`, passing back the `nextBefore` you were given without reading into it. `action` narrows the log to one step: `note`, `open`, `resolved`, `ignored`, `assigned` or `priority`. An unknown step is `400 invalid_action` and a cursor that was not returned by the log is `400 invalid_cursor`. Writing needs a role that can edit the studio; reading needs one that can read the game. A studio you share a game with reads its error issues but not your triage: no resolved or regressed dates, no fixed-in build, no owner, no priority, no notes and no history, and its triage log is empty. ## What happened around an error An issue's details in the Errors view (and `GET /api/v1/games/:gameId/errors/:id`) add three things for your own studio. - **Players who came back.** Of the devices that hit the error, the share that did not start another session within 7 days, beside the same share for devices that played in the same days and did not hit it. Each device is counted from its first time hitting the error, or from its first event for the others. It reads only days at least 7 days old, so every device had the whole 7 days: pick the last 30 days to see it. This is correlation, never cause. A higher share means players who hit this error returned less often, not that the error made them leave. Playtest and doctor sessions are never counted. - **Breadcrumbs.** For each recent example, the last 20 events of the same session before the error: the event name, its level, its kind (one of the typed kinds, or other) and how long before the error it happened. Never a property value. - **The log trail.** The `rs_trail` the device sent with each example, scrubbed again when it is read and cut to 1,500 characters, shown only while the game's trail switch is on. It is text from players' devices and is marked that way. A studio you share a game with gets none of these three. The `get_error_issue` tool returns them as `playersLost`, `breadcrumbs` and `trail`, and `get_health` lists the five biggest open issues and, for each top message, its builds with exact counts, newest build first. ## The two switches Each game has two switches in its environment card in Settings, also settable with `PATCH /api/v1/games/:gameId` as `errorCaptureEnabled` and `errorTrailEnabled` (owners and admins). | Switch | Default | What it does | | --- | --- | --- | | Capture errors automatically | On | Off: the SDK installs no hooks, and the server drops any error whose `rs_source` is automatic before it is counted, free, as `error_capture_disabled` on the Implementation health card. Errors your code reports with `rs_source: "manual"` or no source always arrive. | | Send a log trail with each error | Off | On: a captured error carries its last log lines as `rs_trail`. Off: the server removes any `rs_trail` it receives. | The SDKs read both from the session answer (`POST /api/v1/session`) and from `GET /api/v1/settings` as `"errorCapture": { "enabled": true, "trail": false }`. The server applies them as well, so a build that read its settings before you changed them still stops being charged for automatic errors. ## Limits on the device - Nothing is installed without a key, before the player's consent where your game asks for it, or while capture is off. - A session sends at most 30 captured errors, at most 3 of the same error, at most 10 with a trail, and at most 6 a minute. Past those they are dropped on the device, silently. - The hooks pass every error on to whatever handled it before, and never capture the SDK's own requests or log lines. - With a [public key](https://ravensight.io/docs/public-builds/), `capture_errors` lets error events past the allowlist with room for the message, stack and trail. ## What it costs One captured error is one event on the shared event meter, the same as any other event: it uses the included monthly events first, then the prepaid balance at the ordinary event rate (see [usage, billing and limits](https://ravensight.io/docs/limits/)). The trail adds nothing. A dropped error, on the device or on the server, costs nothing. There is no separate rate and no cap of its own; the device limits above are what bound it. ## Error text and the analyst Error messages, issue titles, build versions, breadcrumb names and trails are written on players' devices, so Huginn and the Analytics MCP tools receive them marked as player text, a message cut to 200 characters, an issue title to 120 and a version to 100, to be read as evidence and never followed as instructions. Source: https://ravensight.io/docs/error-capture/ Last updated: 2026-11-15 --- # Readable stack traces A shipped build reports stacks with minified or obfuscated names. Upload the source maps or symbol files for that build and Ravensight shows each error's stack the way you wrote it: your file, line and function beside every line a file could map. The raw stack your players' devices sent is always shown too, and each mapped line is marked as symbolicated. Stacks are read when you open an error, never when the event arrives, so a file uploaded today also fixes yesterday's errors from that build. ## File kinds and matching | Kind | File | What it does | | --- | --- | --- | | `sourcemap` | A version 3 JavaScript source map, plain or indexed | Maps a minified frame's line and column to the original file, line, column and name. Name the map after its bundle (`game.min.js.map` for `game.min.js`); a build with one map uses it for every bundle. | | `android_mapping` | The R8 or ProGuard `mapping.txt` | Retraces class and method names, and the original line where the mapping records line ranges. Where inlining leaves more than one candidate, all are named. | | `breakpad` | A Breakpad `.sym` text file | Maps `module+0xoffset` frames to the function, and the source file and line from its line records. Name it after the module (`libgame.so.sym`). | | `dsym` | A dSYM bundle, zipped | Stored and listed so it is ready; it is not read yet. Apple symbolication comes in a later release. | Files are matched to the `game_version` your game reports, so upload them with exactly that build string. Each file is checked when it arrives, and a file that is not the kind it claims is refused before anything is stored or charged. ## Limits, price and who uploads **Limits:** 50 MB a file, 500 MB and 50 files a build. Ravensight keeps the newest 10 builds of each game (a build's age is its newest upload), and each file for 90 days; the hourly sweep deletes anything past either limit. Deleting the game deletes its files. **Price:** 10,000 weighted events per started megabyte (1,000,000 bytes) a month, on the same event meter as everything else: the included events first, then prepaid balance, which is $0.005 a megabyte-month. Every file rounds up to a whole started megabyte, in every month: two 1 KB files are 2 MB. An upload pays its own month when it arrives. Each later month, the files uploaded before that month and still kept are counted for the game, each rounded up. No month is charged while the game is inactive or its error capture is off, and stacks are shown raw meanwhile; the files still expire on schedule. A part month counts as a whole month and nothing is prorated, as with extended retention. Reading stacks and listing files is free, and deleting a file refunds nothing. A game at every limit is at most 5,490 started megabytes, $27.45 a month. | Stored | Weighted events a month | After included events | | --- | --- | --- | | One 2.4 MB source map | 30,000 | $0.015 | | 10 builds of one 40 MB file | 4,000,000 | $2.00 | | 10 builds of one 500 MB file | 50,000,000 | $25.00 | **Funding:** uploading needs a funded prepaid balance. With an empty balance an upload is refused with `402 needs_funds`, and nothing is stored or charged. If a later month's payment is refused, the owner is emailed, and the game has 14 days from that notice to add funds; nothing is deleted until the notice has been sent. After that the month is not pursued and its symbol files are deleted, except files uploaded in the current month, which their upload already paid for. **Who:** only the studio owner uploads and deletes, because every stored megabyte is billed each month. Every member who can read errors sees the list with sizes and monthly cost, in the Symbol files section under Errors. A studio a game is shared with never sees its symbol files and reads raw stacks only. Uploads are never available as an MCP tool; `list_symbol_files` reads the list, and `get_error_issue` returns the symbolicated lines. ## Upload Upload from a build script ``` curl -X POST \ -H "Authorization: Bearer $RAVENSIGHT_TOKEN" \ -H "Content-Type: application/octet-stream" \ --data-binary @dist/game.min.js.map \ "https://api.ravensight.io/api/v1/games//symbols?build=1.4.1&kind=sourcemap&name=game.min.js.map&recurringConsent=true" ``` The token is the owner's CLI token (`gt_cli_`, from `ravensight-playtest login`) with the `playtest:upload` scope; the dashboard session works too. `recurringConsent=true` authorizes the monthly charge and is required. `name` is 1 to 200 letters, digits, dots, underscores, at signs, plus signs or hyphens. | Status | Error | Meaning | | --- | --- | --- | | 201 | | Stored. `charged` gives the megabytes and weighted events paid for this month. | | 200 | | The same bytes were already stored for this build. `duplicate` is true and nothing was charged. | | 400 | `invalid_build`, `invalid_kind`, `invalid_name`, `empty_file`, `invalid_symbol_file`, `recurring_consent_required` | Fix the request; nothing was stored or charged. | | 402 | `needs_funds` | Add prepaid balance; nothing was stored or charged. | | 403 | `forbidden`, `insufficient_scope` | Not the owner, or the CLI token lacks `playtest:upload`. | | 429 | `usage_backstop` | The account reached its monthly usage safety limit; nothing was stored or charged. | | 409 | `symbol_file_exists`, `too_many_files` | Another file has this name and kind in the build (delete it first), or the build holds 50 files. | | 413 | `file_too_large`, `build_too_large` | Over 50 MB a file or 500 MB a build. | | 503 | `symbols_unavailable`, `billing_unavailable`, `symbol_storage_unavailable` | Storage or billing is not available. A storage failure during upload is refunded. | ## List and delete `GET /api/v1/games/{gameId}/symbols` lists builds and files with sizes, the monthly events and the deletion dates. `DELETE /api/v1/games/{gameId}/symbols/{fileId}` deletes one file (owner only). Another studio's game answers `404`. Source: https://ravensight.io/docs/readable-stacks/ Last updated: 2026-11-15 --- # From a player screenshot to a report The player chooses to attach a screenshot in your game. Let them preview it and hide private information before sending. The SDK uploads the selected image through the existing Player Reports API; the server validates it and stores a sanitized copy. Once processing completes, open **Player reports** in the dashboard for the same game and environment. Click the thumbnail or message to see the full screenshot and context. Under **More filters**, choose **Screenshots only** to find image reports. Player-submitted screenshots are separate from **Playtest → job → Screenshots**, which contains AI playtest evidence. A processing receipt means the image was accepted for checking, not that it is already visible in the inbox. Expired images leave the report text available. ## JavaScript game canvas ``` // After the player chooses to attach an image, preview it in your UI. const screenshot = await rs.captureScreenshot(gameCanvas); const report = await rs.createReport({ message: 'The cave door stays locked after collecting three keys.', category: 'bug', level: 'cave', screenshot, context: { keys: 3 } }); const receipt = await rs.submitReport(report); // If processing, check again later from your UI, not in a tight loop. const status = await rs.getReportStatus(report); // status.status === 'complete': status.reportId is in Player reports. ``` Capture is opt-in and limited to the supplied game canvas. It does not capture the desktop. You may instead pass your own PNG, JPEG or WebP bytes. Keep the prepared report object for retries on the same SDK instance; do not create a new ID after a timeout. The SDK keeps the original session, never silently submits a second report under a new session, and never silently replaces a failed screenshot with text. A text-only report is an explicit player choice. Images must be at most 1,000,000 bytes and 4,000,000 pixels. Capture helpers scale within 1600×1600. Screenshot hashing in the browser requires HTTPS or localhost. Reports count as one event plus 20,000 events for the image. Unfinished uploads expire after 15 minutes; failed or canceled images release reserved usage. Images are retained for 90 days, subject to delivery limits, and are not automatically sent to AI providers. ## SDK support All nine stable SDKs submit a Player Report with a screenshot. Godot adds an optional overlay that captures the game viewport and lets the player highlight and redact before sending, and JavaScript's `captureScreenshot` captures only the game canvas you pass it. The other seven stable SDKs take an image your game already encoded after the player chose to attach it: Unity, Unreal, C++, iOS and Android accept PNG, JPEG or WebP (iOS a `UIImage`, Android a `Bitmap` or bytes), and LÖVE and Odin accept PNG bytes. No SDK captures the desktop, and an image is sent only when you pass one. Use the SDK README for its consent flow. Ordinary text feedback and error events never upload images; do not treat analytics event properties as file uploads. The seven preview SDKs do not document screenshot reports yet. For a direct integration, use the existing session token: `POST /api/v1/reports` with a stable `clientId`, `capturedAt`, message and image size/SHA-256; request `POST /api/v1/reports/:id/upload`; send the returned fields and file as a multipart POST to the presigned storage URL without API credentials; then `POST /api/v1/reports/:id/finalize`. Read `GET /api/v1/reports/:id` until complete or canceled. Retrying uses the same payload, ID and session. Public ingest keys must allow `allow_reports`. Never embed studio credentials in a game. Source: https://ravensight.io/docs/report-screenshot-workflow/ Last updated: 2026-11-20 --- # Check your integration before and after you ship Two layers watch your integration. The dashboard computes implementation health from your game's own live traffic, and a public scanner checks your source tree before you ship. Both feed the same card on your game's Overview page. ## Live implementation health Automatic, no setup. The API already sees what your integration does: requests rejected for size, event names exploding in cardinality, payloads brushing the 8KB ceiling, sessions with no end-of-session marker, and reserved `rs_` keys with values Ravensight does not know. The Implementation health card on Overview summarizes it over the last 7 days and tells you what to change. `no_game_exited` means no session in the window sent `game_exited`, the marker for the end of a session. It is about the missing marker, not lost delivery: the events in those sessions were stored, and session length is measured to the last stored event. The JavaScript SDK sends `game_exited` automatically in a browser; the native SDKs send it from their quit and lifecycle hooks; a scripted runner that kills the app never sends it. The finding is `info` when every session that started also sent events after `game_started`, and a `warning` only when some sessions sent nothing at all after the start, which can mean the queue is not flushed before the app closes. A game with [public keys](https://ravensight.io/docs/public-builds/) gets a `public_keys` block on the card: each live key (paused included; revoked and expired keys are history, not health) with its label, prefix, state, accepted events this month, its ceiling if one is set, what remains under it and what its events would cost in blocks, its refusal counts and its most frequent unlisted names. The key list in Settings shows the same signals. Its findings, each with the id `public_key::`: `needs_funds` (error: the included allowance is used and the balance cannot buy the next block of events, which stops every key in the account; add funds to keep accepting events), `ceiling_reached` (error: the key is at its ceiling or has refused a batch at it) and `ceiling_near` (warning: 80 percent of the ceiling), `unlisted_names` (note: events refused because their names are not on the allowlist, with the most frequent names, so you can add the ones you meant), `rejection_spike` (warning: at least 100 refusals this month and at least 20 percent of what the key was sent), `origin_mismatch` (sessions from origins not on the key's list: a warning while enforcement is off, a note when they were refused), `expiring` (warning: the key expires within 7 days) and `device_concentration` (warning: at least 1,000 events under the key and one device id sending at least half of them). Device concentration reads the key's recent sessions, those opened in the last 24 hours that are still alive, and a session ends at its lifetime (one hour by default), so it sees roughly the last session lifetime of traffic, not a full day. ## What this data can answer Below its findings, the Implementation health card lists four questions and says, from this game's own events, whether the data can answer each one. A question it cannot answer comes with a one-line reason that names what to send. - **Do players come back?** (`retention`) Needs a real event at least 7 days old, so day 7 retention has a cohort old enough to measure. - **Where do players stop progressing?** (`levels_funnel`) Needs events sent with `rs_kind: "level_start"` and an end: `rs_kind: "level_complete"`, a terminal event from the detection profile, or, when deaths are outcomes, an event sent with `rs_kind: "death"`. A death matched only by its name does not count here. Without them, a funnel read from event names alone (`level_started` and `level_completed` on events that carry a place) still answers, with a note that it is inferred and that `rs_kind` makes it exact. - **Which paths do players take between places?** (`journeys`) Needs events that carry a place. - **How do groups of players differ?** (`segments`) Needs events that carry properties of their own, beyond the reserved `rs_` keys and the place keys `level`, `location` and `track`. In the API answer the block is `answerable_questions`: a boolean per question, `reasons`, keyed by each question that is false, and `notes`, keyed by each question answered only by inference. Two warnings sit beside it on the card, with their own title and detail: `uuid_like_place_values`, when a game has at least 20 distinct places in the last 7 days and half or more look like generated ids, which split one place into thousands of rows; and `synthetic_only_traffic`, when every session in the last 7 days was synthetic: Ravensight Playtest personas or a `ravensight-doctor --live` ping, which every report leaves out by default. Its title counts each kind. ## ravensight doctor A zero-dependency scanner for your project directory. It detects your engine, finds the SDK, and lints the integration statically: event name length and cardinality, oversized inline payloads, missing track calls, and credentials that must never ship inside a game build (an MCP token or a cloud key in your tree is an error; a gt_live ingest key is not one of those, though a build players receive is better served by a [public key](https://ravensight.io/docs/public-builds/), which `--bundle` points out). Run it ``` npx ravensight-doctor # machine readable, with the full inventory npx ravensight-doctor --json # your own track wrapper npx ravensight-doctor --track-fn capture,Analytics.logEvent # send one test event and confirm it was stored RAVENSIGHT_INGEST_KEY=gt_live_xxxx \ npx ravensight-doctor --live # also submit the report to your dashboard RAVENSIGHT_INGEST_KEY=gt_live_xxxx \ npx ravensight-doctor --report ``` ## What it recognised Every report lists an inventory: each track call it found with its file, line and literal event name (or none when the name is a variable), the distinct event names with counts, the track functions it looked for, and how many ingest keys it found in the project and under test paths. The pretty report prints a summary and `--json` prints all of it. A track call counts when the name right before `.track(` is exactly `rs`, `ravensight` or `Ravensight`, with any chain before it, so `this.rs.track(` counts and `analytics.track(` does not. If your game tracks through its own wrapper, name it with `--track-fn` (comma separated and repeatable) or in a `ravensight.config.json` in the directory you scan: ``` { "trackFunctions": [ "capture", "Analytics.logEvent", { "name": "track_event", "argIndex": 1 } ], "ignore": ["vendor/", "*.generated.gd"], "gitignore": true } ``` `argIndex` says which argument holds the event name. `ignore` adds `.gitignore` style patterns, as does `--ignore`, and the root `.gitignore` is honoured unless `gitignore` is `false` or you pass `--no-gitignore`. Ingest keys under test and fixture paths are listed but never used for `--report` or `--live`. ## Status and exit codes | Status | When | | --- | --- | | `fail` | At least one error finding. | | `inconclusive` | The doctor could not check your events: it found track calls but none names its event with a string literal, or it found an ingest key but no track call it recognises. Name your wrapper with `--track-fn` to resolve it. | | `warn` | Any other warning. | | `pass` | No errors or warnings. Only a real pass says your integration looks healthy. | Exit code 1 when any error finding exists, so CI can fail the build, and 0 for `pass`, `warn` and `inconclusive`. Add `--strict` to exit 1 on anything but `pass`. An unusable config file exits 2. ## Three lines of evidence From 0.4.2 the report prints three evidence lines: **Static** (what the source scan found), **Runtime trace** (what a recorded run sent) and **Live delivery** (the `--live` ping). The top-level status is the static verdict, so a missing live check never turns a clean scan into a failure. A wrapper that adds properties to every payload centrally declares `enriches` in `ravensight.config.json`, so the contract keys it supplies are not reported missing. An undeclared wrapper is reported as `contract_prop_unproven` at `info`, not as an error. Forwarding closures are resolved automatically, and `forwarders` declares the ones the scan cannot follow. When the build injects the key (an `.xcconfig` value or a CI secret), declare `ingestKey: { "source": "build" }` and point the doctor at the built product with `--bundle`, so it checks the key that ships rather than one in source. ``` { "enriches": ["Analytics.logEvent"], "forwarders": ["Telemetry.send"], "ingestKey": { "source": "build" } } ``` Check the built bundle ``` npx ravensight-doctor --bundle path/to/YourGame.app ``` ## The live check `--live` proves the ingest key can deliver an event end to end. It reads the kill switch, opens a session with `"platform": "doctor"`, sends one `ravensight_doctor_ping` whose data carries a random `rs_doctor` value, then reads it back from `GET /api/v1/doctor/ping/:nonce` every 2 seconds, at most 10 times. The server keeps doctor sessions out of your analytics and your event usage and allows them only that one event. A ping that is read back is reported as stored, with the time the server accepted it. One accepted but not read back within 20 seconds is the warning `live_ping_unconfirmed`. A bad key, tracking switched off, or a refused session or event is the error `live_check_failed`, with a note saying which step failed. ## In CI GitHub Actions ``` - uses: Reality-Software-Entertainment/ravensight-doctor@v0 with: path: . report: true api-key: ${'$'}{{ secrets.RAVENSIGHT_INGEST_KEY }} ``` A GitLab CI snippet ships in the [ravensight-doctor repo](https://github.com/Reality-Software-Entertainment/ravensight-doctor). ## The report API The doctor submits to `POST /api/v1/doctor` with your `X-API-Key` ingest key: an engine, a summary (pass, warn or fail with counts), and up to 100 findings. An `inconclusive` result is sent as `warn`, and the inventory and live result stay on your machine. One report is kept per game, newest wins, and it appears on the Implementation health card alongside the live signals. Source: https://ravensight.io/docs/doctor/ Last updated: 2026-11-19 --- # Identify players who sign in Without sign-in, every device is its own player: one person on a phone and two browsers counts three times, and the website visits before they signed in count as a fourth. If your game has its own sign-in, call `identify` with a random id for the account after a player signs in and `resetIdentity` when they sign out. Ravensight then links the device to the account, including what it played before signing in. ## The calls Call them any time after init, even before the first session opens. Each SDK has them from the version in the table. Where it says not released yet, that SDK's current version cannot identify a player, so a game built on it counts each install as a player. | SDK | After sign-in | On sign-out | From version | | --- | --- | --- | --- | | JavaScript | `rs.identify(accountId)` | `rs.resetIdentity()` | 0.12.0 | | Godot | `Ravensight.identify(account_id)` | `Ravensight.reset_identity()` | 0.7.0 | | Unity | `Ravensight.Identify(accountId)` | `Ravensight.ResetIdentity()` | 0.6.0 | | Unreal | `Identify(AccountId)` on the Ravensight subsystem | `ResetIdentity()` | 0.6.0 | | LÖVE | `ravensight.identify(accountId)` | `ravensight.resetIdentity()` | 0.8.0 | | iOS | `Ravensight.identify(accountId)` | `Ravensight.resetIdentity()` | 0.7.0 | | Android | `Ravensight.identify(accountId)` | `Ravensight.resetIdentity()` | 0.6.0 | | C++ | `client.identify(account_id)` | `client.reset_identity()` | 0.6.0 | | Odin | `identify(client, account_id)` | `reset_identity(client)` | 0.7.0 | | [GameMaker](https://github.com/Reality-Software-Entertainment/ravensight-gamemaker) (preview) | `ravensight_identify(account_id)` | `ravensight_reset_identity()` | 0.2.0 | | [Defold](https://github.com/Reality-Software-Entertainment/ravensight-defold) (preview) | `ravensight.identify(accountId)` | `ravensight.resetIdentity()` | 0.2.0 | | [Flutter](https://github.com/Reality-Software-Entertainment/ravensight-flutter) (preview) | `Ravensight.identify(accountId)` | `Ravensight.resetIdentity()` | 0.2.0 | | [Cocos Creator](https://github.com/Reality-Software-Entertainment/ravensight-cocos) (preview) | `client.identify(accountId)` | `client.resetIdentity()` | 0.2.0, with the JavaScript SDK 0.12.0 or later installed | | [Construct 3](https://github.com/Reality-Software-Entertainment/ravensight-construct) (preview) | The Identify player action | The Reset identity action | 0.2.0, built with the JavaScript SDK 0.12.0 or later | | [Roblox](https://github.com/Reality-Software-Entertainment/ravensight-roblox) (preview) | `Ravensight.identify(player, accountId)` | `Ravensight.resetIdentity(player)` | 0.2.0 | In a LÖVE web build the page's JavaScript SDK sends the identity: call `rs.identify` and `rs.resetIdentity` on the page, with the JavaScript SDK 0.12.0 or later. The LÖVE calls are for desktop builds. Pass a random, high-entropy id, such as a random UUID or a random analytics id you make once for each account and store with it. Never pass a sequential database key, an email address, a name or a platform handle: your game's salt reaches every copy of the game, so anyone could hash 1, 2, 3 and onward and match a guessable id, while a random one cannot be guessed. The SDK refuses any value that contains `@`, an empty value, and anything longer than 256 bytes, and sends nothing for it. The identity is kept across launches. Signing in as a different account on the same device starts a fresh device id first, and so does `resetIdentity`, so the next person's play is not credited to the last account. ## What is sent The id you pass never leaves the device. Each game has its own random salt, which the SDK receives when a session opens; the SDK sends an HMAC-SHA256 of that id keyed by that salt, once per session, with the session it belongs to. Ravensight stores a player id made from that hash (`px_` and 32 hex characters). This is a pseudonym, not anonymisation: anyone who has your game's salt and can guess an id can work out its hash. That is why the id must be random. The hash still identifies one player across sessions, so it is a pseudonymous identifier: declare it in your game's privacy notice. The same account in two of your games gets two unrelated ids. To find a player's id yourself, take the salt from `GET /api/v1/identify/config` with your game's key, compute the lowercase hex HMAC-SHA256 of the id you passed to `identify` with the salt's 64 characters as the key (as text, not decoded), and keep `px_` plus its first 32 characters. ## Verified links Any copy of your game can claim any account, so claims are bounded: one device can claim at most three different accounts a day, and further claims that day are refused free of charge. If your game has a backend that checks sign-ins, it can vouch for one instead: post `{ "accountHash", "sessionToken" }` to `/api/v1/identify/verified` with the game's live key, using the session token the game passes it. A verified link is outside the daily limit, and a later claim never moves it to another account. ## Counting players In Settings, open the environment and choose who counts as a player under Count players by: - **Automatic**, the default: one person across devices, with what a device played before signing in, once your game has identified a player; each install until then. - **Device**: each install is a player, always. Every game starts on Automatic, so a game that never identifies anyone keeps counting installs. If your studio chose Device before, that choice stays. Player counts, retention, returning players and the Overview all follow the choice. Experiments stay assigned by device. Daily totals already stored keep the count they were made with. ## Price and limits Each accepted identify is one event on your usage, drawn from the included monthly events first and then your prepaid balance. That is one event for each session of a player who is signed in. Repeating an identify in the same session, and every refused call, is free. With an empty balance the call is refused with `needs_funds`; the game keeps playing and the SDK tries again at the next session. ## Deleting a player An owner or admin can delete an identified player with `DELETE /api/v1/games//identified-players/`. Its links go at once, and its events are erased in the background: everything sent after it was identified, plus the earlier history of any device your backend verified for it. The earlier history of a device that only the game claimed stays, unlinked, because any copy of a game can claim any device. For questions, write to [support@realityse.com](mailto:support@realityse.com). Source: https://ravensight.io/docs/identify-players/ Last updated: 2026-11-21 --- # What each page is for The sidebar is grouped by what you are doing rather than by which database the answer comes from. The order below is the order the sidebar puts them in. ## Build Project-scoped: these read the title, not one of its builds. - **Brainstorm.** A board of cards beside a partner that has read your studio's own findings, patterns, touchpoints and sales. See [Brainstorm](https://ravensight.io/docs/brainstorm/). - **Design.** Your design documents, and a chat that has read your studio's findings before it proposes an edit. See [Design studio](https://ravensight.io/docs/design-studio/). - **Code scan.** What your code reports against what your telemetry actually receives. See [Source scan](https://ravensight.io/docs/code-scan/). - **Playtest.** Jobs, briefs, findings and reports from AI personas playing your build. See [Playtest](https://ravensight.io/docs/playtest/). ## Live data Environment-scoped: every number here comes from the events one build sent. Overview, Player insights, Events and Level heatmaps each carry a **Real players** select, because persona sessions are real rows in the same store and are excluded by default. - **Overview.** Daily active players, top events, lifetime totals, retention, the level funnel and the implementation health card. Pick 7 or 14 days and a By hour chart shows active players for each hour (UTC), with no point for an hour that had no events; hours need a window of at most 14 days. Results are cached per scope and range, so a repeat visit does not re-run the warehouse queries; a missing or expired snapshot still fetches fresh. - **Player insights.** A triage board of the sessions the backend flagged, with the plain-language signals behind each call. See [how the detections read your events](https://ravensight.io/docs/dashboard/#detection-rules). A [campaign link's player count](https://ravensight.io/docs/campaign-links/#campaign-links-player-insights) opens it narrowed to the players who arrived by that link. A spread card shows how session length, events per session, sessions per player or playtime per player is distributed: the mean, median, 90th percentile, smallest and largest, and a histogram of 5 to 50 buckets. - **Events.** Raw events newest first, filterable by name and paged, with expandable payload rows. - **Funnels.** An ordered sequence of two to eight event names: who reached each step, how many were lost against the step before, and the average and median gap into each one. Each conversion shows the count behind it and a 95% range, and a funnel with fewer than 30 at step one is marked as a small sample, so a dozen players never read as a precise percentage. Count players or sessions, and filter by an event property: either only the step events that carry it, or whole sessions that touched it, which is what you want when only one step sends the property. - **Retention.** How many players come back, by the day (or week) they first played. Pick up to nine days from day 0 to day 90 and see a curve and a cohort table, each cell with its rate and its count. Classic counts a player who came back on that exact day; rolling counts one who came back on that day or any later one. A start event makes a player's first day their first occurrence of it, and a return event counts only it as coming back; either is an event name, or `kind:purchase` (and the like) for a typed kind: a bare `purchase` is your own event of that name. A typed event stored with `rs_invalid` is never counted. A day a cohort has not lived through yet reads not yet, never zero. Turn on cumulative figures for each cohort's sessions, playtime and revenue per currency. Daily, weekly and monthly active players and stickiness (daily over monthly) sit above. The Overview keeps its day 1 and day 7 tiles and links here. Split it by the build, platform, country, device model, OS version or GPU players started on, or the first value they sent of a property: the five biggest values and the rest, each with its count and a 95% range, because a retention figure for a dozen players is a wide range. - **Level heatmaps.** Where players die or quit in a level, or where any event you name happens: a grid of counts from the positions your events carry. Send `rs_x` and `rs_y` as numbers in your game's own units; the [JavaScript SDK](https://ravensight.io/docs/javascript-sdk/)'s `trackAt` and the [Godot SDK](https://ravensight.io/docs/godot-sdk/)'s `track_event_at` set them for you, for example `Ravensight.track_event_at("player_died", player.position, {"level": "room_4", "rs_kind": "death"})`. Plain `x` and `y` still work, and you can name other properties instead. A quit is where a session stopped: its last position, in a level it did not complete afterwards, once the session has been quiet for ten minutes. Each spot lists its events and its players, because one player dying twenty times is a different finding from twenty players dying once, and the page says how many deaths or events had no position. Positions add no events: they ride on events you already send. Include AI personas with the sessions control at the top of the page to see where your playtests died and quit. You can pick an image of your level to draw the map over; it stays in your browser and is never uploaded, and you give it the coordinates its corners stand for. The map assumes y grows downward, as in Godot 2D. - **Why it moved.** How much a number changed between two equal windows, whether a change that size could be chance, and where it sits: by platform, build, level, new or returning and your top properties. Open it from an anomaly on Alerts and it compares that day with the same weekday a week earlier. It says where a change sits, not why; the link at the top asks Huginn, at its normal price. It covers players, new players, sessions, average session, events, errors, errors per session and progression failures. Revenue is not split here, because money stays per currency. - **Builds.** Did your patch help: two values of `game_version` side by side. Day 1 and day 7 retention follow the players who started on each build, and a return on any build counts. Players who hit an error, median session and frame rate read what happened on the build, and you can name a funnel to run on each. Every number shows what it rests on and a 95% range. A reading needs 10 on each side and says "not enough data" below that; under 30 a number is marked as a small sample. With several measures on one page one can look clear by chance alone, so confirm a surprise before acting on it. - **Monetization.** What players spent, from purchase events (`rs_kind: "purchase"`): paying conversion, payers, first purchases and the time to a first purchase, then one currency at a time its revenue, transactions, revenue per paying player and per daily active player, a daily chart, a histogram of revenue per paying player and the top items. Amounts stay in their own currency and are never converted or added across currencies; a purchase stored with `rs_invalid` is never counted. Below them, ads and total revenue: ads shown, clicked and rewarded, ads per session, purchases plus `ad` revenue per currency, revenue per player and per daily player, and ads by placement, network or format. Ad revenue keeps its fractions of a cent. - **Acquisition.** Where players came from and what each campaign returned. Installs come from [`attribution` events](https://ravensight.io/docs/dashboard/#typed-events); revenue is what those players spent in the window, purchases and ads; spend is what you import from a daily CSV export (a date, a campaign and the amount, with its currency; importing the same file again updates the same rows). Revenue is credited to the campaign on the player's latest event. Return on spend is revenue over spend in one currency, and a campaign with no spend imported says so rather than showing zero. Players whose attribution named no campaign count as installs, but their revenue is not measured. Spend, return on spend and this page are for your own studio only: a studio you share a game with can read the campaign columns and value per player by campaign through its analytics, never your spend. A forecast of value per player, by day 30 to 365 with a likely range, is fitted on what players have spent so far and is labelled as a forecast, because events are kept 90 days and later days are an extrapolation. - **Campaign links.** Make a tracked link to your store page or any https address, share it, and count the people who follow it, by source, campaign, link, device and day. It needs no code in your game. A click is a referral click, never a conversion. See [campaign links](https://ravensight.io/docs/campaign-links/). - **Progression.** How players move through your own hierarchy, from `progression` events (`rs_p1`, `rs_p2`, `rs_p3` name a world, a level and a stage). Start at the top level and open a row to look one level deeper, with attempts, completes, fails, players, the win rate (completes over completes plus fails), the median time from a session's first start to its first completion and the median `rs_score`. A place that only has fails still appears in the Overview level funnel, with a fails count. A progression event stored with `rs_invalid` is never counted. - **Economy.** The virtual currencies your game creates and removes, from `resource` events (`rs_resource` names the currency, `rs_flow` is `source` or `sink`, `rs_amount` is how much). Every resource lists what was earned and spent, the net, the players who earned and the players who spent. Pick one to see a daily earned, spent and net chart and the items that drained or filled it most. Amounts are the game's own units, not money, and a resource event stored with `rs_invalid` is never counted. - **Health.** The errors your game reports and how it performs. Send `error` events (`rs_severity` is `debug`, `info`, `warning`, `error` or `critical`, and `rs_message` is cut to 200 characters) and `health` events (`rs_fps_median`, `rs_fps_p10`, `rs_memory_mb` and `rs_boot_ms`, each optional). You see the errors per affected player, a daily chart per severity, the most frequent messages (open a row for the whole message) and the builds that raise them against their sessions. Performance is one sample per session, the latest it sent, grouped by platform and build with the median and slowest-tenth frame rate, memory and boot time, plus sessions per frame rate bucket. The Hardware card groups the same samples, and the share of sessions that raised an error, by device model, OS version or GPU (see [country and device](https://ravensight.io/docs/platform-support/#country-device)), and suggests a minimum spec: the groups whose median is under 30 frames per second or where more than 5% of sessions hit an error, judged only on groups with 20 or more sessions that sent a health sample, and for OS versions the lowest version per platform from which every version meets that target. An event stored with `rs_invalid` is never counted. The Data quality card below shows how late events arrive (an hour or more; a game that queues offline is late by design), duplicates dropped at ingest and repeats stored past it, what changed in event names and top-level keys between your two most recently seen builds, which SDKs sent in the last 24 hours and what ingest refused this month. - **Journeys.** The level-to-level graph, where players stop, churn-heavy transitions, loops and estimated common paths. Only on deployments with journey graphs configured. - **Player Reports.** The inbox for what players sent from inside the game. See [Player Reports](https://ravensight.io/docs/godot-sdk/#player-reports). A game without the report overlay sees its free-form feedback here instead, summarized by sentiment and theme and searchable by meaning. ## Understand - **Studio Intelligence.** An investigation that ties a question to its evidence to a decision. See [Studio Intelligence](https://ravensight.io/docs/studio-intelligence/). - **Huginn (AI analyst).** Ask in plain English; Huginn picks its own read-only tools and answers with the numbers it used. Conversations are listable, resumable, renameable and deletable. See [Huginn, the AI analyst](https://ravensight.io/docs/analyst/). - **Muninn (studio memory).** What your studio has learned: one game's facts and the patterns that cite it, or under All games, every game's. See [Muninn, studio memory](https://ravensight.io/docs/studio-context/). ## Studio - **Marketing.** What you did outside the game and the lift the platform measured afterwards. See [Marketing memory](https://ravensight.io/docs/marketing-memory/). - **Sales.** Its own page directly below Marketing in the Studio navigation. Record what each title earned, filter the ledger, compare totals by currency, explore a 90 day launch curve, and import store exports. See the [Sales ledger](https://ravensight.io/docs/sales-ledger/). ## In the footer Settings sits below the groups rather than inside them, because it is global to the account rather than to the selected game. Its tabs are Usage and billing and Payment history (both owner only), Projects, Team, Huginn, MCP access, Playtest CLI and Appearance. Settings also links to the audit log, who did what in the org, for owners and admins. The usage meter beside it, titled Events, shows this month's total against the included events on one bar, split into the share your games' player events and reports sent and the share MCP calls count as, with a line under the bar for each. For the owner, a prepaid balance extends the figure to an estimate: the included events plus what the balance covers at the event rate, though the balance is shared with AI units, playtests and scans. The bar turns amber at 80 percent, and hovering the meter gives the totals and the overage so far. ## How the built-in detections read your events The level funnel, journeys, and the player flags are computed from your event names and the place fields, with no configuration. Name your events accordingly and they light up. - **Deaths** are events whose name contains `died`, `destroyed`, or `killed` (lowercase substring match, so `player_died` and `ship_destroyed` both count). - **Level starts** are names containing `start`, `begin`, or `enter`; **completions** contain `complet`, `finish`, `win`, or `clear`. - **An explicit `rs_kind` comes first.** Set `rs_kind` in the event data to `level_start`, `level_complete`, `death`, or `none` and the level funnel, per-level deaths, journeys and the death count read it before the name. `none` opts an event out, so `checkout_started` with `rs_kind: "none"` is not a level start. An unknown value falls through to the name match. The five [typed kinds](https://ravensight.io/docs/dashboard/#typed-events) are known values too, so a `purchase` is never read as a level by its name, and a `progression` event is read by its `rs_status`. Keys that start with `rs_` are reserved for Ravensight. The rage quit rules below read it too. - **`level`, `location` and `track` fold into one place.** The first non-empty one wins, in that order. The funnel, per-level deaths, and journeys only see events that have a place. It is any string that names a place or mode in your game: a level id, an encounter, a scene name. An event with a place that is not a level start, completion or death is navigation only: it stays out of the funnel and is counted as `place_without_kind` on the Implementation health card, unless it sends `rs_kind: "none"`. - **Rage quit likely** flags a session with 3 or more deaths in its last 5 events, 3 or more deaths at the same level, or a final death followed by more than 10 minutes of silence inside the queried window. A death here is an event sent with `rs_kind: "death"`, whatever its name, so a `run_ended` event with `rs_kind: "death"` counts. Without a known `rs_kind`, the first two read `died`/`destroyed` names and the last reads a name containing `died`; `rs_kind: "none"` is never a death. - **Potentially stuck** flags a session that repeats one event 10 or more times at the same level while the whole session has fewer than 20 events. The same event at a new level each time is movement, not stuck. Events with no place are grouped together, so ten repeats of a placeless event in a short session count; send a place or accept it. - **Highly engaged** flags a session with at least 20 events at more than 2 events per minute and fewer than 5 deaths. Every flag comes back with the plain-language indicators that triggered it, so you can always see why a session was tagged. ## Worked examples Each example is one session, read under the default detection profile (a death is a failure, rage quit on, no terminal events), with every event inside the queried window. The outcome is what the code computes, word for word where it writes an indicator. ### Level start ``` 1 game_started {} 2 level_started {"level": "cavern-1"} 3 boss_entered {"level": "cavern-1"} 4 shop_entered {"level": "cavern-1", "rs_kind": "none"} 5 level_started {} ``` The level funnel shows `cavern-1` with 2 starts: line 2, and line 3, because `boss_entered` contains `enter`. Line 4 would match too, but `rs_kind: "none"` opts it out. Lines 1 and 5 are level starts by name (`game_started` contains `start`) but carry no place, so the funnel never sees them. With no completion, `cavern-1` reads 0 percent complete. ### Level complete ``` 1 level_started {"level": "1-1"} 2 level_complete {"level": "1-1"} 3 level_started {"track": "1-2"} 4 stage_cleared {"location": "1-2"} 5 window_opened {"level": "1-2"} ``` `1-1`: 1 start, 1 completion, 100 percent. `1-2`: 1 start (line 3, where `track` is the place) and 2 completions, line 4 (`cleared` contains `clear`, and `location` is the place) and line 5, because `window_opened` contains `win`. Two completions against one start is a completion rate of 2, so send line 5 with `rs_kind: "none"`. ### Death ``` 1 level_started {"level": "boss"} 2 player_died {"level": "boss"} 3 ship_destroyed {"level": "boss"} 4 enemy_killed {"level": "boss"} 5 run_ended {"level": "boss", "rs_kind": "death"} ``` The session's death count is 4, and the funnel shows `boss` with 1 start, 0 completions and 4 deaths: lines 2, 3 and 4 by name, line 5 by its `rs_kind`. Line 4 is the trap: `enemy_killed` contains `killed`, so an enemy's death counts as the player's unless it is sent with `rs_kind: "none"`. The rage quit rules read only `died` and `destroyed` names (plus `rs_kind: "death"`), so for them lines 2, 3 and 5 are deaths and line 4 is not; that is 3 deaths in the last 5 events and 3 at `boss`, so this session is also flagged rage quit likely. ### Rage quit ``` 1 level_started {"level": "3"} 2 player_died {} 3 player_died {} 4 hint_shown {} 5 player_died {} ``` Flagged rage quit likely with the indicator `3 deaths in last 5 events`. The same place rule does not fire: deaths with no place are left out of it, so a placeless death is never counted as being at any place. Sent with `{"level": "3"}`, the same three deaths would add `3 deaths at same location (3)`. The last event is a death whose name contains `died`, so a query whose window ends more than 10 minutes after line 5 also adds `Session ended immediately after death (Nmin ago)`, with N the whole minutes since that event; a last event named `ship_destroyed` would not, because that rule reads only `died` names and `rs_kind: "death"`. ### Stuck ``` 1 level_started {"level": "ledge"} 2 jump_failed {"level": "ledge"} sent 10 times 3 hint_shown {} 4 jump_failed {} sent 4 times 5 game_exited {} ``` 17 events in all. Flagged potentially stuck with the indicator `Repeating same action: jump_failed (10x)`. The rule is one event name repeated 10 or more times at one place, in a session of fewer than 20 events (19 at most). Repeats are counted per event name and place, and events with no place share one group of their own: the 4 placeless `jump_failed` on line 4 are counted apart from the 10 at `ledge`, and had all 14 been sent without a place they would have counted as 14 at that one placeless group. Three more events of any kind would make 20, and the session would not be flagged. ## The detection profile The rules above assume dying is failing and a level ends in a completion. Some games are built the other way round, so each game has a detection profile, set on the game's card under **Settings > Projects** by an owner or an admin and saved through a confirmation. It has three settings: - **A death is a failure or an outcome.** Failure is the default. Choose outcome when dying is how a run normally ends, as in a roguelike: a death then counts as an intended end of the run, a completion in the level funnel, and never as a death, a rage quit signal or a reason a session is not engaged. - **Rage quit detection on or off.** Off, the flag is not computed at all and each session row answers `rageQuitLikely: null` rather than false, so the dashboard says detection is off instead of showing zero. Every rage rule reads deaths, so deaths as outcomes also stop rage quit being inferred. - **Terminal events.** Up to 20 event names, 1 to 200 characters each, that end a run on purpose, such as `run_summary` or `credits_shown`. They count as completions, never as starts or deaths, and never as the action the stuck rule looks for. Every flag is inferred, and the answers say so. The session list (and the MCP tool `query_players`) carries `inferred: true` and `sample_sessions`, the number of sessions the flags were inferred from, and the overview carries `detection: { profile, sample_sessions }`. The dashboard labels a flag or a count with its sample, and a count of zero reads "No flags inferred from N sessions", never as players being fine. The profile is also readable and writable at `GET` and `PUT /api/v1/games/:gameId/settings/detection`, where the `PUT` body is any subset of `death_kind`, `rage_quit` and `terminal_events`. ## Typed events: purchases, resources, progression, errors, health, ads and attribution Seven more `rs_kind` values give an event a fixed meaning: `purchase`, `resource`, `progression`, `error`, `health`, `ad` and `attribution`. Each one has a small contract of reserved `rs_` keys, sent at the top level of the event data next to your own properties. Any other key you send is stored as usual. | rs_kind | Required keys | Optional keys | | --- | --- | --- | | `purchase` | `rs_amount` (whole minor units: an integer or a string of up to 15 digits), `rs_currency` (three-letter ISO 4217 code), `rs_item_type` and `rs_item_id` (1 to 100 characters) | `rs_cart` (up to 100 characters), `rs_transaction_id` (up to 128) | | `resource` | `rs_flow` (`source` or `sink`), `rs_resource` (1 to 64 characters), `rs_amount` (a plain number of zero or more) | `rs_item_type` and `rs_item_id` (1 to 100 characters each when sent; the economy page shows a missing one as no item) | | `progression` | `rs_status` (`start`, `complete` or `fail`), `rs_p1` (1 to 100 characters) | `rs_p2`, `rs_p3` (`rs_p3` needs `rs_p2`), `rs_score` (a number) | | `error` | `rs_severity` (`debug`, `info`, `warning`, `error` or `critical`), `rs_message` (stored up to 200 characters) | `rs_stack` (stored up to 2,000 characters), `rs_source`, `rs_error_type` (up to 100 characters), `rs_trail` (stored up to 1,500 characters); see [error capture](https://ravensight.io/docs/error-capture/) | | `health` | At least one of `rs_fps_median`, `rs_fps_p10`, `rs_memory_mb`, `rs_boot_ms`, each a number of zero or more | The other three | | `ad` | `rs_ad_network` (1 to 64 characters), `rs_ad_format` (`banner`, `interstitial`, `rewarded`, `native`, `app_open` or `other`), `rs_ad_result` (`shown`, `clicked`, `failed` or `rewarded`) | `rs_ad_placement` (1 to 100 characters), `rs_revenue_micros` (a string of up to 18 digits) with `rs_currency` (three-letter ISO 4217 code, required with revenue) | | `attribution` | `rs_attr_source` (1 to 64 characters, for example `utm` or `organic`) | `rs_attr_network` (up to 100 characters), `rs_campaign`, `rs_adset` and `rs_creative` (up to 200 characters each), `rs_touch_time` (epoch milliseconds) | - **Money is whole minor units.** A purchase of 4.99 US dollars is `"rs_amount": 499, "rs_currency": "USD"`; 500 yen is `500` with `JPY`. A decimal such as `4.99` breaks the contract rather than being rounded. The currency is stored upper-cased, and totals are never added across currencies. A repeated transaction id is counted once: resending a purchase with the same `rs_transaction_id` from the same device is one purchase in every report, while a purchase with no transaction id always counts on its own. Do not send a purchase when a store restores one the player already owns, only for a new transaction. - **Ad revenue is whole micros.** One ad impression is often worth a fraction of a cent, so ad revenue has its own key: `rs_revenue_micros` is millionths of one unit of `rs_currency`, sent as a string of digits. 0.0015 US dollars is `"rs_revenue_micros": "1500", "rs_currency": "USD"`. A decimal such as `0.0015` breaks the contract. Send revenue on the `shown` event, the paid impression, and send `clicked`, `rewarded` and `failed` without it: revenue on any other result breaks the contract. - **Attribution is recorded once per device.** Send one `attribution` event when a player first installs or lands. The first one for a device is kept, and every later event from that device carries its `campaign`, `adset` and `creative`, so revenue can be credited to the campaign that brought the player. A browser game can read its landing page's UTM parameters and send them this way. - **Resource amounts are plain numbers**, not money: `12.5` gold is fine. `rs_flow` says which way it moved, so the amount is never negative: spending 5 gold is `"rs_flow": "sink", "rs_amount": 5`. A negative amount breaks the contract and is left out of the economy report. - **Progression feeds the level funnel.** A `start` counts as a level start, a `complete` as a completion, and a `fail` in the funnel's `fails` column. An event with no `level`, `location` or `track` is placed at its nodes joined with `/`, so `rs_p1: "world_1", rs_p2: "stage_2"` is the place `world_1/stage_2`. - **Send health once per session**, as a summary near its end, rather than once per frame or per minute. - **Accepted and flagged, never refused.** An event that breaks its contract is still stored and still answers 202. The server adds `rs_invalid` with the broken rule (for example `purchase_amount`), every typed report leaves the event out (a flagged `progression` event is not a start, completion or fail in the level funnel), and it is counted as `typed_event_invalid` on the Implementation health card. The 202 body then carries `invalid`, the number of such events in the request; when there are none the body is exactly `{ "accepted": n }`. The 8 KB data limit is measured on what you send, before `rs_invalid` is added. Only the server writes `rs_invalid`: one your game sends is dropped from the stored event and counted as `rs_key_unknown`. Source: https://ravensight.io/docs/dashboard/ Last updated: 2026-11-19 --- # Explore your own questions Explore groups events, players, sessions, events per player or session, and numeric property sums or averages by UTC day or hour, event name, platform, build, level, country, device model, OS version, GPU or a property. Grouping by country or a device field keeps the 50 biggest values for the whole window and says how many there were. Add a second grouping and up to 20 event names. Hourly queries cover at most 14 days. A second grouping keeps its eight biggest values for the whole window, and the answer says how many there were. Results are capped at 1,000 rows; the page and CSV explicitly mark truncation. Missing numeric values remain empty. Narrow your query before interpreting a partial result. Enter event names to also see a feature engagement matrix. Breadth is the fraction of all active players in the selected window who used that event. Frequency is the mean event count among those players; per-active-player frequency includes everyone in the window. This is descriptive usage data, not evidence of causation. Dashboard reads are included. CSV download uses the applied query and is capped at 256 KB, with spreadsheet formula escaping and a truncation note. The game-scoped API endpoints are `/analytics/explore`, `/analytics/explore.csv` and `/analytics/engagement`. HTTP queries also accept up to five `prop.key=value` filters and exact `platform`, `gameVersion`, `country`, `deviceModel`, `osVersion` and `gpu` filters. Overview and Monetization show players, sessions, paying players and payer conversion by country, device model, OS version or GPU, from `/analytics/dimensions/{dimension}` (20 values by default, 50 at most, the rest as other). Player segments can name a country code and any of the three device fields, and every read that takes a segment honours them. Experiments and config rules still target platform and build only, because the rest is not known when an SDK fetches its config. MCP `explore` and `get_engagement_matrix`, and REST `/api/v1/data/games/{gameId}/explore` and `/engagement`, use the standard programmatic rate and existing token scope. Group a property with `groupBy=prop:difficulty`; property sum and mean require `propKey`. These tools, along with realtime and anomaly reads, are available through MCP and REST rather than the hosted analyst toolset to preserve its request budget. AI playtest events remain excluded unless explicitly included. Source: https://ravensight.io/docs/explore/ Last updated: 2026-11-15 --- # Save views and build dashboards Use Save as view on analytics pages to keep query settings, then add the view in Dashboards. Members can create their own views and layouts. A studio holds up to 200 saved views and 50 dashboards, with at most 24 widgets per dashboard. Explore and Funnels save the query behind the displayed result, so unapplied form edits do not change it. Explore saves its selected relative range, which moves forward with time. Absolute Explore ranges supplied through the website API preserve a fixed window. Start empty or from Overview, Monetization and Health presets. A game dashboard accepts views for that game. Portfolio dashboards use the existing studio metrics, monetization, funnel and property-breakdown endpoints; unsupported portfolio view types are refused. Those studio readers retain their existing game limits and aggregation semantics. Widgets do not introduce a new query engine or price. Move widgets with labelled buttons or focus a widget and use arrow keys. Full width and Half width reflow the layout. Save changes explicitly; phone layouts use one column. Tables show up to 100 scalar values per widget and say when capped. Saved queries retain the original endpoint's data limits and units. Dashboards start private to their creator. Only owners and admins can share them with the studio. Other members can read a shared dashboard or duplicate it, but cannot edit it. Saved views are studio-readable and creator-editable. A referenced view cannot be removed or change its game or kind until removed from dashboards; duplicate it instead. Deleting a game removes its saved views and dashboards. MCP `list_views`, `list_dashboards` and `get_dashboard` read saved definitions at the standard programmatic rate. These reads do not execute widgets or change sharing. Dashboard writes stay in the authenticated website API. Source: https://ravensight.io/docs/dashboards/ Last updated: 2026-11-15 --- # Saved player segments Choose Player segment on supported analytics pages to reuse a named group of players. Members, admins and owners can create and edit up to 100 segments per game. Viewers and recipients of shared games can read them. Rules match platform, build, a level prefix, up to five exact event-property values, and up to five behaviour rules. **Behaviour rules** select players by what they have done, read from their retained history up to the end of the query window: total spend in minor units of one named currency (never converted), total playtime in seconds, number of sessions, or whole days since last seen, each as at least or at most a whole number. Ad revenue rules are listed but refused until ad revenue data is available. For remote config and experiments, membership is worked out once an hour for each behavioural segment a config rule or a running experiment uses, so the config fetch never waits on the event store. A segment with more than 100,000 matching players is not used at fetch time and says so; split it with another rule. A game can use up to 20 behavioural segments in remote config and experiments; more are listed as over the limit and match nobody at fetch time. **Device IDs are not secret.** A config fetch trusts the device ID the game sends, so anyone with the build's key and another player's device ID can read that player's values, and from them which segments the player matched. Do not target a sensitive behavioural segment, such as high spenders, with a value whose presence reveals the targeting. All rules must match the same event during the query window. Analytics then reads the matching players, retaining their full history for session lengths, first-seen retention cohorts and purchase deduplication. Activity uses its own trailing 30-day window. Synthetic-player settings still apply. Property comparisons use stored text and are case-sensitive. Segments apply to Overview, metrics, Players, levels, retention and activity, Monetization, Economy, Health, Builds, Why it moved, Progression, Distribution, funnels, property breakdowns, Explore and engagement. Long-range rollups, activity-history charts, session timelines, studio portfolio queries, realtime and SQL do not apply saved segments. Player Insights labels its whole-game history separately. Website analytics requests accept `segment`. Supported MCP and REST analytics reads accept `segment_id`; MCP `list_segments` lists definitions at the usual programmatic rate. Explicit platform, build, level-prefix and property values replace the corresponding saved rule while preserving other rules. A segment from another game is refused. The hosted analyst does not advertise segment selection. Saved views keep the segment ID, so editing its rules changes future results. Remove references from saved views before deleting a segment. Deleting a game removes its segments. Segment definitions contain no keys or player credentials. Source: https://ravensight.io/docs/saved-segments/ Last updated: 2026-11-15 --- # Event catalogue, test devices and purging **Event catalogue.** The Event catalogue page lists every event name the game sent in a window (30 days by default, up to 400): how many times, from how many devices, when it was first and last seen, and its ten most common top-level property keys. Up to 500 names, busiest first. Real players only by default; the synthetic switch works as it does everywhere. MCP `get_event_catalogue` reads the same list at the normal programmatic rate. **Test devices.** Owners and admins can mark up to 200 device IDs per game as test devices, with a label. Analytics pages leave them out by default, the way playtest sessions are left out. The Event catalogue page has a switch to count them, website analytics requests accept `test_devices=include`, and MCP analytics reads always leave them out. Bulk export, SQL, realtime and long-range history are not filtered. **Purge an event name.** The owner can delete every stored event with one name for this game. The delete runs in the background, one purge per game at a time, and is recorded in the audit log. It cannot be undone, and daily and monthly totals already written keep their counts. Another game's events are never touched. **Keep an event shorter.** The owner can keep one event name for fewer days than the game's retention (1 day up to one day less than the game's). Once a day, rows of that name older than its days are deleted. A game can have 50 such rules. Both actions are free. Source: https://ravensight.io/docs/event-catalogue/ Last updated: 2026-11-15 --- # See recent activity as it arrives Realtime shows the last 24 hours by UTC hour: players, sessions, events, typed errors and revenue in each currency's minor units. Purchases use the same transaction deduplication as other analytics. New and returning player classification uses the device registry and at most 50,000 device-hour pairs; the dashboard marks truncated classification. Activity totals remain complete. Overview and SDK inventory refresh once a minute. Live events refresh every five seconds while the page is visible. Filter by event pattern (`*` matches any text), exact build or a device prefix of at least four characters. Literal underscores and percent signs stay literal. Show up to 200 recent events or inspect their raw JSON. AI playtest events are excluded by default. SDK inventory groups real sessions created in the last 24 hours by platform and SDK. Session creation accepts an optional `sdk` value such as `godot/0.3.1`; invalid values are ignored and older clients appear as unknown. The SDK name uses lowercase letters, digits or hyphens and the version uses letters, digits, periods, plus signs or hyphens, each at most 32 characters. MCP `get_realtime` and REST `GET /api/v1/data/games/{gameId}/realtime` read the hourly view at the standard programmatic rate. The live tail stays dashboard-only to avoid unattended polling costs. Existing token scope and shared-game rules apply. Source: https://ravensight.io/docs/realtime/ Last updated: 2026-11-15 --- # Monitor unusual changes Owners and admins can create up to ten enabled monitors per game in Alerts. Choose players, new players, sessions, median session length, errors per user, purchases, resource flow or progression failures. Money metrics use one currency, and resource monitors use one named resource and direction. An optional property scope narrows the data. After the daily rollup, monitoring compares yesterday with 28 trailing days. At least 14 observed history days are required. The rule removes weekday offsets, uses a median and median absolute deviation with a minimum spread, and compares against your selected confidence threshold. These are statistical heuristics, not guarantees of a problem. Missing observations are not treated as zero. Monitoring pauses after 90 days or when history is insufficient. Use Keep monitoring to renew. Selected current studio members receive email, or the owner if no recipients are selected. Duplicate job runs do not send duplicate alerts. The anomaly log expires after 180 days. Shared games cannot be monitored by the receiving studio. Detection does not call AI. Ask Huginn only prefills a question; sending it uses the normal analyst price. MCP `list_anomalies` and REST `/api/v1/data/games/{gameId}/anomalies` use standard metered reads. Scoped new-player monitoring is limited to 50,000 registered devices. Source: https://ravensight.io/docs/anomaly-monitors/ Last updated: 2026-11-15 --- # Schedule studio reports Owners and admins can create up to 20 schedules in Settings, Reports. Choose daily, weekly or monthly delivery, a UTC hour, one owned game or the studio, and an overview, monetization or health template. Select current studio members as subscribers. Monthly reports send on the first; weekly reports use your selected weekday. Each report covers the preceding complete UTC period and compares it with the period before that. Reports are deterministic and make no AI call. Studio reports include at most the 12 newest owned games and show when capped. Totals sum across games without deduplicating people. Overview active player-days sum daily active players, not distinct people over the period; missing rollups contribute no counts. Currency totals remain separate, and revenue stays in minor units. Shared games cannot be scheduled by recipients. CSV attachments are optional and capped at 256 KB with a visible truncation note. Test reports go only to the requesting user, with at most five test sends per schedule per UTC day. Duplicate scheduler ticks cannot resend a claimed period; failures appear on the schedule and do not automatically retry that period. MCP `list_report_schedules` reads configuration and status at the standard programmatic rate without sending mail. Source: https://ravensight.io/docs/scheduled-reports/ Last updated: 2026-11-15 --- # Experiments and measured outcomes Owners and admins can create a draft with a hypothesis, a fixed key, two to eight named variants and whole-number weights totaling 100%. The first variant is the baseline. Choose one primary outcome and optionally target a segment by platform, build or behaviour. A game can keep 100 experiments and run ten at a time. Members and viewers can read; incoming shared-game access does not include experiments. ## Targeting and sample size A targeted experiment keeps a device once it has matched. Its first assignment is recorded, and a device that later leaves the target segment (a new build, a lower spend) stays in its arm until the experiment stops. Stopping ends every recorded assignment. Choose **Include new builds** on a build-targeted draft to also enrol devices on builds first seen after the start: the builds already seen are listed at the start, so the experiment needs the event store then, and a game with more than 1,000 builds must target one build. Set an optional **target sample size**, 10 to 10,000,000 exposed players per variant. The draft form estimates one for a yes or no outcome: about 16 × p × (1 − p) ÷ d² players per variant to detect a change of d from a baseline rate p, at 80% power and 5% significance. The creator and the studio owner get one email when every variant reaches the target, and one when the experiment stops. Neither email concludes or promotes anything. ## Config rules and assignment Add experiment-variant rules to Remote config before starting. On a config fetch, running experiments assign a variant using the SHA-256 hash of `experimentKey + ':' + deviceId`, reduced modulo 10,000 and compared with cumulative weights. The result is deterministic for the same key, device and weights; changing weights would change assignments, so started experiments keep their allocation, targeting and outcome fixed. Start a new experiment key for a new test. Device IDs are the unit of assignment, not verified people. Attach `rs_exp_` to gameplay events with the assigned variant name. From Godot 0.5.0, JavaScript 0.7.0, LÖVE 0.7.0, Unity 0.5.0, Unreal 0.5.0, C++ 0.5.0, Odin 0.6.0, iOS 0.6.0 and Android 0.5.0, every SDK does this for you: the first typed config read sends one `rs_exposure` event and tags the events after it (per session, or per run in C++, iOS and Android), a fetch alone tags nothing, and a well-formed `rs_exp_` your game sets itself is left alone. On an older SDK, tag events yourself. Variant names start with a lowercase letter and use lowercase letters, digits, underscores or hyphens, up to 40 characters. Malformed exposure labels are removed and counted as reserved-key warnings; the rest of the event stays usable. A config fetch alone is not a measured exposure. Exposure tags add no extra event charge. Stopping removes assignments from future fetches; cached clients keep their last values until they refresh. Results remain readable. Concluding can name a winner without promotion, or explicitly promote the winner's bound values to config defaults. The review shows before-and-after defaults and sends the reviewed config version. A concurrent change refuses promotion so you can review again. Existing segment rules still take precedence where applicable. ## Results and comparisons Results include real-player events after the first recorded exposure and within the experiment's start/stop window. Players tagged with more than one variant are excluded. Purchases retain historical transaction deduplication and remain in one selected currency. Retention uses complete UTC days after exposure; immature cohorts are excluded. New-player share uses the first-seen registry and excludes players not yet recorded there. Synthetic playtests never enter experiment results. Comparisons use the labelled player-level outcome: sessions, active days, mean session seconds, errors, currency revenue, transaction counts, resource amounts, progression failures, purchasing/new-player shares, funnel conversion or day-1/day-7 return rates. These are not differences in aggregate DAU, pooled session medians or errors per affected player. Daily charts group outcomes by first exposure day. Experiment results are limited to the latest 90 days, even when raw-event storage is extended, with partial windows identified. Reads cap at 50,000 exposed players, five million scanned rows and 15 seconds; they fail visibly rather than silently sampling. Continuous outcomes use a Welch t comparison; binary outcomes use a two-proportion z comparison when successes and failures are sufficiently represented. Results show treatment-minus-baseline differences and 95% intervals, with a caution below 100 measured players per arm. Sparse or constant samples do not receive fabricated precision. Intervals are unadjusted for repeated looks and multiple variants, and changes to other game settings can affect the comparison. The system never selects or promotes a winner automatically. Methods: [NIST two-sample comparisons](https://www.itl.nist.gov/div898/handbook/eda/section3/eda353.htm) and [difference of proportions](https://www.itl.nist.gov/div898/software/dataplot/refman1/auxillar/diffprop.htm). ## Over MCP MCP `list_experiments` reads definitions and `get_experiment_results` reads outcomes. REST `GET /api/v1/data/games/{gameId}/experiment-results?experiment_key=...` uses the same scoped programmatic token and standard metered rate. These reads do not mutate lifecycle state or config. They are not added to the hosted analyst's prompt. Experiment results and configuration changes do not automatically become studio-memory findings or investigation evidence. Source: https://ravensight.io/docs/experiments/ Last updated: 2026-11-15 --- # Remote configuration Use Remote config to draft up to 50 typed keys for the selected game environment. Owners and admins can review the before-and-after diff and publish. Members and viewers can read configuration; incoming shared games cannot. An outdated version is refused so another editor's changes are preserved. Keys start with a lowercase letter and use lowercase letters, digits and underscores, up to 64 characters. Values are strings, finite numbers, booleans or JSON, with an 8 KB limit per value and 20 nesting levels. Types are checked without implicit conversion: the string `"false"` is not a boolean. Each key can have up to 20 ordered rules; the first matching platform, build or behavioural segment supplies its value. Event properties and levels are unknown during a config fetch, so segments using them cannot be config rules. Fetch `GET /api/v1/ingest/config?deviceId=...&platform=...&gameVersion=...` with the build's `X-API-Key`. Device IDs are required and limited to 256 characters; platform and build are optional and limited to 128. Game and environment come from the key, never a query parameter. The result contains `values`, `experiments` and `etag`. Cache the document and send its ETag in `If-None-Match` on the next fetch. A matching response returns 304 with no body. Use local defaults or the last cache if a fetch fails. One successful non-cached config fetch counts as one event on the existing shared meter. A 304 is free. Config fetches have a separate usage line and do not create player analytics events. Ingest game/key/device limits and public-key origin, allowed-build and revocation checks apply. Config fetches additionally allow 30 requests per device per game per minute. Disabled games refuse fetches. Config values are public to anyone holding the build's ingest key; use them for game settings, never credentials or server secrets. Editing a referenced platform/build segment rebuilds the snapshot and advances the configuration version. A referenced segment cannot be removed or changed to property/level rules. Audit history lists key names and versions, excluding values. Disabled or deleted keys disappear on the next successful fetch, so clients should use their local defaults for missing keys. **Scheduled values.** Owners and admins can schedule a value for one published key: a start time, an optional end time up to 90 days later, and a note. The fetch compares the times with its own clock, so a schedule takes effect to the second. While active it replaces the key's rules and default for every player, and when two overlap the later start wins. A game can have 50 upcoming or active schedules, each up to 400 days ahead. Cancel one at any time; creating and cancelling are in the audit log. Schedules cost nothing extra: a cached client keeps its free 304 until a schedule actually changes a value it receives. **Staged rollouts.** Roll a new default out to a rising share of devices, such as 10%, 50% then 100%, with 1 to 168 hours per stage. A device's place is a stable hash, so a device inside 10% stays inside at 50%. Segment and experiment rules still apply first. Every quarter hour Ravensight halts the rollout if one of the game's monitors for errors, progression failures, sessions, active players or session length has moved the wrong way since it started, or if errors per player inside the rollout during the stage exceed players outside it over the same window by more than your limit (10% to 500%), with at least 50 players inside. The comparison never treats fewer than 0.02 errors per player as the baseline, so one early error does not stop a rollout. At 100% the comparison is with the same length of time just before the stage. A publish that changes the key's default or removes the key cancels its rollout, and completion never overwrites a default someone published meanwhile. Halting returns every player to the previous value and records why. After the last stage the value becomes the key's default. A game can run five rollouts at once, one per key. MCP `list_config_schedules` reads schedules and rollouts, with their status and why a halted rollout stopped. It creates and cancels nothing. MCP `list_remote_config` reads names, types, enabled flags, versions and rule counts at the normal programmatic rate. It does not return values or publish changes. Configuration writes use the authenticated website API. All nine stable SDKs include typed config access, scoped ETag caching and explicit experiment exposure labels. Running experiments add deterministic assignments and matching variant rules to the same response. Source: https://ravensight.io/docs/remote-config/ Last updated: 2026-11-20 --- # Campaign links Make a short link for each place you share your game, and see how many people followed it. It works for any game with a page to send people to, and nothing has to be added to the game itself. It is in beta. ## Make and share a link 1. Open **Campaign links** in the Live data group of the dashboard. 2. Paste the address people should land on, for example your store page. It must start with `https://`. 3. Choose the traffic source, such as a video, a newsletter or a community post, or type your own. Pick an existing campaign or name a new one. A medium and a label are optional and help you tell links apart. 4. Create the link and press **Copy link**. The link looks like `https://go.ravensight.io/k7Qm2xR`. Share it where you chose. A link can be disabled, which stops it redirecting and can be undone, or deleted, which cannot be undone. A game can hold up to 200 campaigns, and a campaign up to 500 links. The destination is checked when you create or edit the link: it must be an `https://` address with a site name, no username or password, no custom port, no numeric address, nothing on a private network, nothing with look-alike characters in the site name, and nothing that points at another campaign link. It can be up to 2,048 characters. The link redirects to the address you saved, plus the tags below when they apply, whatever is added after it in the shared link. ## Tags added to the address For two kinds of destination the redirect adds a few tags to the address, built only from what you saved on the link. A tag the address already carries is never replaced, and the rest of the address is kept as you saved it. Each link's details row shows the tags, the address visitors land on and an **Add tags** switch. Tags are on by default; turned off, visitors land on the address exactly as saved. - **A Steam store page** (`store.steampowered.com`) gets `utm_source` (the link's source), `utm_medium` (its medium, when it has one) and `utm_campaign` (the campaign name in lower case, words joined by dashes). Steam reports wishlists for these tags in Steamworks, under UTM analytics, so you can see visits and wishlists per link there. Ravensight does not import that report. - **Your own web page**, your site or a web build you host, gets `rs_link`, the link's id. A Ravensight SDK with campaign links reads it and counts the player: a web build from the page address on its own, and an app or a native build when your link handling passes it on. See below for which SDKs have it. - An App Store, Google Play, Epic, Discord, Kickstarter or itch.io address, and a Steam address that is not the store page, gets nothing. An itch.io browser game plays in a frame that itch.io serves from its own address, which would never see the tag. ## Players who arrived by a link When a Ravensight SDK learns the link a player arrived by, it sends the link's id with the first session it opens, once. Ravensight keeps it only when it names a link of the same game, and adds it to that session's events. The Clicks tab then shows **Players who arrived** (different devices) and **Sessions from links** in the window, and the same split by link; each web link's details row shows its own. Playtest and doctor sessions never count. The link id is one you created, not personal data, and it goes under the same consent as everything else: with opt in, only after the player's yes, and never for a player who opted out. Nothing about it is stored on the device. An itch.io link counts clicks and no players, because it gets no tag. - **A web build** reads `rs_link` from the page address once, when it starts: the JavaScript SDK on your page (0.8.0 or later), a LÖVE web build, whose page runs that SDK, a Godot web export (0.7.0 or later), and the web builds of the preview SDKs for GameMaker, Defold, Flutter and Cocos Creator, and Construct 3 with worker mode off. There is nothing to call, and the address is left as it is. A Unity WebGL build does not read it yet. - **An app or a native build** cannot see a web address, so your game passes the id on. Point the link at your own `https` page that opens the app (a universal link or App Link), or read it from an install referrer you already handle, take `rs_link` from that address, and call the SDK's campaign link setter below. It returns false, and changes nothing, for anything that is not a link id (24 characters, `0` to `9` and `a` to `f`). Call it before the SDK opens its first session; a later call goes with the next session it opens. | SDK | Call | From version | | --- | --- | --- | | [JavaScript](https://ravensight.io/docs/javascript-sdk/) | `rs.setCampaignLink(id)` | 0.12.0 | | [Godot](https://ravensight.io/docs/godot-sdk/) | `Ravensight.set_campaign_link(id)` | 0.7.0 | | [Unity](https://github.com/Reality-Software-Entertainment/ravensight-unity) | `Ravensight.SetCampaignLink(id)` | 0.6.0 | | [Unreal Engine](https://github.com/Reality-Software-Entertainment/ravensight-unreal) | `URavensightSubsystem::SetCampaignLink(LinkId)` | 0.6.0 | | [LÖVE](https://ravensight.io/docs/love-sdk/) | `ravensight.setCampaignLink(id)` | 0.8.0 | | [iOS](https://ravensight.io/docs/ios-sdk/) | `Ravensight.setCampaignLink(id)` | 0.7.0 | | [Android](https://github.com/Reality-Software-Entertainment/ravensight-android) | `Ravensight.setCampaignLink(id)` | 0.6.0 | | [C++](https://github.com/Reality-Software-Entertainment/ravensight-cpp) | `client.set_campaign_link(id)` | 0.6.0 | | [Odin](https://github.com/Reality-Software-Entertainment/ravensight-odin) | `rs.set_campaign_link(client, id)` | 0.7.0 | | [GameMaker](https://github.com/Reality-Software-Entertainment/ravensight-gamemaker) (preview) | `ravensight_set_campaign_link(link_id)` | 0.2.0 | | [Defold](https://github.com/Reality-Software-Entertainment/ravensight-defold) (preview) | `ravensight.setCampaignLink(linkId)` | 0.2.0 | | [Flutter](https://github.com/Reality-Software-Entertainment/ravensight-flutter) (preview) | `Ravensight.setCampaignLink(linkId)` | 0.2.0 | | [Cocos Creator](https://github.com/Reality-Software-Entertainment/ravensight-cocos) (preview) | `client.setCampaignLink(id)` | 0.2.0, with the JavaScript SDK 0.12.0 or later installed | | [Construct 3](https://github.com/Reality-Software-Entertainment/ravensight-construct) (preview) | The Set campaign link action | 0.2.0, built with the JavaScript SDK 0.12.0 or later | | [Roblox](https://github.com/Reality-Software-Entertainment/ravensight-roblox) (preview) | `Ravensight.setCampaignLink(player, linkId)` | 0.2.0 | Where a row says not released yet, that SDK's current version cannot count players who arrived by a link; its clicks still count. In a LÖVE web build the page's JavaScript SDK opens the session and reads the address, so the LÖVE call is for desktop builds. The C++ and Odin SDKs have no supported web build, so a C++ or Odin game always uses the call. In Construct 3's worker mode, its default, the game cannot see the page address: use Set campaign link with the page's `rs_link` query value. A Roblox game has no page address either: its SDK reads the id from the player's launch data when the link sends players to your experience link with the id in its launch data, and the Roblox SDK's README shows how. ## Open a link's players A link's player count, in its details row and in **Players by link** on the Clicks tab, opens [Player insights](https://ravensight.io/docs/dashboard/) narrowed to the players who arrived by that link, over the same days. The list holds every session those players played in those days, not only the first, so you can see what they did after arriving. A chip above the sessions names the link and the days; remove it to see every player again. The filter is part of the page address, so a reload or a shared address keeps it, and it names the game, so it opens the right one. Switching game yourself drops it, because a link belongs to one game. ## Lift estimate per campaign Each campaign is also a [Marketing](https://ravensight.io/docs/marketing-memory/) touchpoint, made when the campaign is made (or, for a campaign older than this, the first time its estimate is shown) and dated by its first link. Its name, kind, channel and date follow the campaign, so they change in Campaign links; notes, spend, tags and the game stay yours to edit in Marketing, and it cannot be deleted there. Choose a campaign on the Clicks tab to see its estimate: the new players in the 72 hours from the first link against the 7 days before, measured overnight like every touchpoint, and, where a Steamworks connection reports wishlists for the game's title, the wishlist adds in the same days the same way. It is an estimate, compared with the days before: anything else you did in those days counts too. Deleting a game keeps the touchpoint in Marketing as an ordinary one you can edit or delete. ## What a click does and does not prove A click is a referral click: a browser asked for your link and was sent on. It shows that the link was followed. It does not show that the visitor installed, wishlisted or bought anything, that the same person did not click twice, or that the page they reached loaded. The page calls these referral clicks for that reason, and no number on it is a conversion rate. - **Total clicks** is every request for a link that was answered with a redirect. - **Valid clicks** leaves out the ones that look automated: crawlers, link preview fetchers, requests with no browser name, browser prefetches, and a burst of more than 20 requests a minute from one visitor on one link. - **Filtered clicks** is the difference. They are stored so you can see them, and they are not billed. - A request that only checks the link, a `HEAD` request, is answered the same way and is not recorded. - Detection is a heuristic. A bot that looks like a browser counts as valid, and a person on an unusual setup may be filtered. ## What is kept For each click Ravensight keeps: - the time, the game, campaign and link, and the source, medium and destination type you chose; - the referring site's domain only, never the full referring address. The Clicks tab lists the top ten, then the clicks with no referring site, then the rest as one row; - a device class: phone, desktop, tablet or other; - whether it was filtered, and whether it was billed. No IP address is stored. No fingerprint is built. The only thing that touches the connecting address is a short-lived keyed hash used to spot a burst from one visitor, which is rotated daily, cannot be queried and is not written to the click record. Click records are kept for 90 days, like events, and deleting a game deletes its campaigns, links and clicks. ## Cost One valid click is one event on the shared event meter, the same meter as [game events](https://ravensight.io/docs/data-api/). Filtered clicks are not billed. A link never stops working because an allowance ran out or a balance is empty: the visitor is still sent on, the click is still counted, and the stats page says how many clicks were not billed. Reading the numbers in the dashboard is not a billed action. ## API - `GET` and `POST /api/v1/games/:gameId/campaigns`, `PATCH /api/v1/games/:gameId/campaigns/:id`: list, create and rename campaigns. - `POST /api/v1/games/:gameId/campaigns/:id/links` with `{ destination, source, medium?, label?, tagDestination? }`, then `PATCH` and `DELETE /api/v1/games/:gameId/links/:id`. A refused destination answers `400 invalid_destination` with a `reason` and a plain `message`. A link answers `tags` (`steam`, `players` or null), `tagDestination` (true unless turned off, `400 invalid_tag_destination` for anything but true or false) and `redirectsTo`, the address visitors land on. - `GET /api/v1/games/:gameId/analytics/players?campaignLink=`, with the usual `from` and `to` in unix seconds: the session list of the players who arrived by that link in the window, every session they played there, and `campaignLink: { id, players }`, how many players that is. Anything but a link id answers `400 invalid_campaign_link`. Over MCP, `query_players` takes the same id as `link_id`. - `GET /api/v1/games/:gameId/campaigns/stats` with optional `from` and `to` as whole days (`2026-11-01`, both included, counted in `tz`, a time zone name such as `Europe/Berlin`, default UTC), `campaignId`, `linkId` and `source`: totals plus the split by day, source, link, campaign, destination type, device and referring site (`byReferrer`, with `(none)` and `(other)`), `totals.players`, `totals.sessions` and `playersByLink`, and with a campaign, `campaignLift`. Left out, the window is the last 30 days ending today; it is at most 90 days. Any other date form answers `400 invalid_range`, and an unknown zone `400 invalid_tz`. ## Not yet Custom link domains, importing Steam's UTM report or matching clicks to wishlists or sales one by one, install and purchase attribution, players from a store page link (a store page gets no tag), QR codes and splitting traffic between destinations are not part of this beta. Source: https://ravensight.io/docs/campaign-links/ Last updated: 2026-11-21 --- # Forms and surveys Collect feedback, survey answers, interest in a beta, or contact details through a hosted page or a form embedded on your website. A form belongs to your company or one project title. Project forms are shared across that title's game environments. ## Build and publish Open Forms in company or project scope. Start with a template or build your own. Add up to 20 pages and 100 questions, with up to 50 choices per question. You can ask for text, numbers, ratings, scales, single or multiple choices, a platform or a country. Contact forms can also request a name or email address. Anonymous forms cannot include contact fields; remind respondents to leave identifying details out of free text. Show a question when an earlier answer matches a condition. A page can skip forward to another page or complete the form. If several skip rules match, the first matching rule wins. Randomization changes the order of independent questions or choices while keeping a condition's question before the question that depends on it. For a quiz, set the correct answers and points. Choose whether respondents see a score and correct-answer feedback after an accepted submission. Correct answers are not included in the public form before submission. Set your title, short introduction, completion message, logo, colors, studio contact and privacy notice. Preview uses the same form layout and branching without saving responses or recording views. Publishing creates an immutable version. Later draft changes, including a new logo, reach the public form only when you publish again. A published form keeps its address. ## Share or embed Copy the hosted address from Share. For an embed, add the exact website origins allowed to display your form and copy the iframe code. Origins include the scheme and host, such as `https://studio.example`. The embed resizes to fit its content; answer values and receipt tokens are never sent to the parent page. Company forms work even when your company has no games. Add bounded campaign tags to a company form's hosted link to compare sources. Native [campaign links](https://ravensight.io/docs/campaign-links/) remain game scoped and can target a form only when the game and form belong to the same project. Form submissions appear as aggregate campaign outcomes, without identifying respondents or joining their answers to gameplay. ## Read results and export Results show views, accepted submissions, daily totals, sources and question summaries. All form report dates use UTC. Published versions are reported separately so a renamed or changed question is not silently combined with its previous meaning. Each question shows answered and skipped counts; choice counts and numeric summaries use the responses still retained. Submissions per recorded view divides accepted submissions by recorded views. It is not a unique-person conversion rate and may exceed 100%, because a browser privacy preference can stop view collection while still allowing an intentional response. With no recorded views, the ratio is unavailable. Owners and admins can read individual responses, filter by version or campaign and export up to 10,000 matching responses as CSV. Narrow the date range or filters for a larger set. Members can build forms and read aggregate results, but cannot publish, close, delete, export responses or read contacts. Viewers and people with access only to a shared game cannot access these company or project records. ## Contact entries and consent choices Contacts are a projection of submitted response fields. An email address, name or consent choice is recorded as entered and is unverified. Two responses using the same email address remain separate. Collecting an address does not create a player account or establish control of that address. Ravensight sends no respondent email, confirmation or campaign broadcast from forms. A checkbox records the wording of that published form version, the choice and the submission time. It does not verify identity or certify consent. You decide the purpose of the collection and whether those choices meet your obligations. ## Privacy and response receipts Each accepted response receives a private receipt link. Its secret stays in the link fragment, and the respondent can download the receipt for safekeeping. Opening the link does not change or disclose the response. The receipt page lets its holder download, withdraw or delete that response through an explicit action. It never gives access to another response submitted with the same email address. There is no email recovery for a lost receipt. A respondent can contact the studio for help. Deleting or withdrawing a response removes its answers and any contact entry derived from it. Previously recorded aggregate collection totals and minimal billing retry records remain; the latter contain no answers or receipt secret. Set automatic deletion to 12 or 24 months, or keep responses until deleted. A minimum-age acknowledgement can be configured from 13 through 99; no birth date or birth year is collected. Forms directed to children are not supported. The studio is responsible for its audience, lawful collection and privacy notice. ## Collection and limits Each accepted response uses one event from the existing shared included event allowance and then available prepaid capacity. Each recorded pageview uses one event. The page reports a view only after it has been open long enough for a person to read it, and the server checks that time against the page's signed token: a faster view is counted as bot traffic and uses no events. Automated submissions, including any that fill the hidden field people never see, are also counted as bot traffic. Results show bot views and bot submissions apart from your real numbers; they store no response and are never billed. The submission total and completion summary are derived from the accepted response and do not add another charge. Retries with the same accepted submission are deduplicated. When both included allowance and available prepaid capacity are exhausted, collection pauses before a new response is stored. Responses are not held for later acceptance. Existing account-owner usage alerts identify affected collection. Invalid, blocked and rejected submissions do not use events. A title's forms refuse addresses on its games' block lists. Company forms have their own list: owners and administrators add an address under Blocked senders on the Forms page, and only a masked form of it is kept. Hosted forms use no cookies or persistent visitor identifier; view collection respects Do Not Track and Global Privacy Control, while intentional submissions remain available. ## Aggregate agent access The game analyst can read the current title's aggregates when the caller has permission, without selecting another title or company. The [MCP server](https://ravensight.io/docs/mcp/) offers `list_forms` and `get_form_stats` with the `forms:read` permission. These read form status and aggregate results only. No tool exposes individual responses, contact entries, consent assertions, quiz keys or receipt secrets. Supply `project_id` for a project title or omit it for company scope. A project-restricted token cannot use company scope. Every call uses the existing programmatic event meter and its funding and token-budget rules. Source: https://ravensight.io/docs/forms/ Last updated: 2026-11-17 --- # Traffic sources and the block list See which connecting addresses a game's sessions and events come from, tell a keen player from a bot, and block an address that is abusing a key. It works for every key, live and public. ## What is kept A raw IP address is never stored. For each game, address and UTC day, Ravensight keeps a keyed hash of the address and a masked form a person can read (an IPv4 address as its /24, like `203.0.113.0/24`, an IPv6 address as its first 48 bits), with that day's sessions, accepted events, refused events, how many devices opened sessions from it (counted up to 50, then shown as 50 or more), and a short, sampled list of its most frequent event names. Device ids are kept only as short digests. These rows are deleted after 30 days; a block keeps the hash and masked form for as long as the block stands. Refused events count only when the address caused them (invalid events, policy refusals, its own session's or device's limits, a block), never when the game is out of funds, at a key's ceiling, switched off or at its game-wide limit. A session also keeps the hash and masked form of the address it was opened from, until the session expires. Playtest and doctor sessions are left out. ## Shapes Each address's day gets one shape. Events means accepted events; refused events are counted apart. | Shape | When | What happens | | --- | --- | --- | | `many_devices` | 10 or more devices opened sessions from the address that day. | A warning on the Implementation card, and the day's traffic email to the studio owner (one per game and day, listing up to ten addresses). It may be a bot or a shared network, such as a school or a cafe. | | `rejections` | At least 50 refused events, and at least 30 percent of everything the address sent. | A warning, listed in the same daily email. | | `heavy_player` | At least 1,000 events and at least 20 percent of the game's day, from one or two devices. | Information only: a heavy player at a steady pace. No email, no action suggested. | | `normal` | Everything else. | Nothing. | ## Blocking an address Block an address from its row in the traffic list, or by typing it; a typed address is hashed and masked and never stored. A block carries a reason (`abuse`, `bot`, `testing` or `other`), an optional note of up to 500 characters, and an optional expiry from one hour to 90 days. A blocked address gets `403 ip_blocked` on `POST /api/v1/session`, `/track` and `/track/batch`, before any rate limit or allowance check, so a refused request is free and never billed. Each block counts the requests it refused. A block or an unblock takes effect within 30 seconds on every server. An SDK treats the 403 as a stop, like any other 403. The honest limit: one address can be many people (a school, an office, a mobile carrier), and a determined sender can change addresses. Block what looks like abuse, and pair it with a [public key's](https://ravensight.io/docs/public-builds/) allowlist and limits. ## API and MCP - `GET /api/v1/games/:gameId/traffic/sources?day=YYYY-MM-DD`: the day's totals and the 50 busiest addresses by events, each with `ipHash`, `ipDisplay`, counts, sampled `names`, `shape` and `blocked`. - `GET`, `POST` and `DELETE /api/v1/games/:gameId/traffic/blocks`: list, add (`{ ipHash or ip, reason, note?, expiresInSeconds? }`) and remove blocks. Adding or removing one needs a role that may change game settings. - Over [MCP](https://ravensight.io/docs/mcp/): `list_traffic_sources`, `list_ip_blocks`, and with a write token `block_ip` and `unblock_ip`. `get_integration_status` carries today's ten busiest addresses and the block list as `traffic`. Source: https://ravensight.io/docs/traffic/ Last updated: 2026-11-15 --- # Website analytics See how visitors reach and use your company or project website. Website collection is separate from game telemetry. It does not need a game environment, create player identities or join form contact details to visits. ## Company and project scope Company home shows your project titles, their environments, existing game activity coverage, company website status and company form totals. It works before you create a game. Open website setup from the Company website card to configure your company website in a dialog. Choose View full website analytics on that card to see its reports. For a game's website, select its project and open Game website under Live data. The website belongs to that title across all its environments. Its domains, tracking key and reports stay separate from your company website and other games. Owners, admins and members can read and configure websites. Shared-game access and the viewer role do not grant access to company or project website records. A project-restricted agent token can read only its allowed projects. With explicit write permission, its website tools can configure only those titles; company scope and studio-wide writes remain unavailable. ## Connect a website 1. For your company, open website setup from the Company website card on Company home. For a game, select its project, open Live data > Game website and choose Setup. Enter a website name. 2. Add each allowed origin, such as `https://studio.example`. Use exact origins without a path, query or wildcard. 3. Choose whether collection waits for your consent control, and whether to enable heatmaps. 4. Copy the installation snippet into your website. Use the generated public website key, separate from any game ingest key. 5. Check installation status after an accepted event arrives. A copied snippet alone does not count as a verified installation. The website tracker supports client-side navigation and named custom events. Do not put personal information in event names or campaign tags. Browser Do Not Track and Global Privacy Control stop collection. Bots are excluded. Your studio remains responsible for deciding when visitor consent is required and providing the appropriate control and notice. To record what happens on your own servers, such as an account created or a payment confirmed, create a server key in the website's setup and send [server events](https://ravensight.io/docs/server-events/) from your backend. They appear only in the website's Server events tab and its MCP tool, never in Events, goals, funnels or any other report, and they do not mark the website as installed. The server key is secret: keep it on your server, never in the snippet. For a private signup or checkout flow, the SDK's outcome-only mode can explicitly report the registered events `signup_form_viewed`, `signup_failed` and `checkout_failed`. It observes no page, form values, account identity or attribution. Failures carry only approved reason categories and, for checkout, an optional monthly or annual plan. These are anonymous observations, not verified signups or purchases. They follow the same consent, privacy and one-event collection rules. Ordinary auth-page tracking remains excluded. ## Read reports Overview shows visitors, pageviews, sessions and bounce rate. Pages adds entry and exit counts. Sources separates referring hosts and campaign tags, while Audience groups broad browser, device and country values. Realtime shows the last five minutes of accepted activity. Reports use normalized addresses, not full query strings or fragments. Imported history may lack active time or other engagement measurements. When newer visits have measurements, the overview shows the available values as a measured portion and explains its coverage. Engagement and bounce rates use only sessions with complete engagement evidence. Missing history is never counted as zero; a range with no measurements stays unavailable. Save a goal for a path or named event. Save a funnel with ordered steps and a completion window to see where sessions stop progressing. Campaigns adds aggregate outcomes and marketing timeline entries from the same permitted scope. There is no person-level attribution between website visitors, contacts and gameplay. Explicit private-flow outcomes appear in Events and event goals or funnels. They do not create a homepage visit, a page-list row or a page session. Realtime event counts include them, while its page list shows observed addresses only. Deliberately absent pages are separate from missing imported history. Events your own backend sends with the website's server key have their own Server events tab: each event name with its count, how many different actors sent it and when it was first and last seen, and for one event its daily counts and one property's 20 most frequent values, for up to 90 days. They never appear in Overview, Pages, Sources, Audience, Events, goals, funnels, retention, heatmaps or Realtime. See [where server events show](https://ravensight.io/docs/server-events/#server-events-reports). Raw website reports support up to 90 days. Daily heatmaps use UTC; the other reports use the selected reporting time zone. Company home includes all authorized game environments, with an environment filter. Campaign summaries show coverage indicators when they include only a bounded selection of game environments. ## Read heatmaps safely Heatmaps are off until you enable them. They record coarse percentage cells for clicks and ten scroll-depth buckets, grouped by page and small, medium or large viewport. They do not record a session, capture typed values, collect page text or take screenshots. Form fields and private regions are excluded. Choose a recorded page and viewport to see click density and scroll depth without uploading an image. You may add a reference image to provide visual context. Remove private information before uploading it. The image is available only through authenticated website access; it is not an automatically captured visitor page. You can remove it independently of the aggregate heatmap. ## Usage and deletion Each accepted pageview, custom event or server event uses one event from the existing shared included allowance and then available prepaid capacity. One combined heatmap summary uses one event. An engagement summary, the active time on a page sent when the page is hidden or left, also uses one event, at most six per page view. A typical visit therefore uses about two events: for example, 50,000 one-page visits in a day use about 100,000 events, which is 5 cents once the included allowance is used. When a page loads, the website tracker asks for a short-lived page token, and a page view is billed only when it carries a token held for at least a second, the same check a hosted form uses: a page view sent sooner, or with a token from another website, is counted as bot traffic instead. Trackers that do not send the token yet keep working as before. Automated visits from known bots and automation tools use no events: they are counted per day, with no visitor, page or address detail, and shown as Bot traffic on the Overview, apart from your visitor numbers. Stable event identifiers deduplicate uncertain retries. Invalid, blocked and rejected events do not use events. When included allowance and available prepaid capacity are exhausted, new collection pauses before storage. The tracker clears its queue on a funding pause; it does not keep unfunded collection for later. Existing account-owner usage alerts identify affected website and form collection. Raw events expire after 90 days. Daily aggregate heatmaps remain until the website is deleted. Deleting a website retires its collection identity and removes its analytics and reference images. Minimal usage and retired-identity records remain so retries cannot revive the deleted site. A new website receives a new collection identity. ## Agent setup and aggregate reports The game analyst can read the current title's aggregate website and form results when the caller has the required permission. Its tools cannot switch to a different company or title. The [MCP server](https://ravensight.io/docs/mcp/#mcp-sites-forms) exposes scoped setup, installation, verification, goals and funnels with website write permission. `get_site`, `verify_site`, `get_site_report` and `get_server_events` need `site:read`; `get_server_events` reads the website's server events, which no other tool or report includes: names with counts, actors and first and last seen, and for one event its daily counts and a property's 20 most frequent values. Reports include events and permitted property breakdowns, engagement, retention, diagnostics, history coverage and aggregate CSV exports. Use `heatmap_pages` to discover recorded pages and viewports. These tools return configuration and aggregates, never raw visitor records, private reference images or contact entries. MCP calls use the existing programmatic event meter, funding requirement and token budget. Source: https://ravensight.io/docs/websites/ Last updated: 2026-11-19 --- # Huginn, the AI analyst Huginn, the AI analyst, lives under **Understand > Huginn**. It picks its own read-only tools, runs them against the game you have selected, and answers with the numbers it used. A completed question is one shared AI unit, including every tool call it made on the way. ## The tools it reaches for `get_overview`, `query_players`, `query_levels`, `get_retention`, `get_history`, `get_metrics`, `get_monetization`, `get_ad_revenue`, `get_campaigns`, `get_ltv_forecast`, `get_progression`, `get_economy`, `get_health`, `get_distribution`, `get_level_map`, `get_retention_split`, `get_data_quality`, `explain_metric_change`, `list_builds`, `compare_builds`, `get_funnel`, `get_property_breakdown` and `search_feedback` cover the numbers, what players spent and what players wrote. `get_code_brief` reads the source scan's notes, `list_playtest_jobs`, `list_playtest_findings`, `get_playtest_report` and `get_validation_report` read playtests, `list_feature_specs`, `get_feature_spec` and `get_feature_job` read [Build a feature](https://ravensight.io/docs/playtest/#labs-feature), `list_game_plans` and `get_game_plan` read [Create a game](https://ravensight.io/docs/playtest/#labs-create), and `list_touchpoints` and `get_sales` read marketing memory and the sales ledger, and the `list_pulse_*`, `get_pulse_post` and `search_pulse_comments` tools read [Pulse](https://ravensight.io/docs/pulse/). Huginn can call `describe_studio_data` to check what data the studio holds (see [Studio data](https://ravensight.io/docs/studio-data/)) before it chooses a tool. On deployments with journey graphs, `get_journeys`, `find_bottlenecks` and `get_top_paths` read those. When nothing else answers, it writes SQL with [run_sql](https://ravensight.io/docs/run-sql/). Every tool is read-only, and the game it reads is the one you selected, never an argument the model can change. ## Analyst context you write yourself Findings are extracted by a model. Analyst context is the opposite: it is what you write, and the analyst is told to trust it over its own reading of the data. There are two levels, both inserted into the prompt verbatim and ahead of the findings. Game context lives in **Settings > Huginn** and holds up to 2,000 characters of facts about one game. Studio notes hold up to 1,000 characters of facts that are true across every game in the studio. A note like "levels 5 through 7 are an intentional difficulty spike" or "we ship weekly builds on Fridays" heads off a wrong conclusion before the analyst reaches for a tool. Writing either needs a member role or above; reading them needs nothing extra. ## The same question across every game Four questions can be asked of the whole studio rather than one game: the headline metrics, what players spent, a funnel, and an event property's breakdown. The analyst has them as `compare_metrics`, `compare_monetization`, `compare_funnel` and `compare_property`, and the API exposes them under `/api/v1/studio/analytics/...`. This is how a problem in one game is told apart from a habit of the studio: if the tutorial loses the same share of players in all three of your games, the tutorial design is the finding. Studio totals are sums and conversions are weighted by volume. There is deliberately no studio median, because the median of medians is not the median. Studio revenue is summed per currency and never across two, and there is no studio revenue per paying player. A studio answer covers at most 12 games. When more were eligible the response says so rather than presenting twelve games as the studio: `studio.truncated` is true and `studio.omittedGames` counts the games left out. A property breakdown also carries `studio.other`, the count of events whose value is not in the merged top list. Source: https://ravensight.io/docs/analyst/ Last updated: 2026-11-15 --- # Your events, queryable directly `run_sql` is available both as an MCP tool and to the in-dashboard analyst. It is a real SELECT against your event store, not a canned report. ## events table columns | Column | Type | | --- | --- | | `game_id` | String | | `device_id` | String | | `session_id` | String | | `event_name` | String | | `ts` | DateTime64(3, 'UTC') | | `level` | String | | `platform` | String | | `game_version` | String | | `country` | String, a two-letter country code, empty when unknown (see [country and device](https://ravensight.io/docs/platform-support/#country-device)) | | `device_model` | String, empty when unknown | | `os_version` | String, empty when unknown | | `gpu` | String, empty when unknown | | `campaign`, `adset`, `creative` | String, where the device was acquired, from its [attribution](https://ravensight.io/docs/dashboard/#typed-events); empty for a device with none | | `payload` | String, arbitrary JSON | | `props` | Map(String, String) of the payload's top-level keys, so `props['difficulty']` reads a property directly. Values are text: cast before comparing numerically. The [typed event](https://ravensight.io/docs/dashboard/#typed-events) keys read the same way, so `toUInt64OrNull(props['rs_amount'])` is a purchase's minor units; leave out rows where `mapContains(props, 'rs_invalid')`. | ## Rules - **SELECT only.** A single `SELECT` or `WITH... SELECT` statement. Writes, DDL, and settings changes are rejected before the query runs. - **No comments, extra statements, dollar signs or table functions.** `--`, `/* */`, `#`, and semicolons (beyond one optional trailing one) are all rejected, as is a `$` anywhere in the query and any table-function call such as `FROM name(...)`. - **events only.** The only readable table is `ravensight.events`, plus any CTEs you define in the same query. Other table names, table functions, and cross-database reads are rejected. - **The game filter is automatic.** Every reference to `events` is rewritten to a subquery scoped to your own `game_id` before it runs. Do not write your own `game_id` predicate: you cannot see or query another game's rows regardless. - **Row cap.** Results are capped at 100 rows when usage metering against the prepaid balance is on, and at 200 rows where metering is off, no matter what `LIMIT` you write. The same cap applies to the analyst and to MCP. - **Money has its own tool.** For revenue use `get_monetization`. If you must read purchases here, `props['rs_amount']` is integer minor units of `props['rs_currency']`, so group by currency, leave out rows with `rs_invalid`, and count a repeated `rs_transaction_id` once per device. - **Query and time limits.** Queries are capped at 4,000 characters and run with `readonly=1` at the database level. A metered query gets 3 seconds of execution and reads at most 1,000,000 rows and 64 MB; with metering off the limit is 15 seconds. ## Example Deaths by level, most first: ``` select level, count() as deaths from events where event_name = 'player_death' group by level order by deaths desc ``` Source: https://ravensight.io/docs/run-sql/ Last updated: 2026-11-15 --- # The gap between what your game does and what it reports Analytics can only answer questions about events you actually send. The source scan reads your code and your live telemetry together, and tells you where the two disagree. ## How it runs Three front doors, one pipeline. Connect GitHub and a push scans itself (below), or send your source as a zip upload up to 100 MB, or as a JSON body of `{ files: [{ path, text }] }` up to 40 MB, which is what makes it easy to post from CI. A cheap model reads the files in batches and writes short notes on what each one does and what it reports. A stronger model then reads those notes alongside a deterministic gather of the last 30 days of your own events, and writes the findings. Neither stage is given tools. Those notes are kept, and your source is not. A scan builds a standing model of the repository: per file, the path, a hash of its text, and our one-line note about it, plus a repository-level read of the architecture, the modules, and which telemetry the code does and does not send. There is nowhere in it to put your code. The next scan compares hashes against that model and re-reads only what changed, which is both why a rescan is priced at a floor rather than by repo size and why the findings get sharper each time: the model that writes them is looking at the whole repository, not at the diff you happened to send. Because it does read the whole repository, a very large one is quoted at its size tier instead of the floor. Your analyst can read that model too, and so can your own agents over MCP, through `get_code_brief`. That is what lets an answer about a funnel that dies at step three come back with the reason: not that players quit, but that nothing in the code reports the step. Only code is read, and only so much of it: eight source extensions, files up to 100 KB, at most 6,000 files, with dependency and build directories skipped. Binaries are detected and dropped rather than counted. Every run carries a hard token budget, so a repo that turns out larger than it looked stops at the budget and reports what it got rather than spending without limit. ## Scanning on every push Connect GitHub once and a push scans what changed, without anybody uploading anything. Open **Code** in the dashboard and press **Connect GitHub**, which installs the Ravensight app on the account or organization that holds your repositories. You choose which repositories it can see, and you can change that on GitHub at any time. Connecting is an owner action, because a connected repository can spend your balance without anybody watching. Ravensight asks for two read permissions and no write permissions: **Contents** and **Metadata**, both read-only. That is enough to read files, the commit tree and a diff between two commits, and it is not enough to push a branch, open a pull request, comment, or change a setting. Nothing in the scanner writes to GitHub. Then attach a repository to a game, on the same screen. One repository belongs to one game: that is what lets a push know whose telemetry to read it against. A game with a client repo and a server repo keeps a separate model of each, and a change to one is never priced as a change to the other. **Only the default branch scans.** A push to a feature branch is acknowledged and ignored, on purpose: the question the scan answers is what your shipped game reports, and a branch is not that yet. If nothing happens after a push, this is the first thing to check. ## What a push spends, and how to stop it A push scan charges the balance by itself, up to **$3 a day per repository**. Past that ceiling the scan is queued instead and waits for somebody to approve it in the dashboard, where the price is shown before you agree to it. You can raise the ceiling per repository, or turn auto-charge off entirely with **Scan every push automatically**, in which case every push queues and nothing is ever charged unattended. The ceiling is deliberately lower than the cheapest whole-repository price, and the reason is worth knowing. Usually a push is a diff, and a diff costs $2. Sometimes there is no diff to read: the first push after connecting, a force push, or a rewritten history all leave us nothing to compare against, so the scan reads the whole repository and is priced accordingly. That is exactly the case that must not be charged while nobody is looking, so it goes past the ceiling and waits for you. Disconnecting is on the same screen, per repository or for the whole studio. Pushes stop immediately. Your notes are kept, because you paid for them and they are what keeps the next scan at the rescan price rather than a first-scan price, so reconnecting later does not mean buying the same reading twice. Deleting the game is what deletes them. ## What you get back Findings, not patches. Each one names a kind (`instrumentation_gap` or `risk`), a severity, the file and lines, a short evidence quote, a hypothesis and a suggestion. Nothing rewrites your code, and nothing is committed anywhere. ## What it costs The first scan of a repository is a fixed price by the size of the source that survives the filter, drawn from your prepaid balance: $5 under 250 KB, $10 under 1 MB, $25 under 4 MB and $50 under 16 MB. Past 16 MB of surviving source a scan is refused rather than priced. Every scan after that is priced on what actually changed. We compare a hash of each file you send against the hash in our notes, and only the files that differ are read and paid for: $2 while the changed source is under 250 KB, and otherwise the tier that change set belongs to on its own. Nothing is taken on trust here, and there is no flag you can set to claim a discount. Two consequences follow, both in your favor. Resubmitting a repository with nothing changed in it is free and does not run, because there is no work to do. And a change set is measured against our notes rather than against the last submission's size, so a 900 KB edit to a 1 MB repository is priced as 900 KB of work instead of as a second full scan. Pricing is per repository, not per game. A game with a client repo and a server repo keeps a separate model of each, and a change to one is never priced as a change to the other. Sizing is free: ask for a quote first and you see the price, what changed, and the token estimate before any money moves. Scanning needs an admin role or above, because it spends the balance. Connecting a code host so that pushes can scan on their own is a step further and is owner only: a scan spends a quoted amount once, while a connected repository is standing permission to spend. Whether that connection is available at all depends on how the deployment you are using is configured, so treat a visible connect button as an offer rather than a promise. If a run stops early on its token budget you pay for the source it actually read, at that size's tier and never more than you were quoted, and you keep the findings and notes it produced. If a run fails outright you are refunded in full and its notes are unwound, so the next scan is priced honestly as a first scan rather than as a cheap diff against a half-written model. Source: https://ravensight.io/docs/code-scan/ Last updated: 2026-11-15 --- # Send an AI persona through your build before a player does Ravensight Playtest is a CLI you run against your own build. It hands your game to a handful of AI personas, each with a different way of playing, and brings back a written report per persona: what worked, what they got stuck on, and whether they would have kept playing. The personas' sessions land in the same dashboard as your real players, tagged so they never touch your real numbers unless you ask for them. ## Before you start You need Node 22 or later, a Ravensight game with an ingest key already set up, and a balance on your account. A playtest run spends from the same prepaid balance as everything else here: no card, no subscription, and nothing runs without balance to cover it. Install the current runner ``` npm install --global ravensight-playtest ``` That puts the `ravensight-playtest` command on your path, and every example below runs it directly. Registering a run spends money, so it needs an admin role or above. Reading past jobs, findings and reports needs only a read-only role, and writing a brief or marking a finding needs a member role. Playwright is an optional dependency, so `login`, `check`, `init` and `brief` work on a machine with no browser installed; only a web-driver run asks for one. The credential store is optional too, which is why a machine with no keychain still installs cleanly. ## Sign in and point it at a game The CLI never asks for a password and never holds a model provider key. Signing in mints a short device code, which you approve from the dashboard rather than typing anything back into the terminal. Sign in ``` ravensight-playtest login ``` This prints a short code and a link. Open the link, or go to [app.ravensight.io/cli](https://app.ravensight.io/cli) and enter the code yourself, then pick which of your games the CLI should be able to touch. The terminal picks up the approval on its own once you confirm it. The token lands in your operating system's credential store: macOS Keychain, Windows Credential Manager, libsecret on Linux. With none available it falls back to a file readable only by you, and says which store it used. For CI, set `RAVENSIGHT_TOKEN` and skip `login` entirely. `logout` revokes the token on the server and forgets it locally, and deliberately leaves a token that came from `RAVENSIGHT_TOKEN` alone, because that is probably a CI secret other jobs share. An org owner can revoke every token a member holds in that org at once from Settings. A CLI token starts with `gt_cli_`, and only that kind works with the CLI, in `RAVENSIGHT_TOKEN` as well. An MCP token (`gt_mcp_`) is refused with a `401` that says so and tells you to run `ravensight-playtest login` for a CLI token. A game's ingest key (`gt_live_`) is refused with `403 ingest_key_not_allowed`. Connect a project to a game ``` ravensight-playtest init --game ``` Run this once per project. It writes a small local config file next to your code so every later command knows which game it is talking about. ## Connect your build Ravensight Playtest plays web builds, in the cloud or on your own machine, and Godot projects on your own machine. With ravensight-playtest 0.12.0 or later it also plays native Android games on an emulator and native iOS games on the iOS Simulator, on your own machine; read [Mobile games](https://ravensight.io/docs/playtest/#playtest-mobile) for what that needs. Native desktop builds are experimental and need an automation server you install and run yourself. Console builds need your own authorized tooling. Choose a build type on the dashboard's Playtest page for its run command. The experimental desktop adapters, and a mobile setup you already run through your own automation server, talk to a local server that speaks the WebDriver protocol. Custom bridges exchange bounded game controls through JSON-RPC, with no model access to a shell. [Read the complete adapter setup and protocol guide](https://ravensight.io/docs/playtest-adapters.txt). ## Which builds play where A cloud playtest opens your build's HTML page in a browser on an isolated machine, so it plays web builds only. A local playtest runs on your own machine and plays web builds, Godot projects, and native Android and iOS builds on an emulator or simulator; for a native desktop build it has only the experimental adapters above. To play an exported web folder locally, pass `--build-dir` with the folder (CLI 0.7.6 or later): the CLI serves it with the headers engine exports need (WebAssembly, Brotli and gzip files, and the isolation a threaded build needs). `--build-url` still plays a build you serve yourself. | Engine | Cloud playtest (upload a ZIP) | Local playtest (CLI) | | --- | --- | --- | | Godot 4 | Web export, with or without threads. The entry file is its page, `index.html` or the name you exported it under. | The web export with `--build-dir`, or the project itself with `--driver godot_driver`. | | Unity | Web build. Use the export settings in [Playtest a Unity game](https://ravensight.io/docs/playtest/#playtest-unity). | The web build with `--build-dir`. An Android or iOS build plays on an emulator or simulator, as in [Mobile games](https://ravensight.io/docs/playtest/#playtest-mobile). A desktop build only through the experimental `--driver unity_driver` adapter with your own automation server. | | LÖVE | The [love.js](https://github.com/Davidobot/love.js) output, standard or compatibility mode. | The love.js output with `--build-dir`. A desktop build only through an experimental adapter: `--driver desktop_driver` with your own automation server, or a custom bridge. | | JavaScript and HTML5 | The built site, with its HTML page as the entry file. | `--build-dir` or `--build-url`. | | C++ | An Emscripten build: its page, JavaScript and `.wasm`, threaded or not. | The Emscripten build with `--build-dir`. A desktop build only through an experimental adapter: `--driver desktop_driver` with your own automation server, or a custom bridge. | | Odin | A `js_wasm32` build with its page and `odin.js`. | The web build with `--build-dir`. A desktop build only through an experimental adapter: `--driver desktop_driver` with your own automation server, or a custom bridge. | | Unreal | Not available: Unreal has no supported web export. | Not supported today. `--driver unreal_driver` is an experimental adapter that needs your own automation server. | | iOS | Not available. Upload a web export instead. | A simulator build (`.app`) on the iOS Simulator, on a Mac with Xcode, with CLI 0.12.0 or later. See [Mobile games](https://ravensight.io/docs/playtest/#playtest-mobile). | | Android | Not available. Upload a web export instead. | An `.apk` on an Android emulator, on a computer with the Android SDK, with CLI 0.12.0 or later. See [Mobile games](https://ravensight.io/docs/playtest/#playtest-mobile). | A cloud upload that is a desktop, mobile or Unreal build is refused before anything is played, with the engine named and what to upload instead. An entry file that is a program or a package (such as `.exe`, `.apk` or `.ipa`) is refused before the validation hold is taken; any other such build is refused at its archive check and the hold is returned after cleanup. No playtest is quoted or charged for a refused build. ## Playtest a Unity game A Unity game is playtested as a web build: export it for the Web platform and play that folder locally, or upload it as a ZIP for a cloud playtest. Both run the same build in a browser. The full list of Player Settings is in [Unity web builds](https://ravensight.io/docs/unity-web-builds/). **Export settings.** In Player Settings for the Web platform: - **Compression Format**: Disabled or Gzip. The local and cloud runs also serve Brotli files with their encoding, but a Brotli Unity export has not been checked end to end, so Disabled or Gzip is the safer choice. - **Decompression Fallback**: off. - **Data Caching**: off. - **WebGL Template**: Default or Minimal, so the export has its `index.html` at the top of the folder. Zip the folder's contents, so `index.html` is at the root of the ZIP. - **Resolution**: a canvas around 960 by 600, so it fits the 1280 by 800 browser window the playtester uses. - **Run In Background**: on, so the game keeps running when the page loses focus. - **No requests to other sites.** The page may load only its own files. A cloud playtest has no network, and a build that loads anything from a web address is refused at its archive check. Play the exported folder on your own machine ``` ravensight-playtest run --driver playwright_web --build-dir ./Builds/WebGL ``` Check the ZIP before a cloud upload (free, nothing is uploaded) ``` ravensight-playtest build preflight ./my-game-web.zip --format web ``` Then upload it with `ravensight-playtest build upload` or from the dashboard, and start a run as in [Cloud playtests](https://ravensight.io/docs/playtest/#playtest-cloud). The limits for a cloud upload: - One standard ZIP under 4 GiB, with no ZIP64, at most 5,000 files and folders at most 16 deep. - Up to 4 GiB unpacked. The unpacked size picks the smallest tier that holds it: Jam up to 50 MiB, Small up to 250 MiB, Medium up to 1 GiB, Large up to 4 GiB. - The dashboard uploads a ZIP of up to 300 MiB; a larger one goes through `ravensight-playtest build upload`, which sends it in parts. - The entry page is an HTML file of at most 64 MB. **Everything is inside the canvas.** Unity draws its whole interface inside one canvas, so the page has no buttons or text the playtester can read directly; it plays from screenshots, as it does any canvas game. The run's own win check reads win wording in the page's text, so a win shown only inside the canvas is not detected by it. To tell the run your game is won, set `window.__ravensightWon = true` from a small `.jslib` plugin when the whole game is won. Play ends there, so set it only for the final win, not a level clear. A jslib plugin, saved under Assets/Plugins/WebGL ``` mergeInto(LibraryManager.library, { RavensightMarkWon: function () { window.__ravensightWon = true; } }); ``` Call it from C# in the web build only ``` #if UNITY_WEBGL && !UNITY_EDITOR [System.Runtime.InteropServices.DllImport("__Internal")] private static extern void RavensightMarkWon(); #endif void OnGameWon() { #if UNITY_WEBGL && !UNITY_EDITOR RavensightMarkWon(); #endif } ``` A Unity web build keeps its saves where the address it is served from decides, so a save file is not placed for it: read `window.RavensightPlaytest.save` at boot instead (see *A save to start from* in [Cloud playtests](https://ravensight.io/docs/playtest/#playtest-cloud)). **What is not supported.** A native Unity desktop build cannot be playtested today. A native Unity Android or iOS build plays locally on an emulator or simulator, as in [Mobile games](https://ravensight.io/docs/playtest/#playtest-mobile). The cloud accepts web builds only and refuses a native Unity build, and no playtest is charged for it. The CLI's `unity_driver` is an experimental adapter that needs an automation server you install and run yourself, and Ravensight does not provide one. ## Mobile games A native mobile game plays on your own machine, on an Android emulator or the iOS Simulator, with ravensight-playtest 0.12.0 or later. Cloud playtests still need a web build: for a cloud run, export the game for the web as described below. - **Android**: an installable `.apk` on an emulator, on a computer with the Android SDK, its emulator and platform tools. - **iOS**: a simulator build (`.app`) on the iOS Simulator, on a Mac with Xcode. An App Store `.ipa` or a build for a physical iPhone is not a simulator build. - **No physical devices.** Runs use an emulator or simulator only, so they do not measure performance on a real phone. **Set up a device.** `ravensight-playtest device setup android` asks before it downloads the SDK parts it needs (about 1 to 2 GB) and creates one emulator for playtests; it never replaces an emulator you already have. `ravensight-playtest device setup ios` builds the small input helper the CLI uses on the simulator, with your installed Xcode. The first time, the simulator can need a visible window and Xcode automation permission. `ravensight-playtest device list` shows your emulators and simulators, and `device boot` and `device shutdown` start and stop one. Video needs `ffmpeg` and `ffprobe` installed; `--no-record-video` needs neither. Free checks: they install, open and close the app, with no job and no charge ``` ravensight-playtest check --driver android_driver --native-build ./game.apk --device emulator-5554 ravensight-playtest check --driver ios_driver --native-build ./Game.app --device YOUR_SIMULATOR_UDID ``` Play on an Android emulator; replace the path and the emulator serial ``` ravensight-playtest run --driver android_driver --native-build ./game.apk --device emulator-5554 --controller geri ``` Play on the iOS Simulator; replace the path and the simulator UDID ``` ravensight-playtest run --driver ios_driver --native-build ./Game.app --device YOUR_SIMULATOR_UDID --controller geri ``` The device is required: give its exact emulator serial, simulator UDID or name with `--device`, or save it in the project's configuration. `--package` (Android) and `--bundle-id` (iOS) check the app's identifier against the build; they cannot pick another installed app. `--portrait` is the default and `--landscape` asks for landscape. The usual price confirmation, brief and per-run budget apply. **How a native run plays.** Geri plays, one persona at a time on the selected device; Freki and comparisons are not available for native builds. The game runs in real time: its timers keep counting while Geri decides, and the game cannot be paused between actions. Geri taps, double taps, long presses and drags in straight lines, and types text. Pinch and other two finger gestures are not available. On Android, the system Back key is available; on iOS, Geri uses the game's own navigation. **Video and privacy.** The recording shows only the selected emulator or simulator display, without audio; keep private content off that display. Video stays on your machine unless you pass `--upload-video`. Reports and screenshots follow the usual upload flow. Use a test build with analytics turned off, or mark these sessions as synthetic in your game's SDK setup. **A web export still helps.** When your engine exports for the web, a web build plays in the cloud and with Freki. It tests the game's logic and flow, not native touch feel, phone performance, every screen size or platform features such as purchases and notifications. For Unity, use the export settings in [Playtest a Unity game](https://ravensight.io/docs/playtest/#playtest-unity). **Your own automation server still works.** If you already run one, supply `--driver-config./ravensight-driver.json` instead of `--native-build`; the two cannot be combined. That connection remains experimental. ## Cloud playtests: one playtester per persona **Web builds only.** Upload a self-contained ZIP with its HTML entry page, JavaScript, WebAssembly and all other assets. It must work without external downloads, authentication services or multiplayer servers. APK, AAB, IPA, `.app` folders, desktop executables, engine projects and source code are not cloud-playtest builds. A mobile game's web export can be tested here; that tests the web build, not the native package. Native Android and iOS builds play locally, as in [Mobile games](https://ravensight.io/docs/playtest/#playtest-mobile). A cloud playtest plays your uploaded web build on our machines with one playtester per persona: **Geri and Freki play your game together**. Geri thinks: it reads each new screen, sets a goal and plans the next few inputs. Freki acts: it plays the routine steps of the plan and the repeats, and hands back to Geri when the screen surprises it. Each persona plays on its own cloud machine, at the same time as the others, and one report covers them all, with each persona's own report beside it. - **Personas.** `fresh-eyes`, a first time player, is always included. Tick any others in the dashboard, or name them with `--personas`; each adds its own price to the quote, which updates as you choose. - **Tiers.** Jam (builds under 50 MB, 5 minutes of play), Small (under 250 MB, 8 minutes), Medium (under 1 GB, 15 minutes) and Large (up to 4 GB, 30 minutes on a bigger machine). The default is the tier your build's unpacked size needs; a smaller one is refused before any hold or charge, with the build's real size and the tier to choose. The dashboard uploads a ZIP of up to 300 MB; a larger one, up to 4 GB, uploads with `ravensight-playtest build upload`, which sends it in parts. - **Video.** A run of ten minutes or less saves one video. A longer run saves one part for each ten minutes it started, and the report plays them in order. Each is kept 90 days. - **Play length.** Choose any length from the tier's own up to 120 minutes per persona. Geri's thinking budget and the action limit grow with it, and Geri's budget is spread over the whole run rather than spent in the first minutes. - **Focus.** A start query or hash on your build (such as `?level=3`), up to five goals that go to the top of every persona's plan ("beat the first boss"), and up to five things to stay out of ("the settings menu"). They are plain text with no links, and the report shows them at the top. - **A save to start from.** `--save ` on `hosted quote` and `hosted run` starts every persona from your save file, at most 1 MiB. `--save-target` says where your game reads it: `godot:user://saves/slot1.sav` for a Godot web export, `localstorage:`, or `idbfs:/mount/path` for another engine's browser file storage. The save is placed there before the game loads. Without a target, or for a game that keeps its save somewhere else (a Unity web build does), the game reads the file itself from `window.RavensightPlaytest.save`, which has its `name`, `bytes` and a `url` to fetch. The dashboard does not upload a save yet. - **The quote.** One line per persona and a total, reserved in full from your prepaid balance before anything starts. When the cloud is busy, each persona shows its own queue place and expected start; a funded run is queued, not refused. - **Refunds.** Each persona settles on its own under the ordinary refund rules. A persona that never gets a machine is refunded in full. The Large tier carries a non-refundable setup fee, a separate line in the quote, kept even when that persona is refunded, unless it never got a machine. - **A build too large for its tier.** If a persona runs out of memory on its machine, or its frame rate stays under 3 frames a second for most of a minute of play while the game is drawing, that persona stops early and the report says what was measured. It keeps the machine time and model spend it used plus the under-scope fee shown on the quote, the rest of its price is refunded, and the report names the tier to choose. A cloud playtest with two more personas, focused ``` ravensight-playtest hosted run --personas speedrunner,completionist \ --minutes 10 --start '?level=3' --focus "beat the first boss" \ --avoid "the settings menu" --wait ``` This needs CLI 0.9.0 or later; a ZIP over 300 MB and `--save` need CLI 0.10.0. The dashboard's **Run in the Ravensight cloud** page offers the same choices, with the live total. Prices are in [Usage rates and limits](https://ravensight.io/docs/limits/). To play your game where it already runs, on your staging or production site, instead of an uploaded build, see [Playtest a live URL](https://ravensight.io/docs/playtest-live-url/). ## Read a cloud playtest report Each persona's report has two lists. **Findings** are only what the run verified: the runner measured it (a control that did nothing when the page got the click, a script error, a crash, a blank screen), a check of the frame at that moment showed it, or a replay with no input showed the screen standing still. **Playtester impressions** are what the playtester felt and said that the run could not verify, in its own words: a matter of taste ("the icon is unclear") kept only when a check of the frame showed what it rests on, and its own liking. An opinion nothing the run saw supports is not kept, and a judgement of its own play ("too hard") is listed as a limit of the run. An impression can be wrong, and the report says so beside each one. What the frame or the run's record showed to be false is in neither list: it is listed with the reason under "Raised by the playtester, not confirmed". - **Top issues.** The findings, each with its severity, its evidence (a screenshot or a time in the session video) and, where the persona said something, its own words. When there is none it says "None confirmed" and points to the lists below. - **Playtester impressions.** Each impression with its step, the playtester's own words, the frame at that moment, its grade (the playtester's, except that a blocker the run's record does not support reads major, as a finding's would) and a note saying why it is not a finding. Impressions are never counted with the findings, never ranked, never put in what to fix first, and never kept as studio memory. The dashboard shows them after the findings, in a quieter list, and `report.json` carries them as `impressions`. - **Checks on the findings.** Each issue is shown once against the frame at its moment and asked whether the frame shows it (for something the playtester says the game did, whether the game is at fault), shows the opposite, or cannot tell, and the recorded inputs are played again with no model to see whether the same thing happens. A claim that nothing happens counts as reproduced only when the screen stayed still while game time ran for two seconds with no input. A replay that could not test a claim says "not verifiable", and a check that was not made says so: neither is counted as passed. The replay ignores the shade a pointer leaves on a hovered or pressed button, as play does, so a control that does nothing is not read as changing the screen. - **Raised by the playtester, not confirmed.** What the playtester said that is neither a finding nor an impression, each with the reason: the run's own record or the frame contradicts it (it called the game stuck while the screen changed, or said something was missing that the run read on screen), the game was doing what it is meant to, it did not come back when tried again, it states a fact about the screen that nothing confirmed, or it is an opinion nothing the run saw supports. A false statement of fact is never relabelled as an impression. None of these is a finding about the game. - **Test charter.** The areas to test, the risks for this kind of game and what a failure would look like, written before testing from the brief and the first screens. About one plan in four is a testing turn once play is under way, and the charter says how many turns each area got; an area that got none is listed as not tested. - **What was and was not tested.** A table of the techniques a hired tester uses, each marked tested or not with the reason: rapid input on one control, every control play never pressed, controls out of order, text fields given nothing and far too much, a menu left and entered again, pause and resume, opposite keys held together, the edges of the play area, text cut off, sound output, input while the game loads, then focus loss, a resize, a mashed key, idling, the browser's Back button and a reload. These probes are scripted and ask no model, and they never press a control the page shows disabled, so a soft lock is never claimed from one; a soft lock check whose every control was disabled is listed as not made, never as passed. A soft lock or freeze a probe reports in the middle of play is turned away when a later click in play, before the game was loaded again, changed the screen, because the game answered. It then lists how a bug was recognised (script errors, a crash or a blank screen, a soft lock, the frame rate, the game's own numbers, placeholder text, a control that does nothing) and the screens and controls the run reached and did not. Not tested never means healthy. - **Limits: What this run didn't cover.** Where the session never got to, and what the playtester could not read, press or confirm. Read it before the findings. The job's own page has a Report tab beside the written reports. It rebuilds the same run, with no model call, as a list of what to fix first, each finding at its moment in the video, its checks, and the inputs that lead to it. ## Record and compare local playthroughs A local run can also be played by Geri alone or by Freki alone, or by both separately for comparison. These options exist for evaluation and are no longer listed in `--help`; a cloud playtest is always the combined playtester above. **Geri** reads each screen and chooses every action itself. **Freki** proposes up to three actions on each screen and lets a separate selector pick one. Freki proposes and never decides: when the selector is unsure or cannot be reached, CLI 0.10.0 plays Freki's most likely candidate, or else the first action proposed for that screen, and the step log says which. Both play the same persona from the same brief at the same price. These options require CLI 0.5.0 or later and a compatible server; the `geri` and `freki` flag values below need CLI 0.8.0. The dashboard's local setup reads the server's current CLI release and playtester capabilities before offering a comparison. Install the runner it names; the CLI checks support again before registration or charge. Web and Godot builds support this flow. For cloud playtests of web builds, see [Which builds play where](https://ravensight.io/docs/playtest/#playtest-engines). The existing hosted Linux headless simulation flow and its separate quote are unchanged. Compare one persona with Geri and Freki, keeping video local ``` ravensight-playtest run --driver playwright_web \ --build-url http://localhost:3000 --personas \ --compare-with freki --record-video ``` Choose a persona from your game's pack. Each selected persona gets two independent paid playthroughs and two reports, one with Geri and one with Freki. Two personas mean four runs. The server quotes all runs together at the existing per-run prices, and the CLI asks you to confirm that total before charging your prepaid balance. At the current standard price, one persona with both playtesters costs $12.80 for Playtest, or $16.40 with `--long`. Freki's selections are included in its run; comparing the reports does not add a model call or fee. For a single explicit playtester, use `--controller geri` or `--controller freki` instead of `--compare-with freki`. Do not combine those flags. Omitting both preserves the configured default. An unavailable playtester is refused before charge, rather than silently replaced. Record a rendered Godot project ``` ravensight-playtest run --driver godot_driver \ --godot-project ./your-game --personas \ --compare-with freki --record-video ``` Godot needs the Ravensight addon, a rendered viewport and local FFmpeg. Web video records the selected Playwright page as WebM; Godot samples the selected viewport and creates an MP4. Neither records audio, your desktop or unrelated windows. Browser recording stays on the selected page and same-origin top-level navigation. A headless Godot process has no rendered scene to record. `--record-video` keeps video on your computer. `--upload-video` also records and explicitly opts in to sending it to this game's dashboard. Alternatively, review a local recording first and upload it later: ``` ravensight-playtest upload --video ``` Reports and screenshots still follow the normal upload flow when video upload is off. A persona run also uploads its step log (`transcript.jsonl`: the inputs sent, what each screen showed and the persona's notes) so the dashboard can show the evidence report, and it is kept 90 days. This applies to projects set up before CLI 0.10.0 too. To keep it on your machine, set `"uploads": { "step_log": false }` in `.ravensight/config.json` or pass `--no-upload-step-log`. Keep real credentials and unrelated private content out of the test scene. Uploaded videos use existing game-scoped access, short-lived playback links and 90-day retention. A local-only recording does not appear in the dashboard's Recording tab. Capture is bounded to 15 minutes, 1280 by 720 and 200 MiB per run, within the existing 500 MiB total artifact limit. A graceful stop or crash may leave partial video; forced termination or machine loss may prevent finalization. Missing video and incomplete reports remain missing or partial. They do not become successful playthroughs. On the job page, select each playtester's playthrough for its separate report. Open **Recording** for uploaded video and supported finding timestamps; **Screenshots** is separate. A comparison stays incomplete if either report is incomplete. Each playtester starts a fresh game process or browser session, but saved game progress and randomness may differ. Use the same build, persona, goals and reset or seed settings where supported, and treat shared findings as evidence to review, not proof of identical starting state. ## Write the brief Before the first run, a persona needs to know what your game is and what you actually want to learn. The quick brief asks for three things: your goals for the session, what would count as success, and how to get the build running, meaning the controls and how to start it. ``` ravensight-playtest brief ``` Four fields make a brief complete: at least one goal, what success looks like, how the game is controlled, and how to start it. The brief is versioned, so every save keeps the version before it and you can see what changed between runs. If someone else saved a newer version while you were editing, the CLI tells you rather than overwriting it. A job registered with an incomplete brief is refused, except a game-profile-only run, which does not need one. `brief --show` prints the current one, `--open` hands you the dashboard form instead, and `--from ` reads the fields from JSON for an unattended setup. ## Check, then run `check` confirms the CLI is signed in, your token is valid, the game is visible to it, your balance covers what you are about to ask for, and that anything the run needs locally, such as Godot or a browser, is where it expects. Run it any time something seems off, and it costs nothing. ``` ravensight-playtest check ``` `run` is the one that spends money. It prints the price before charging anything: how many persona runs, whether a game profile is included, and the total against your balance. Nothing is debited until you confirm that number, and if the price has moved since you last checked, the CLI shows you the new one instead of silently charging it. ``` ravensight-playtest run ``` Unless your project config or `--personas` names others, a run uses one persona, `fresh-eyes`, a first time player. One job allows up to 100 persona/playtester runs; a comparison counts each playtester separately. Past eight runs, the price comes with a note about the clock: a job has 90 minutes of wall time in total and one run can take up to 15 of them, so the later runs in a very large job may never get to play. Nothing is lost if they do not, because a run that did not play is refunded when the job settles; split it into two jobs if you want everything played. Asking twice for the same persona, or for one this game does not have, is refused before anything is charged. `--driver` chooses between the web and Godot drivers, with `--build-url` or `--godot-project` naming the target, `--concurrency` setting how many personas play at once (two by default, while Geri and Freki comparisons run sequentially, and `check` recommends a number for your machine), and `--max-actions` capping one persona's turns. From CLI 0.10.0 a web or Godot run keeps a silent video on your machine by default; `--no-record-video` turns it off. Video is sent only with `--upload-video`. The step log (`transcript.jsonl`: the inputs sent, what each observation read, the persona's notes and the checks made on its findings) uploads by default, including for projects set up before CLI 0.10.0, because the evidence report in the dashboard is built from it; it is kept 90 days. To keep it on your machine, set `"uploads": { "step_log": false }` in `.ravensight/config.json` or pass `--no-upload-step-log`. `--dry-upload` prints every file and byte that would be sent and sends nothing. `--json` and `--yes` are the pair CI wants, since a confirmation prompt with no terminal counts as no. CLI 0.10.0 gives the persona a full set of inputs on web and Godot builds: drags, right, middle and double clicks, a held mouse button, hover, the scroll wheel, held keys that repeat, chords, timed key sequences, and dropdowns and sliders. `--phone` plays a web build on a phone sized screen (390 by 844) with touch and no mouse, and a web game that reads a gamepad is offered a virtual one. An input a driver does not have is refused by name and listed as a limit of the runner, never as a finding. After play, a web or Godot run makes edge checks and tester probes with no model call: focus loss, resizes, rapid input, a short idle and a reload or second start on the game's save, then, on a web build, fast clicks, untried buttons, empty and oversized text, pause and resume and opposite keys (a Godot game gets the four a keyboard can make: rapid input, opposite keys, the edges and pause). A measured problem is a finding with a screenshot. `--no-edge-pass` turns both off. A run then plays its findings' recorded inputs again with no model, in a second browser or a second Godot, and says whether each came back; `--no-replay` skips it. Every report ends with what was and was not tested, kept by the runner, and a control that was never tried is listed as not tested, never as working. A local run judges what the playtester says the way a cloud run does. From CLI 0.13.1, a control that does nothing can be a finding on a local web run, as on a cloud run, when the run measured it: the same named control was pressed at least twice, the page took every press and the screen changed on none, and the control answered at no other moment. The replay then plays the recorded inputs again and watches the screen while game time runs for 2 seconds with no input; only when nothing changed is it a finding. A claim the run did not measure, a Godot run, or a run with `--no-replay` turns it away with the reason, because one still frame cannot settle it. `ravensight-playtest profile` is the other billed command: it has a persona read your codebase alongside the brief, with the same price-then-confirm step, and is priced and refunded the same way a persona run is. Exit codes are meant for CI. 0 is success, 1 a failure, 2 a budget exceeded with partial results written and uploaded, 3 a failed environment check, 4 a failed authentication, 5 a model error after retries, and 10 canceled. Treating 2 as a success with a warning is usually what you want. ## Fix a finding Attempt a fix on a branch ``` ravensight-playtest fix /