We use cookies only to manage your session — no third-party tracking or advertising. Learn more in our Privacy Policy.

RoLearn

Unlock Pro features

RoLearn/ Documentation / SDK
Get API key →SDK product →

Install

Three platforms, one canonical event shape. Pick the tab matching your engine. On Roblox the fastest route is the Studio plugin — Connect once, then one-click Activate drops the SDK into your game with no API-key copy-paste. Prefer to wire it yourself (or on Unity / Steamworks)? The drop-in package + three-step quickstart below still works.

Recommended — Studio plugin (one-click)

The fastest way in. The plugin mints your ingest key, drops in the SDK runtime, and wires purchase tracking for you. No keys to copy, nothing to keep in sync.

  1. Install the RoLearn plugin from the Creator Store, then open its panel in Studio.
  2. Click Connect, then approve the code at rolearn.dev/link.
  3. Open the place you want to instrument and click Activate.
  4. Publish. Sessions appear in the dashboard within ~10s.
RoLearn plugin page on the Roblox Creator Store with an Open in Studio button
Step 1 — the RoLearn plugin on the Creator Store. Click Open in Studio to install.
RoLearn button in the Roblox Studio plugins toolbar
Once installed, RoLearn appears in your Studio toolbar — click it to open the panel and Connect.
noteAlways installs the latest SDK (v0.6.1), key-side only, never in a LocalScript. Re-Activate to rotate the key. Prefer source control? Install manually below.

Or install manually

Step 1 — Install

Latest stable: v0.6.1 · Registry: · License: MIT

Get the SDK file

Download .rbxmxDownload .lua

Easiest (Mac & Windows): download the .rbxmx and drag it into Studio's Explorer (or right-click → Insert from File) — it drops in as a ModuleScript named RoLearnSDK. Move it into ServerScriptService. Prefer source? Copy the code or grab the .lua and paste it into a ModuleScript yourself. No package manager required.

ServerScriptService/RoLearnSDK
-- Drop-in ModuleScript, no package manager needed.
-- Grab it with the buttons above, then:
-- Enable HTTP Requests in Game Settings → Security.
Roblox Studio Experience Settings Security tab with Allow HTTP Requests enabled
Enable Allow HTTP Requests under Game Settings → Security, or the SDK can't reach the ingest endpoint.

Step 2 — Initialize

Initialize once at boot. Provide your rk_live_… key and the game_id you registered in /sdk/games (adding an experience there mints a key automatically).

ServerScriptService/Bootstrap
local SDK = require(game.ServerScriptService.RoLearnSDK)
SDK.init({
    api_key  = "rk_live_XXXX",
    endpoint = "https://rolearn.dev/api/sdk/events",
    game_id  = tostring(game.PlaceId),
})

Step 3 — Track events

Send a test event. The dashboard at /sdk/dashboard refreshes within 1–2 seconds.

Sample events
-- custom event
SDK.track("level", { level = 3, score = 1200 }, player)

-- purchase (auto-hooked from MarketplaceService too)
SDK.purchase(player, {
    sku    = "vip_pass",
    price  = 4.99,
    source = "gamepass",
})
noteServer-side only — never put api_key in a LocalScript. Auto-emits session_start / session_end on PlayerAdded / PlayerRemoving.

Next steps