设置项目启用 Unity 服务之后,即可启用 Analytics 服务。
为此,在 Services 窗口中,选择 Analytics__,然后单击 OFF__ 按钮以将其切换为 ON。如果尚未填写项目的 Age Designation 必填字段,则在此阶段需要执行此操作。(同样,您可能已经为其他 Unity 服务(例如 Ads)完成了此操作)。此处指定的年龄将显示在 Services 窗口中。
随后,必须在项目中点击 Play 以验证与 Unity Analytics 的连接情况。 Unity Editor 将充当测试环境来验证 Analytics 集成。启用 Analytics 的状态下,在按 Play 按钮时,Editor 会将数据(“App Start”事件)发送到 Analytics 服务。这意味着您可以直接测试 Analytics,而不必编译和发布游戏。 一旦按下 Play 按钮,就可以通过转到项目的 Analytics Dashboard 来检查该项目是否已通过验证。要访问此控制面板,请在 Services 窗口中单击 Services > Analytics > Go To Dashboard。
The Go to Dashboard button in the Analytics section of the Services window The dashboard opens in a web browser. You’ll see three headings under your project’s name: Overview, Basic Integration and Advanced Integration. Click Basic Integration, then directly underneath, click step 3: Play to Validate. If your project was set up correctly, you should see a table containing an entry showing an “appStart” event, along with the date and time, as well as your current editor platform and version number.