Unity Analytics 可让您深入了解游戏用户,例如 DAU 和 MAU。
注意:以下文档适用于带有 Unity 5.1 及更高版本的 Unity Analytics。要将 Unity Analytics 与 Unity 的早期版本集成,请参阅 https://analytics.cloud.unity3d.com/docs 上的文档。
具体来说,开箱即用功能包括可通过 Metric Monitor 和 Data Explorer 访问用户参与度和留存数据。您可以利用 20 多个标准细分段自动应用不同用户维度和特征的玩家细分,无需使用任何额外工具。
For more detail around features, refer to the Unity Analytics homepage at https://unity3d.com/unity/analytics.
Important: Always make calls to the Analytics API inside the scope of an #if ENABLE_CLOUD_SERVICES_ANALYTICS statement to prevent compilation errors on platforms that do not support Analytics:
#if ENABLE_CLOUD_SERVICES_ANALYTICS // Analytics code #endif
configUrl | 获取分析配置终端。 |
dashboardUrl | Get the Analytics dashboard endpoint. |
deviceStatsEnabled | 控制是否启用在运行时发送设备统计信息的功能。 |
enabled | 控制是否在运行时启用 Analytics 服务。 |
eventUrl | 获取 Analytics 事件终端。 |
initializeOnStartup | 报告 Unity 是否设置为在启动时初始化 Analytics。 |
limitUserTracking | 控制是否在运行时限制用户跟踪功能。 |
playerOptedOut | 报告玩家是否已选择退出数据收集。 |
CustomEvent | 自定义事件(可选)。 |
EnableCustomEvent | 使用它可启用或禁用自定义事件。 |
EnableEvent | 使用它可启用或禁用事件。 |
FlushEvents | 如有可能,尝试立即把所有排队的分析事件传输到网络和文件系统缓存(可选)。 |
IsCustomEventEnabled | 使用它可检查自定义事件启用状态。 |
IsEventEnabled | 使用它可检查事件启用状态。 |
RegisterEvent | 此 API 用于注册运行时 Analytics 事件。注意:此 API 仅供内部使用,未来可能会发生更改。不要在用户代码中使用。 |
ResumeInitialization | 继续 Analytics 初始化。 |
SendEvent | 此 API 用于发送运行时 Analytics 事件。注意:此 API 仅供内部使用,未来可能会发生更改。不要在用户代码中使用。 |
SetEventEndPoint | 使用此 API 可设置事件终端 URL。注意:此 API 仅供内部使用,未来可能会发生更改。不要在用户代码中使用。 |
SetEventPriority | 使用此 API 可设置事件优先级。注意:此 API 仅供内部使用,未来可能会发生更改。不要在用户代码中使用。 |
Transaction | 跟踪变现(可选)。 |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.