Learn
Engine Class
AnalyticsService
Not Creatable
Service
Not Replicated

Summary
Properties
ApiKey:string
Deprecated
Methods
FireCustomEvent(player: Instance,eventCategory: string,customData: Variant):()
Deprecated
FireEvent(category: string,value: Variant):()
Deprecated
FireInGameEconomyEvent(player: Instance,itemName: string,economyAction: Enum.AnalyticsEconomyAction,itemCategory: string,amount: number,currency: string,location: Variant,customData: Variant):()
Deprecated
FireLogEvent(player: Instance,logLevel: Enum.AnalyticsLogLevel,message: string,debugInfo: Variant,customData: Variant):()
Deprecated
FirePlayerProgressionEvent(player: Instance,category: string,progressionStatus: Enum.AnalyticsProgressionStatus,location: Variant,statistics: Variant,customData: Variant):()
Deprecated
LogCustomEvent(player: Player,eventName: string,value: number,customFields: Dictionary):()
LogEconomyEvent(player: Player,flowType: Enum.AnalyticsEconomyFlowType,currencyType: string,amount: number,endingBalance: number,transactionType: string,itemSku: string,customFields: Dictionary):()
LogFunnelStepEvent(player: Player,funnelName: string,funnelSessionId: string,step: number,stepName: string,customFields: Dictionary):()
LogOnboardingFunnelStepEvent(player: Player,step: number,stepName: string,customFields: Dictionary):()
LogProgressionCompleteEvent(player: Player,progressionPathName: string,level: number,levelName: string,customFields: Dictionary):()
LogProgressionEvent(player: Player,progressionPathName: string,status: Enum.AnalyticsProgressionType,level: number,levelName: string,customFields: Dictionary):()
LogProgressionFailEvent(player: Player,progressionPathName: string,level: number,levelName: string,customFields: Dictionary):()
LogProgressionStartEvent(player: Player,progressionPathName: string,level: number,levelName: string,customFields: Dictionary):()
Inherited Members

API Reference
Properties
ApiKey
Deprecated

Methods
FireCustomEvent
Deprecated

FireEvent
Deprecated

FireInGameEconomyEvent
Deprecated

FireLogEvent
Deprecated

FirePlayerProgressionEvent
Deprecated

GetPlayerSegmentsAsync
Yields
Capabilities: Basic
AnalyticsService:GetPlayerSegmentsAsync(player:Player):Dictionary
Parameters
player:Player
Returns
Code Samples
Configure server-side experiences with player segments
local Players = game:GetService("Players")
local AnalyticsService = game:GetService("AnalyticsService")
local function configurePlayerExperience(player)
local segments = AnalyticsService:GetPlayerSegmentsAsync(player)
if not segments.HasData then
return
end
if segments.WhenUserFirstPlayed == Enum.WhenUserFirstPlayed.Days0To30 then
print("Show additional onboarding for", player.Name)
end
if segments.ActivePayerStatus == Enum.ActivePayerStatus.Top15Percent then
print("Show high-value offer to", player.Name)
end
end
Players.PlayerAdded:Connect(configurePlayerExperience)

LogCustomEvent
Capabilities: Basic
AnalyticsService:LogCustomEvent(
player:Player, eventName:string, value:number, customFields:Dictionary
):()
Parameters
player:Player
eventName:string
value:number
Default Value: 1
customFields:Dictionary
Default Value: "nil"
Returns
()
Code Samples
Log Custom Event
local AnalyticsService = game:GetService("AnalyticsService")
-- Log when the mission starts
AnalyticsService:LogCustomEvent(
player,
"MissionStarted" -- Custom event name
)
-- Log when the mission is completed with the time it took
AnalyticsService:LogCustomEvent(
player,
"MissionCompletedDuration", -- Custom event name
120 -- Event value used in aggregation
)

