AnalyticsService

แสดงที่เลิกใช้งานแล้ว

*เนื้อหานี้แปลโดยใช้ AI (เวอร์ชัน Beta) และอาจมีข้อผิดพลาด หากต้องการดูหน้านี้เป็นภาษาอังกฤษ ให้คลิกที่นี่

ไม่สามารถสร้าง
บริการ
ไม่ซ้ำ

บริการวิเคราะห์ข้อมูลของเรา คือคอลเลกชันของวิธีที่ผู้พัฒนาติดตามวิธีที่ผู้ใช้ใช้ประสบการณ์ของพวกเขาโดยเฉพาะอย่างยิ่งการเคลื่อนไหวของผู้เล่นในประสบการณ์เศรษฐกิจในประสบการณ์ ฟังก์

สรุป

วิธีการ

คุณสมบัติ

วิธีการ

LogCustomEvent

void

บันทึกกิจกรรมที่ใช้เพื่อติดตามตัวชี้วัดที่กำหนดเองของผู้ใช้ในประสบการณ์ สำหรับข้อมูลเพิ่มเติมดูที่ กิจกรรมเฉพาะ

พารามิเตอร์

player: Player

ผู้ใช้ที่เรียกเหตุการณ์

eventName: string

ชื่อของเหตุการณ์ที่กำหนดเอง

value: number

มูลค่าของเหตุการณ์ที่จะใช้ในการรวบรวม

ค่าเริ่มต้น: 1
customFields: Dictionary

พจนานุกรมระดับการแก้คำที่เป็นไปได้สำหรับการแสดงผลใน Roblox-ให้ พจนานุกรมระดับการแก้คำที่เป็นไปได้สำหรับการแสดงผลใน Roblox-ให้ เฉพาะกุญแจที่เฉพาะเจาะจงเท่านั้นที่จะใช้สำห

ค่าเริ่มต้น: "nil"

ส่งค่ากลับ

void

ตัวอย่างโค้ด

This example uses AnalyticsService:LogCustomEvent() to log two custom events: MissionStarted and MissionCompletedDuration.

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

void

บันทึกกิจกรรมที่ใช้เพื่อติดตามการกระทําของผู้เล่นในประสบการณ์

พารามิเตอร์

player: Player

ผู้ใช้ที่เรียกเหตุการณ์

ควรระบุทิศทางที่เงินไหลผ่านโดยใช้ Enum.AnalyticsEconomyFlowType

currencyType: string

ชื่อของสกุลเงินที่กำลังเพิ่มหรือลบ เช่น "gold" , "gems" หรือ "energy" จำกัดไว้ที่ 5 ประเภทสกุลเงินที่แตกต่างกันต่อประสบการณ์

amount: number

จำนวนเงินของสกุลเงินที่เพิ่มหรือลบออก มันควรจะเป็นบวกเสมอ

endingBalance: number

ยอดเงินของผู้ใช้หลังจากที่เงินได้รับการเพิ่มหรือลบ มูลค่านี้ควรจะใหญ่กว่าหรือเท่ากับ 0

transactionType: string

พิมพ์ในขณะที่คุณฟรีที่จะใช้ประเภทการเรียกร้องใด ๆ ได้ แนะนำให้ใช้ประเภทที่จัดหาจาก Enum.AnalyticsEconomyTransactionType เช่น "IAP"

เนื่องจากรูปแบบฟิลด์นี้เป็นสตริงจึงจะต้องผ่านค่า Name ของ枚ายนามสกุล เช่น Enum.AnalyticsEconomyTransactionType.IAP.Name

จำกัดไว้ที่ 20 ประเภทเท่านั้นต่อประสบการณ์

itemSku: string

รหัสผู้จัดจำหน่ายอุปกรณ์เฉพาะหรือรวมของการซื้อ นี่คือรหัสผู้จัดจำหน่ายที่ไม่ซ้ำใครสำหรับรายการที่ซื้อ จำกัดไว้ที่ 100 รหัสผู้จัดจำหน่ายเฉพาะต่อประสบการณ์

ค่าเริ่มต้น: ""
customFields: Dictionary

พจนานุกรมระดับการแก้คำที่เป็นไปได้สำหรับการแสดงผลใน Roblox-ให้ พจนานุกรมระดับการแก้คำที่เป็นไปได้สำหรับการแสดงผลใน Roblox-ให้ เฉพาะกุญแจที่เฉพาะเจาะจงเท่านั้นที่จะใช้สำห

ค่าเริ่มต้น: "nil"

ส่งค่ากลับ

void

ตัวอย่างโค้ด

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.

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

void

บันทึกกิจกรรมที่ใช้เพื่อติดตามการกระทําของผู้ใช้ผ่านทางเลือดแบบวางแผนล่วงหน้า การวิเคราะห์การสะสมของทางเลือดจะพิจารณาเฉพาะค่าผู้ใช้และค่าเหตุการณ์เท่านั้นจากขั้นตอนแรกในเซสชันของ funnel

พารามิเตอร์

player: Player

ผู้ใช้ที่เรียกเหตุการณ์

funnelName: string

ชื่อของช่องทางเรือ นี่ควรจะเป็นเดียวกันสำหรับทุกขั้นตอนในช่องทางเรือ จำกัด 10 ช่องทางเรือต่อประสบการณ์

funnelSessionId: string

รหัสอธิบายอย่างเฉพาะสำหรับเซสชันนิดหน่อย นี่ควรจะเหมือนกันสำหรับทุกขั้นตอนในเซสชัน

