Skip to content

Service · inherits Instance

AnalyticsService

Official docs ↗

Collection of methods that allows you to track how users interact with your experiences.

About AnalyticsService

AnalyticsService is a collection of methods that allows you to track how users interact with your experiences, specifically player progression, in-experience economy, funnels, and custom events. For more information on using this service, see Event types.

Methods 10

  • GetPlayerSegmentsAsync(player: Player) → DictionaryYieldsReturns coarse player segment buckets for the current experience.

    This server-only method returns coarse segment buckets for a player in the current experience. Use these buckets at runtime to personalize content or gate features for specific player groups. If a cached result is not already available, the method may yield while the engine fetches the segment data. Successfully fetched results are cached per player for the lifetime of the server session.

    If segment data is unavailable, this method does not throw. Instead, it returns HasData = false and all enum fields are set to Unknown.

    This method throws only when called from the client or when the player argument is invalid.

    The returned dictionary has the following structure:

  • LogCustomEvent(player: Player, eventName: string, value: double = 1, customFields: Dictionary = nil) → ()Logs an event used to track custom metrics of a user in experience.

    Logs an event used to track custom metrics of a user in experience. For more information, see Custom events.

  • LogEconomyEvent(player: Player, flowType: AnalyticsEconomyFlowType, currencyType: string, amount: float, endingBalance: float, transactionType: string, itemSku: string, customFields: Dictionary = nil) → ()Logs an event used to track player actions related in experience.

    Logs an event used to track player actions related in experience. For more information, see Economy events.

  • LogFunnelStepEvent(player: Player, funnelName: string, funnelSessionId: string, step: int = 1, stepName: string, customFields: Dictionary = nil) → ()Logs an event used to track user actions stepping through a pre-planned funnel.

    Logs an event used to track user actions stepping through a pre-planned funnel. Funnel breakdowns only consider the user and event values from the first step in a funnel session. See Funnel events.

  • LogJourneyEvent(player: Player, journeyName: string, nodeName: string, journeySessionId: string, customFields: Dictionary = nil) → ()Logs a journey event used to track non-linear player paths through an experience.

    Logs a journey event used to track non-linear player paths through an experience. Unlike funnels, which track ordered sequential steps, journeys track graph-like player paths where players can move between named nodes in any order. Each call records that a player reached a specific node within a named journey. The resulting data is visualized as a Sankey diagram in Creator Hub, showing how players distribute across paths in the experience.

  • LogOnboardingFunnelStepEvent(player: Player, step: int, stepName: string, customFields: Dictionary = nil) → ()Logs an event used to track user actions stepping through an onboarding funnel.

    Logs an event used to track user actions stepping through an onboarding funnel. Funnel breakdowns only consider the user and event values from the first step in a funnel session. See Funnel events.

  • LogProgressionCompleteEvent(player: Player, progressionPathName: string, level: int, levelName: string, customFields: Dictionary = nil) → ()Logs an event for when a user has completed a level attempt.

    Logs an event for when a user has completed a level attempt. This event does not currently display in any Roblox-provided charts.

  • LogProgressionEvent(player: Player, progressionPathName: string, status: AnalyticsProgressionType, level: int, levelName: string, customFields: Dictionary = nil) → ()Logs an event for when a user has started, completed, or failed a level attempt.

    Logs an event for when a user has started, completed, or failed a level attempt. This event does not currently display in any Roblox-provided charts.

  • LogProgressionFailEvent(player: Player, progressionPathName: string, level: int, levelName: string, customFields: Dictionary = nil) → ()Logs an event for when a user has failed a level attempt.

    Logs an event for when a user has failed a level attempt. This event does not currently display in any Roblox-provided charts.

  • LogProgressionStartEvent(player: Player, progressionPathName: string, level: int, levelName: string, customFields: Dictionary = nil) → ()Logs an event for when a user has started a level attempt.

    Logs an event for when a user has started a level attempt. This event does not currently display in any Roblox-provided charts.

AnalyticsService also has every member of Instance. Deprecated and Roblox-only members are hidden.

Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.