LogEconomyEvent
Capabilities: Basic
AnalyticsService:LogEconomyEvent(
player:Player, flowType:Enum.AnalyticsEconomyFlowType, currencyType:string, amount:number, endingBalance:number, transactionType:string, itemSku:string, customFields:Dictionary
):()
Parameters
player:Player
currencyType:string
amount:number
endingBalance:number
transactionType:string
itemSku:string
customFields:Dictionary
Default Value: "nil"
Returns
()
Code Samples
Tracking an in-app purchase
local AnalyticsService = game:GetService("AnalyticsService")
AnalyticsService:LogEconomyEvent(
player,
Enum.AnalyticsEconomyFlowType.Source,
"Coins",
1000, -- How many coins are in the bundle
1020, -- balance after transaction
Enum.AnalyticsEconomyTransactionType.IAP.Name,
"1000CoinBundle" -- Unique identifier of the coin bundle
)

LogFunnelStepEvent
Capabilities: Basic
AnalyticsService:LogFunnelStepEvent(
player:Player, funnelName:string, funnelSessionId:string, step:number, stepName:string, customFields:Dictionary
):()
Parameters
player:Player
funnelName:string
funnelSessionId:string
step:number
Default Value: 1
stepName:string
customFields:Dictionary
Default Value: "nil"
Returns
()
Code Samples
Tracking Shop steps
local AnalyticsService = game:GetService("AnalyticsService")
local HttpService = game:GetService("HttpService")
funnelSessionId = HttpService:GenerateGUID()
-- Log when the user opens the store
AnalyticsService:LogFunnelStepEvent(
player,
"ArmoryCheckout", -- Funnel name used to group steps together
funnelSessionId, -- Funnel session ID for this unique checkout session
1, -- Step number
"Opened Store" -- Step name
)
-- Log when the user views an item
AnalyticsService:LogFunnelStepEvent(
player,
"ArmoryCheckout", -- Funnel name used to group steps together
funnelSessionId, -- Funnel session ID for this unique checkout session
2, -- Step number
"Viewed Item" -- Step name
)
-- Log when the user views adds to cart
AnalyticsService:LogFunnelStepEvent(
player,
"ArmoryCheckout", -- Funnel name used to group steps together
funnelSessionId, -- Funnel session ID for this unique checkout session
3, -- Step number
"Added to Cart" -- Step name
)

LogOnboardingFunnelStepEvent
Capabilities: Basic
AnalyticsService:LogOnboardingFunnelStepEvent(
player:Player, step:number, stepName:string, customFields:Dictionary
):()
Parameters
player:Player
step:number
stepName:string
customFields:Dictionary
Default Value: "nil"
Returns
()
Code Samples
Tracking onboarding steps
local AnalyticsService = game:GetService("AnalyticsService")
-- Log the first step of the FTUE
AnalyticsService:LogOnboardingFunnelStepEvent(
player,
1, -- Step number
"Joined Game" -- Step name
)
-- Log the second step of the FTUE
AnalyticsService:LogOnboardingFunnelStepEvent(
player,
2, -- Step number
"Choose Class" -- Step name
)

LogProgressionCompleteEvent
Capabilities: Basic
AnalyticsService:LogProgressionCompleteEvent(
player:Player, progressionPathName:string, level:number, levelName:string, customFields:Dictionary
):()
Parameters
player:Player
progressionPathName:string
level:number
levelName:string
customFields:Dictionary
Default Value: "nil"
Returns
()

LogProgressionEvent
Capabilities: Basic
AnalyticsService:LogProgressionEvent(
player:Player, progressionPathName:string, status:Enum.AnalyticsProgressionType, level:number, levelName:string, customFields:Dictionary
):()
Parameters
player:Player
progressionPathName:string
level:number
levelName:string
customFields:Dictionary
Default Value: "nil"
Returns
()

LogProgressionFailEvent
Capabilities: Basic
AnalyticsService:LogProgressionFailEvent(
player:Player, progressionPathName:string, level:number, levelName:string, customFields:Dictionary
):()
Parameters
player:Player
progressionPathName:string
level:number
levelName:string
customFields:Dictionary
Default Value: "nil"
Returns
()

LogProgressionStartEvent
Capabilities: Basic
AnalyticsService:LogProgressionStartEvent(
player:Player, progressionPathName:string, level:number, levelName:string, customFields:Dictionary
):()
Parameters
player:Player
progressionPathName:string
level:number
levelName:string
customFields:Dictionary
Default Value: "nil"
Returns
()

©2026 Roblox Corporation. Roblox, the Roblox logo and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.