ワンクリックで
roblox-analytics
Roblox AnalyticsService: custom events, economy tracking, funnels, rate limits, event taxonomy.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Roblox AnalyticsService: custom events, economy tracking, funnels, rate limits, event taxonomy.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Service hierarchy, 7 foundational patterns, cross-platform input. Client-server architecture, module patterns, framework options.
Luau language fundamentals, type system, OOP, deprecation table, error patterns.
Animations, particles, tweens, ContentProvider, visual effects.
Code review with security, performance, and monetization lenses for Roblox projects
DataStores, ProfileStore, session locking, data persistence patterns.
Iterative debug loop for Luau/Roblox issues
| name | roblox-analytics |
| description | Roblox AnalyticsService: custom events, economy tracking, funnels, rate limits, event taxonomy. |
| last_reviewed | "2026-05-24T00:00:00.000Z" |
Load this reference when the task involves:
Roblox provides a first-party analytics system via AnalyticsService. No third-party SDK needed. Events feed directly into the Creator Hub analytics dashboard with 24-hour processing delay.
Load Full Reference below only when you need specific API signatures or implementation patterns.
Key rules:
AnalyticsService (built-in). No third-party analytics SDK needed.All methods are called on the server via game:GetService("AnalyticsService").
Track any game-specific metric. Two forms: counter (no value) and valued.
local AnalyticsService = game:GetService("AnalyticsService")
-- Counter: tracks occurrence count + unique users automatically
AnalyticsService:LogCustomEvent(player, "MissionStarted")
-- With value: enables sum/mean/min/max aggregations
AnalyticsService:LogCustomEvent(player, "MissionCompletedDuration", 120)
-- With custom fields (up to 3): enables filtering/breakdown on dashboard
AnalyticsService:LogCustomEvent(player, "EnemyDefeated", 1, {
customFields = {
[Enum.AnalyticsCustomFieldKeys.CustomField01] = { value = "Zombie" },
[Enum.AnalyticsCustomFieldKeys.CustomField02] = { value = "Sword" },
[Enum.AnalyticsCustomFieldKeys.CustomField03] = { value = "Wave5" },
}
})
Track virtual currency flow. Enables revenue analysis, inflation detection, economy health.
-- Player EARNED currency (source)
AnalyticsService:LogEconomyEvent(
player,
Enum.AnalyticsEconomyFlowType.Source, -- Source = earned/gained
"Coins", -- Currency name (max 10 types)
50, -- Amount
player.leaderstats.Coins.Value + 50, -- Balance AFTER transaction
Enum.AnalyticsEconomyTransactionType.Gameplay.Name, -- Transaction type
"QuestReward_Daily", -- Item SKU (what triggered it)
{
customFields = {
[Enum.AnalyticsCustomFieldKeys.CustomField01] = { value = "Quest_001" },
}
}
)
-- Player SPENT currency (sink)
AnalyticsService:LogEconomyEvent(
player,
Enum.AnalyticsEconomyFlowType.Sink, -- Sink = spent/consumed
"Coins",
200,
player.leaderstats.Coins.Value - 200,
Enum.AnalyticsEconomyTransactionType.Shop.Name,
"SpeedBoost_30min"
)
Transaction types: Gameplay, ContextualPurchase, InAppPurchase, Shop, TimedReward, Trade.
Track step-by-step progression through a flow. Max 10 funnels, 100 steps each.
-- Onboarding funnel: track where players drop off
AnalyticsService:LogFunnelStepEvent(player, "Onboarding", "1", "WelcomeScreen")
-- ... player progresses ...
AnalyticsService:LogFunnelStepEvent(player, "Onboarding", "2", "PickCharacter")
-- ... player progresses ...
AnalyticsService:LogFunnelStepEvent(player, "Onboarding", "3", "FirstBattle")
-- ... player progresses ...
AnalyticsService:LogFunnelStepEvent(player, "Onboarding", "4", "CompleteTutorial")
-- Shop conversion funnel
AnalyticsService:LogFunnelStepEvent(player, "ShopPurchase", "1", "OpenedShop")
AnalyticsService:LogFunnelStepEvent(player, "ShopPurchase", "2", "ViewedItem")
AnalyticsService:LogFunnelStepEvent(player, "ShopPurchase", "3", "ClickedBuy")
AnalyticsService:LogFunnelStepEvent(player, "ShopPurchase", "4", "ConfirmedPurchase")
Steps MUST fire in order for the same player in the same session. Skipping step 2 and firing step 3 breaks the funnel visualization.
| Constraint | Limit |
|---|---|
| Total AnalyticsService calls/minute | 120 + (20 × CCU) |
| Custom event names | 100 |
| Economy resource types | 10 |
| Funnels | 10 |
| Steps per funnel | 100 |
| Custom fields per event | 3 |
| Unique values per custom field | 8,000 (then grouped as "Other") |
For high-frequency events (kills, item pickups), batch on the server:
-- ServerScriptService/Analytics/EventBatcher.luau
local AnalyticsService = game:GetService("AnalyticsService")
local EventBatcher = {}
local batches: { [Player]: { [string]: number } } = {}
-- Accumulate events, flush periodically
function EventBatcher:increment(player: Player, eventName: string, amount: number?)
if not batches[player] then
batches[player] = {}
end
local current = batches[player][eventName] or 0
batches[player][eventName] = current + (amount or 1)
end
function EventBatcher:flush()
for player, events in batches do
if not player:IsDescendantOf(game.Players) then
batches[player] = nil
continue
end
for eventName, value in events do
AnalyticsService:LogCustomEvent(player, eventName, value)
end
end
batches = {}
end
-- Flush every 30 seconds
task.spawn(function()
while true do
task.wait(30)
EventBatcher:flush()
end
end)
-- Flush on player leaving (capture final counts)
game.Players.PlayerRemoving:Connect(function(player)
if batches[player] then
for eventName, value in batches[player] do
AnalyticsService:LogCustomEvent(player, eventName, value)
end
batches[player] = nil
end
end)
return EventBatcher
Use consistent naming. Custom fields for breakdown, not separate event names.
-- ONE event, broken down by weapon type via custom field
AnalyticsService:LogCustomEvent(player, "EnemyKill", 1, {
customFields = {
[Enum.AnalyticsCustomFieldKeys.CustomField01] = { value = weaponType },
[Enum.AnalyticsCustomFieldKeys.CustomField02] = { value = enemyType },
}
})
-- BAD: burns through your 100 event limit fast
AnalyticsService:LogCustomEvent(player, "EnemyKill_Sword")
AnalyticsService:LogCustomEvent(player, "EnemyKill_Bow")
AnalyticsService:LogCustomEvent(player, "EnemyKill_Magic")
Retention signals:
SessionStart - counter, fire on PlayerAddedSessionDuration - value (seconds), fire on PlayerRemovingDayNReturn - counter with custom field for day number (Day1, Day7, Day30)Engagement:
FeatureUsed - custom field 1 = feature nameQuestCompleted - custom field 1 = quest IDLevelReached - value = level numberMonetization funnel:
Progression: