AnalyticsService
*เนื้อหานี้แปลโดยใช้ AI (เวอร์ชัน Beta) และอาจมีข้อผิดพลาด หากต้องการดูหน้านี้เป็นภาษาอังกฤษ ให้คลิกที่นี่
บริการวิเคราะห์ข้อมูลของเรา คือคอลเลกชันของวิธีที่ผู้พัฒนาติดตามวิธีที่ผู้ใช้ใช้ประสบการณ์ของพวกเขาโดยเฉพาะอย่างยิ่งการเคลื่อนไหวของผู้เล่นในประสบการณ์เศรษฐกิจในประสบการณ์ ฟังก์
สรุป
วิธีการ
บันทึกอีเมนต์ที่ใช้เพื่อติดตามตัวชี้วัดที่กำหนดเองของผู้ใช้ในประสบการณ์
- LogEconomyEvent(player : Player,flowType : Enum.AnalyticsEconomyFlowType,currencyType : string,amount : number,endingBalance : number,transactionType : string,itemSku : string,customFields : Dictionary):void
บันทึกกิจกรรมที่ใช้เพื่อติดตามการกระทําของผู้เล่นในประสบการณ์
- LogFunnelStepEvent(player : Player,funnelName : string,funnelSessionId : string,step : number,stepName : string,customFields : Dictionary):void
บันทึกกิจกรรมที่ใช้เพื่อติดตามการกระทําของผู้ใช้ผ่านช่องทางล่วงหน้า
- LogOnboardingFunnelStepEvent(player : Player,step : number,stepName : string,customFields : Dictionary):void
บันทึกกิจกรรมที่ใช้เพื่อติดตามการกระทําของผู้ใช้ผ่านทางเลนส์เข้าชม
- LogProgressionCompleteEvent(player : Player,progressionPathName : string,level : number,levelName : string,customFields : Dictionary):void
พยายาม
- LogProgressionEvent(player : Player,progressionPathName : string,status : Enum.AnalyticsProgressionType,level : number,levelName : string,customFields : Dictionary):void
บันทึกอีเมนต์เมื่อผู้ใช้เริ่มต้น สำเร็จ หรือล้มเหลวการลองระดับ
- LogProgressionFailEvent(player : Player,progressionPathName : string,level : number,levelName : string,customFields : Dictionary):void
พยายาม
- LogProgressionStartEvent(player : Player,progressionPathName : string,level : number,levelName : string,customFields : Dictionary):void
บันทึกกิจกรรมสำหรับเมื่อผู้ใช้เริ่มการโจมตีระดับ
คุณสมบัติ
วิธีการ
LogCustomEvent
บันทึกกิจกรรมที่ใช้เพื่อติดตามตัวชี้วัดที่กำหนดเองของผู้ใช้ในประสบการณ์ สำหรับข้อมูลเพิ่มเติมดูที่ กิจกรรมเฉพาะ
พารามิเตอร์
ผู้ใช้ที่เรียกเหตุการณ์
ชื่อของเหตุการณ์ที่กำหนดเอง
มูลค่าของเหตุการณ์ที่จะใช้ในการรวบรวม
พจนานุกรมระดับการแก้คำที่เป็นไปได้สำหรับการแสดงผลใน Roblox-ให้ พจนานุกรมระดับการแก้คำที่เป็นไปได้สำหรับการแสดงผลใน Roblox-ให้ เฉพาะกุญแจที่เฉพาะเจาะจงเท่านั้นที่จะใช้สำห
ส่งค่ากลับ
ตัวอย่างโค้ด
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
พิมพ์ในขณะที่คุณฟรีที่จะใช้ประเภทการเรียกร้องใด ๆ ได้ แนะนำให้ใช้ประเภทที่จัดหาจาก Enum.AnalyticsEconomyTransactionType เช่น "IAP"
เนื่องจากรูปแบบฟิลด์นี้เป็นสตริงจึงจะต้องผ่านค่า Name ของ枚ายนามสกุล เช่น Enum.AnalyticsEconomyTransactionType.IAP.Name
จำกัดไว้ที่ 20 ประเภทเท่านั้นต่อประสบการณ์
รหัสผู้จัดจำหน่ายอุปกรณ์เฉพาะหรือรวมของการซื้อ นี่คือรหัสผู้จัดจำหน่ายที่ไม่ซ้ำใครสำหรับรายการที่ซื้อ จำกัดไว้ที่ 100 รหัสผู้จัดจำหน่ายเฉพาะต่อประสบการณ์
พจนานุกรมระดับการแก้คำที่เป็นไปได้สำหรับการแสดงผลใน Roblox-ให้ พจนานุกรมระดับการแก้คำที่เป็นไปได้สำหรับการแสดงผลใน Roblox-ให้ เฉพาะกุญแจที่เฉพาะเจาะจงเท่านั้นที่จะใช้สำห
ส่งค่ากลับ
ตัวอย่างโค้ด
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
บันทึกกิจกรรมที่ใช้เพื่อติดตามการกระทําของผู้ใช้ผ่านทางเลือดแบบวางแผนล่วงหน้า การวิเคราะห์การสะสมของทางเลือดจะพิจารณาเฉพาะค่าผู้ใช้และค่าเหตุการณ์เท่านั้นจากขั้นตอนแรกในเซสชันของ funnel
พารามิเตอร์
ผู้ใช้ที่เรียกเหตุการณ์
ชื่อของช่องทางเรือ นี่ควรจะเป็นเดียวกันสำหรับทุกขั้นตอนในช่องทางเรือ จำกัด 10 ช่องทางเรือต่อประสบการณ์
รหัสอธิบายอย่างเฉพาะสำหรับเซสชันนิดหน่อย นี่ควรจะเหมือนกันสำหรับทุกขั้นตอนในเซสชัน
หมายเหตุว่าสาขานี้จำเป็นเฉพาะสำหรับ funnel ที่เกิดขึ้นซ้ำ เช่น สแน็ปช็อต funnel หรือสแน็ปช็อตอัพเกรด หากคุณไม่มีตัวระบุ funnel ธรรมชาติ, จะแนะนำให้ใช้ HttpService:GenerateGUID()
หมายเลขขั้นตอนในช่องเหล็ก นี้ควรเป็นเอกลักษณ์สำหรับแต่ละขั้นตอนในช่องเหล็ก ทุกช่องเหล็กเริ่มตั้งแต่ขั้นตอนที่ 1 จนถึงขั้นตอนที่ 100 จำกัดเวลา 1-100 ขั้นตอน
เซสชันfunnelSessionId เป็น nil จะได้รับการเพิกเฉย
หมายเหตุว่าหากข้างต้นข้ามขั้นตอนใด ๆ จะถูกยืนยันว่าเป็นขั้นตอนที่สำเร็จ
ชื่อของขั้นตอนในช่องท่อ. สาขานี้ใช้เฉพาะในวัตถุประสงค์การแสดงผลในชาร์ทที่ให้โดย Roblox
พจนานุกรมระดับการแก้คำที่เป็นไปได้สำหรับการแสดงผลใน Roblox-ให้ พจนานุกรมระดับการแก้คำที่เป็นไปได้สำหรับการแสดงผลใน Roblox-ให้ เฉพาะกุญแจที่เฉพาะเจาะจงเท่านั้นที่จะใช้สำห
ส่งค่ากลับ
ตัวอย่างโค้ด
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 จนถึงขั้นตอนที่ 100 จำกัดเวลา 1-100 ขั้นตอน
หมายเหตุว่าหากข้างต้นข้ามขั้นตอนใด ๆ จะถูกยืนยันว่าเป็นขั้นตอนที่สำเร็จ
ชื่อของขั้นตอนในช่องท่อ. สาขานี้ใช้เฉพาะในวัตถุประสงค์การแสดงผลในชาร์ทที่ให้โดย Roblox
พจนานุกรมระดับการแก้คำที่เป็นไปได้สำหรับการแสดงผลใน Roblox-ให้ พจนานุกรมระดับการแก้คำที่เป็นไปได้สำหรับการแสดงผลใน Roblox-ให้ เฉพาะกุญแจที่เฉพาะเจาะจงเท่านั้นที่จะใช้สำห
ส่งค่ากลับ
ตัวอย่างโค้ด
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
บันทึกอีเมนต์สำหรับเมื่อผู้ใช้เสร็จสิ้นการลองเล่นระดับ
พารามิเตอร์
ผู้เล่นที่เรียกเหตุการณ์
ส่งค่ากลับ
LogProgressionEvent
บันทึกอีเมนต์เมื่อผู้ใช้เริ่มต้น เสร็จสิ้น หรือล้มเหลวการลองใหม่ในระดับหนึ่ง อีเมนต์นี้ไม่ได้แสดงในชาร์ทใดที่นำเสนอโดย Roblox ในขณะนี้
พารามิเตอร์
ผู้เล่นที่เรียกเหตุการณ์
ส่งค่ากลับ
LogProgressionFailEvent
พยายามอีเมนต์นี้ไม่ได้แสดงในชาร์ทใดๆ ที่นำเสนอโดย Roblox ในขณะนี้
พารามิเตอร์
ผู้ใช้ที่เรียกเหตุการณ์
ส่งค่ากลับ
LogProgressionStartEvent
บันทึกอีเมนต์สำหรับเมื่อผู้ใช้เริ่มการโจมตีระดับ หนึ่ง ไม่ว่าอีเมนต์นี้จะปรากฏในชาร์ทที่จัดหาโดย Roblox หรือไม่
พารามิเตอร์
ผู้เล่นที่เรียกเหตุการณ์