분석 서비스 는 개발자가 사용자가 경험과 상호작용하는 방식, 특히 플레이어 진행률, 경험 내 경제, 파이프라인 및 사용자 지정 이벤트를 추적할 수 있는 메서드 컬렉션입니다.
요약
메서드
경험에서 사용자의 사용자 지정 메트릭을 추적하는 데 사용되는 이벤트를 로깅합니다.
- 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):()
사용자가 레벨 시도를 시작했을 때 이벤트를 로그합니다.
속성
메서드
LogCustomEvent
경험에서 사용자의 사용자 지정 메트릭을 추적하는 데 사용되는 이벤트를 로그합니다. 자세한 정보는 사용자 지정 이벤트를 참조하십시오.
매개 변수
이벤트를 트리거한 사용자.
사용자 지정 이벤트의 이름.
집계에 사용될 이벤트의 값.
Roblox에서 제공하는 차트에서 분석을 제공하는 사용자 지정 필드의 선택적 사전.특정 키, 즉 Enum.AnalyticsCustomFieldKeys에서 제공하는 키만 이러한 분석에 사용됩니다.경험당 세 개의 사용자 지정 필드에서 값의 8,000개 고유 조합으로 제한됩니다.
반환
코드 샘플
This example uses AnalyticsService:LogCustomEvent() to log two custom events: MissionStarted and MissionCompletedDuration.
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
경험과 관련된 플레이어 작업을 추적하는 데 사용되는 이벤트를 로그합니다.
매개 변수
이벤트를 트리거한 사용자.
통화가 Enum.AnalyticsEconomyFlowType를 사용하여 흐르는 방향을 지정해야 합니다.
예를 들어 "gold", "gems", 또는 "energy"의 통화 이름이 추가되거나 제거됩니다.경험당 5개의 고유 통화 유형으로 제한됩니다.
추가되거나 제거되는 통화 금액. 이 값은 항상 양수여야 합니다.
통화가 추가되거나 제거된 후 사용자의 잔액. 이 값은 항상 0보다 크거나 같아야 합니다.
발생한 트랜잭션 유형.모든 거래 입력사용할 수 있지만, Roblox 도구와 차트에서 미래의 통찰력을 활성화하기 위해 제공된 유형(예: Enum.AnalyticsEconomyTransactionType 또는 "IAP" 또는 "ContextualPurchase" )을 사용하는 것이 좋습니다.
이 필드 유형이 문자열이기 때문에 열거형의 Name 값을 전달해야 합니다. 예를 들어 Enum.AnalyticsEconomyTransactionType.IAP.Name .
경험당 20개의 고유 유형으로 제한됩니다.
구매하는 아이템이나 패키지의 선택적 SKU.구매하는 아이템의 고유 식별자입니다.경험당 100개의 고유 SKU 제한.
Roblox에서 제공하는 차트에서 분석을 제공하는 사용자 지정 필드의 선택적 사전.특정 키, 즉 Enum.AnalyticsCustomFieldKeys에서 제공하는 키만 이러한 분석에 사용됩니다.경험당 세 개의 사용자 지정 필드에서 값의 8,000개 고유 조합으로 제한됩니다.
반환
코드 샘플
The following sample tracks a Robux purchase of a 1000-coin bundle, using the IAP (in-app purchase) transaction type. Note the item name provided as an optional parameter when compared to the previous sample.
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
사전 계획된 파이프라인을 통해 사용자 작업을 추적하는 데 사용되는 이벤트를 로깅합니다.깔때기 분석은 깔때기 세션의 첫 번째 단계에서 사용자 및 이벤트 값만 고려합니다.
매개 변수
이벤트를 트리거한 사용자.
깔때기의 이름. 이는 깔때기의 모든 단계에서 동일해야 합니다. 경험당 10개의 고유한 깔때기로 제한됩니다.
깔때기 세션에 대한 선택적 고유 식별자. 이는 깔때기의 모든 단계에서 동일해야 합니다.
이 필드는 반복되는 펄스, 예를 들어 구매 흐름 펄스 또는 아이템 업그레이드 펄스에만 필요합니다.자연스러운 깔때기 세션 식별자가 없는 경우 HttpService:GenerateGUID()를 사용하는 것이 좋습니다.
깔때기의 단계 번호. 이는 깔때기의 각 단계에 고유해야 합니다. 모든 깔때기는 1단계에서 시작됩니다. 1-100단계까지 제한됩니다.
동일한 사용자가 동일한 깔때기 세션에서 반복적인 단계를 수행하거나, funnelSessionId가 nil일 때 무시됩니다.
어떤 단계를 건너뛰더라도 중간 단계는 완료된 것으로 간주됩니다.
깔때기의 단계 이름(선택 사항). 이 필드는 Roblox가 제공하는 차트에서 표시 목적으로만 사용됩니다.
Roblox에서 제공하는 차트에서 분석을 제공하는 사용자 지정 필드의 선택적 사전.특정 키, 즉 Enum.AnalyticsCustomFieldKeys에서 제공하는 키만 이러한 분석에 사용됩니다.경험당 세 개의 사용자 지정 필드에서 값의 8,000개 고유 조합으로 제한됩니다.
반환
코드 샘플
The following sample tracks some basic events for each user beginning the process to buy an item from an "armory" shop. Note the funnelSessionId used to distinguish between different sessions of the same user opening the shop.
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
온보딩 파이프라인을 통해 사용자 작업을 추적하는 데 사용되는 이벤트를 로깅합니다.깔때기 분석은 깔때기 세션의 첫 번째 단계에서 사용자 및 이벤트 값만 고려합니다.
매개 변수
이벤트를 트리거한 사용자.
깔때기의 단계 번호. 이는 깔때기의 각 단계에 고유해야 합니다. 모든 깔때기는 1단계에서 시작됩니다. 1-100단계까지 제한됩니다.
어떤 단계를 건너뛰더라도 중간 단계는 완료된 것으로 간주됩니다.
깔때기의 단계 이름(선택 사항). 이 필드는 Roblox가 제공하는 차트에서 표시 목적으로만 사용됩니다.
Roblox에서 제공하는 차트에서 분석을 제공하는 사용자 지정 필드의 선택적 사전.특정 키, 즉 Enum.AnalyticsCustomFieldKeys에서 제공하는 키만 이러한 분석에 사용됩니다.경험당 세 개의 사용자 지정 필드에서 값의 8,000개 고유 조합으로 제한됩니다.
반환
코드 샘플
The following sample demonstrates how to log two steps of an onboarding funnel. An onboarding funnel typically introduces players to the game's core loop.
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
사용자가 레벨 시도를 완료했을 때 이벤트를 로그합니다. 이 이벤트는 현재 Roblox가 제공하는 차트에 표시되지 않습니다.
매개 변수
이벤트를 트리거한 플레이어.
반환
LogProgressionEvent
사용자가 레벨 시도를 시작, 완료 또는 실패했을 때 이벤트를 로그합니다. 이 이벤트는 현재 Roblox가 제공하는 차트에 표시되지 않습니다.
매개 변수
이벤트를 트리거한 플레이어.
반환
LogProgressionFailEvent
사용자가 레벨 시도를 실패했을 때 이벤트를 로깅합니다. 이 이벤트는 현재 Roblox가 제공하는 차트에 표시되지 않습니다.
매개 변수
이벤트를 트리거한 사용자.
반환
LogProgressionStartEvent
사용자가 레벨 시도를 시작했을 때 이벤트를 로깅합니다. 이 이벤트는 현재 Roblox가 제공하는 차트에 표시되지 않습니다.
매개 변수
이벤트를 트리거한 플레이어.