Install the module
Add the Analyse ModuleScript to ServerScriptService, turn on HttpService and start it with your API key.
1. Add the module
Get the module from Downloads and insert it into ServerScriptService as a ModuleScript named Analyse.
The module is four files: init.luau becomes the Analyse ModuleScript, and Transport, Experiments and Sha256 sit inside it as children. If you use Rojo, the SDK ships a default.project.json that builds exactly that.
ServerScriptService
└── Analyse (ModuleScript)
├── Experiments (ModuleScript)
├── Sha256 (ModuleScript)
└── Transport (ModuleScript)2. Turn on HttpService
In Roblox Studio, open Game Settings, then Security, and enable Allow HTTP Requests. The module cannot send anything without it.
3. Start it with your key
Copy your API key from the game's Settings, Integration in the dashboard. Then add a server Script, for example ServerScriptService/AnalyseStart:
local ServerScriptService = game:GetService("ServerScriptService")
local Analyse = require(ServerScriptService.Analyse)
local analyse = Analyse.new({
apiKey = "ag_live_...",
version = "1.4.0", -- your game's version, optional
})
return analyseThat is all for joins, leaves and sessions. Publish, join the game and the dashboard shows you as online within a minute.
Options
| Option | Default | What it does |
|---|---|---|
apiKey | Required | Your game's API key |
version | "" | Your game's version, shown per deployment |
deployment | PlaceId | Which place this server runs |
group | GameId | Which experience the place belongs to |
flushInterval | 5 | Seconds between batches |
maxQueueSize | 10000 | Events kept in memory while the network is down; newer events are dropped past this |
verifyInterval | 300 | Seconds between key and config checks |
autoTrackPlayers | true | Send joins and leaves from PlayerAdded and PlayerRemoving |
autoHeartbeat | true | Send a heartbeat with players online |
endpoint | https://gateway.analyse.net | Where events go. Leave it as is |
Check it works
Call analyse:stats() to see what the module has done:
print(analyse:stats())
-- enqueued, sent, dropped, retried, lastStatus, queueDepthIn the dashboard, Settings, Integration shows the connection status, the last event and the module version.
Delivery and limits
- Events are batched every 5 seconds, up to 1000 per request. A full batch is sent immediately.
- Failed requests (network errors, rate limits, server errors) are retried with backoff from 1 to 60 seconds, for up to 10 minutes.
- A rejected key (401 or 403) stops delivery and clears the queue. Check the key and restart the server.
- Event names are cut to 128 characters, property keys to 64 and text values to 512.