หมายเหตุว่าสาขานี้จำเป็นเฉพาะสำหรับ funnel ที่เกิดขึ้นซ้ำ เช่น สแน็ปช็อต funnel หรือสแน็ปช็อตอัพเกรด หากคุณไม่มีตัวระบุ funnel ธรรมชาติ, จะแนะนำให้ใช้ HttpService:GenerateGUID()

ค่าเริ่มต้น: ""
step: number

หมายเลขขั้นตอนในช่องเหล็ก นี้ควรเป็นเอกลักษณ์สำหรับแต่ละขั้นตอนในช่องเหล็ก ทุกช่องเหล็กเริ่มตั้งแต่ขั้นตอนที่ 1 จนถึงขั้นตอนที่ 100 จำกัดเวลา 1-100 ขั้นตอน

เซสชันfunnelSessionId เป็น nil จะได้รับการเพิกเฉย

หมายเหตุว่าหากข้างต้นข้ามขั้นตอนใด ๆ จะถูกยืนยันว่าเป็นขั้นตอนที่สำเร็จ

ค่าเริ่มต้น: 1
stepName: string

ชื่อของขั้นตอนในช่องท่อ. สาขานี้ใช้เฉพาะในวัตถุประสงค์การแสดงผลในชาร์ทที่ให้โดย Roblox

ค่าเริ่มต้น: ""
customFields: Dictionary

พจนานุกรมระดับการแก้คำที่เป็นไปได้สำหรับการแสดงผลใน Roblox-ให้ พจนานุกรมระดับการแก้คำที่เป็นไปได้สำหรับการแสดงผลใน Roblox-ให้ เฉพาะกุญแจที่เฉพาะเจาะจงเท่านั้นที่จะใช้สำห

ค่าเริ่มต้น: "nil"

ส่งค่ากลับ

void

ตัวอย่างโค้ด

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.

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

void

บันทึกกิจกรรมที่ใช้เพื่อติดตามการกระทําของผู้ใช้ผ่านทางเลนส์เข้ามา การแยกทางเลนจะพิจารณาเฉพาะค่าผู้ใช้และค่าเหตุการณ์จากขั้นตอนแรกในเซสชันของเลน

พารามิเตอร์

player: Player

ผู้ใช้ที่เรียกเหตุการณ์

step: number

หมายเลขขั้นตอนในช่องเหล็ก นี้ควรเป็นเอกลักษณ์สำหรับแต่ละขั้นตอนในช่องเหล็ก ทุกช่องเหล็กเริ่มตั้งแต่ขั้นตอนที่ 1 จนถึงขั้นตอนที่ 100 จำกัดเวลา 1-100 ขั้นตอน

หมายเหตุว่าหากข้างต้นข้ามขั้นตอนใด ๆ จะถูกยืนยันว่าเป็นขั้นตอนที่สำเร็จ

stepName: string

ชื่อของขั้นตอนในช่องท่อ. สาขานี้ใช้เฉพาะในวัตถุประสงค์การแสดงผลในชาร์ทที่ให้โดย Roblox

ค่าเริ่มต้น: ""
customFields: Dictionary

พจนานุกรมระดับการแก้คำที่เป็นไปได้สำหรับการแสดงผลใน Roblox-ให้ พจนานุกรมระดับการแก้คำที่เป็นไปได้สำหรับการแสดงผลใน Roblox-ให้ เฉพาะกุญแจที่เฉพาะเจาะจงเท่านั้นที่จะใช้สำห

ค่าเริ่มต้น: "nil"

ส่งค่ากลับ

void

ตัวอย่างโค้ด

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.

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

void

บันทึกอีเมนต์สำหรับเมื่อผู้ใช้เสร็จสิ้นการลองเล่นระดับ

พารามิเตอร์

player: Player

ผู้เล่นที่เรียกเหตุการณ์

progressionPathName: string
level: number
levelName: string
ค่าเริ่มต้น: ""
customFields: Dictionary
ค่าเริ่มต้น: "nil"

ส่งค่ากลับ

void

LogProgressionEvent

void

บันทึกอีเมนต์เมื่อผู้ใช้เริ่มต้น เสร็จสิ้น หรือล้มเหลวการลองใหม่ในระดับหนึ่ง อีเมนต์นี้ไม่ได้แสดงในชาร์ทใดที่นำเสนอโดย Roblox ในขณะนี้

พารามิเตอร์

player: Player

ผู้เล่นที่เรียกเหตุการณ์

progressionPathName: string
level: number
levelName: string
ค่าเริ่มต้น: ""
customFields: Dictionary
ค่าเริ่มต้น: "nil"

ส่งค่ากลับ

void

LogProgressionFailEvent

void

พยายามอีเมนต์นี้ไม่ได้แสดงในชาร์ทใดๆ ที่นำเสนอโดย Roblox ในขณะนี้

พารามิเตอร์

player: Player

ผู้ใช้ที่เรียกเหตุการณ์

progressionPathName: string
level: number
levelName: string
ค่าเริ่มต้น: ""
customFields: Dictionary
ค่าเริ่มต้น: "nil"

ส่งค่ากลับ

void

LogProgressionStartEvent

void

บันทึกอีเมนต์สำหรับเมื่อผู้ใช้เริ่มการโจมตีระดับ หนึ่ง ไม่ว่าอีเมนต์นี้จะปรากฏในชาร์ทที่จัดหาโดย Roblox หรือไม่

พารามิเตอร์

player: Player

ผู้เล่นที่เรียกเหตุการณ์

progressionPathName: string
level: number
levelName: string
ค่าเริ่มต้น: ""
customFields: Dictionary
ค่าเริ่มต้น: "nil"

ส่งค่ากลับ

void

อีเวนต์