Quick start
Download the module, paste two values and press Play.
Before you start
- Create an account, then create a project. You get a project ID and an ingestion key for your game; the key is shown once and stays in server-only code.
- In Roblox Studio open Game Settings → Security and turn on Allow HTTP Requests.
Add the SDK
- Get the module from the RoStructure page on the Creator Store and insert it into your game. In Studio you can also open the Toolbox, choose the Creator Store tab and search for RoStructure.
- Two scripts appear in Workspace:
RoStructureSetupandRoStructure. - Select both and drag them into
ServerScriptService. - Open
RoStructureSetupand paste your project ID and ingestion key at the top.
Press Play. That is the whole setup: sessions, quits and deaths are recorded automatically, and there is no code to write.
local PROJECT_ID = "proj_a1b2c3d4e5f6a7b8c9"
local INGESTION_KEY = "rsk_..."
-- Names this version of your level. Change it (for example to "v2") when you rebuild the map or add terrain.
local BUILD_ID = "v1"
-- Record events while you test in Studio. Turn this off before you launch.
local ENABLE_IN_STUDIO = true
-- Optional: your level folder. Studio test sessions send a simplified copy so deaths show on your real map.
local MAP = workspace:FindFirstChild("Level")Tag your level
For stages, checkpoints and deaths with a cause, tag parts in View → Tag Editor and add the attribute. No scripting.
| Tag | Attribute | What is recorded |
|---|---|---|
StageStart | StageId, for example 1 | stage_started on first touch, and that stage for the player's later events. |
Checkpoint | StageId | checkpoint_reached, once per player. |
KillPart | Cause, for example Lava | Kills on touch, and the death is recorded with that cause. |
To name a stage on the map, add a StageId attribute (and optionally StageName) to the folder or part that holds that stage's geometry.
See your data
Press Play. The Output window shows [RoStructure] published build v1 when your map has been sent. Then open the dashboard: data appears within about 5 seconds.
Your own events
Add milestones from any server script. The client from init is also available anywhere as RoStructure.get().
local RoStructure = require(game.ServerScriptService.RoStructure)
local analytics = RoStructure.get()
analytics:track(player, "bought_item", { metadata = { item = "sword" } })