Realistic Analytics
A lightweight telemetry and live-ops package for Roblox, built to solve HttpService 429 throttling and server-crash data loss.
Overview & Context
Running telemetry on live Roblox experiences is notoriously tricky. Roblox strictly throttles outbound requests at 500 requests per minute per server via HttpService. Furthermore, when a game server unexpectedly crashes or terminates, standard player-removing scripts never get the chance to fire, wiping out hours of session data.
I built Realistic Analytics to solve both bottlenecks. It queues high-frequency events in-memory and dispatches them in scheduled batches. It also takes persistent session snapshots every 5 minutes so a crash never costs more than a few minutes of retention data.
It also features honest playtime tracking (which uses active input pings to filter out AFK idling in trade hubs), spatial death heatmaps for game designers, and live crash breadcrumbs that log the player's last client and server actions leading up to an error.
Implementation Snippet
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local AnalyticsModule = require(ReplicatedStorage.AnalyticsModule)
-- Initialise with automated session, error, and retention tracking
local Analytics = AnalyticsModule.init({
debugMode = false,
useRobloxAnalytics = true,
webhookSecret = "webhook", -- Safely sourced from Roblox Secrets
})
-- Intercept DevProducts for Robux revenue metrics without breaking purchases
Analytics:WrapProcessReceipt(function(receiptInfo)
print(string.format("Player %d bought product %d", receiptInfo.PlayerId, receiptInfo.ProductId))
return Enum.ProductPurchaseDecision.PurchaseGranted
end)
-- Leave breadcrumbs before risky actions to diagnose errors
Analytics:AddBreadcrumb(player, "ClickedPurchaseCrate", "ui")
-- Track custom gameplay events anywhere across server scripts
Analytics:TrackEvent(player, "DungeonCompleted", {
dungeonId = "Crypt_01",
partySize = 4,
})Technical Architecture & Core Systems
Anti-Crash Checkpointing
Standard Roblox analytics setups rely on PlayerRemoving to save session duration. If an instance crashes or disconnects abruptly, that event never completes and the session is lost. Realistic Analytics writes persistent state checkpoints every 5 minutes, safeguarding your playtime and retention stats against sudden server teardowns.
Filtering AFK Idling
In trade hubs or social experiences, players frequently idle for hours. Rather than assuming a connected player is actively playing, Realistic Analytics uses client input heartbeats to measure genuine engagement, filtering out AFK time so retention metrics remain truthful.
Safe ProcessReceipt Interception
Roblox enforces a single ProcessReceipt callback across the entire game. Intercepting purchases for telemetry often risks breaking item grants. Realistic Analytics cleanly wraps your existing callback to log Robux revenue without disturbing purchase grants.
Crash Breadcrumbs
Stack traces alone rarely explain why an edge-case error occurred. Breadcrumbs record the player's last several actions prior to a script error, giving developers the exact sequence needed to reproduce and fix elusive bugs.