在 Application Insights 中进行用户、会话和事件分析Users, sessions, and events analysis in Application Insights

查明人们何时使用 Web 应用,他们对哪些页面最感兴趣,用户在哪里以及他们使用什么浏览器和操作系统。Find out when people use your web app, what pages they're most interested in, where your users are located, and what browsers and operating systems they use. 使用 Azure Application Insights 分析业务和使用情况遥测Analyze business and usage telemetry by using Azure Application Insights.

Application Insights 用户的屏幕截图

入门Get started

如果在 Application Insights 门户的“用户”、“会话”或“事件”边栏选项卡中没有看到数据,请了解如何开始使用“使用情况”工具If you don't yet see data in the users, sessions, or events blades in the Application Insights portal, learn how to get started with the usage tools.

用户、会话和事件分段工具The Users, Sessions, and Events segmentation tool

三个使用情况边栏选项卡使用相同的工具从三个视角对来自 Web 应用的遥测进行切片和切块。Three of the usage blades use the same tool to slice and dice telemetry from your web app from three perspectives. 通过对数据进行筛选和拆分,可以洞察不同页面和功能的相对使用情况。By filtering and splitting the data, you can uncover insights about the relative usage of different pages and features.

  • “用户”工具 :多少人使用了应用及其功能。Users tool : How many people used your app and its features. 将使用浏览器 cookie 中存储的匿名 ID 对用户进行计数。Users are counted by using anonymous IDs stored in browser cookies. 使用不同浏览器或计算机的单个用户会被计为多个用户。A single person using different browsers or machines will be counted as more than one user.

  • “会话”工具 :用户活动的多少会话包括了应用的特定页面和功能。Sessions tool : How many sessions of user activity have included certain pages and features of your app. 会话是在用户处于不活动状态半小时后或者在连续使用 24 小时后进行计数的。A session is counted after half an hour of user inactivity, or after 24 hours of continuous use.

  • “事件”工具 :应用的特定页面和功能是以何频率使用的。Events tool : How often certain pages and features of your app are used. 当浏览器加载了应用中的页面时会计入一次页面查看,前提是已检测到此操作A page view is counted when a browser loads a page from your app, provided you have instrumented it.

    自定义事件表示应用中发生的某个事件的一次出现,通常是一项用户交互,例如单击按钮或某项任务完成。A custom event represents one occurrence of something happening in your app, often a user interaction like a button click or the completion of some task. 可以在应用中插入代码来生成自定义事件You insert code in your app to generate custom events.

查询特定用户Querying for certain users

通过在“用户”工具的顶部调整查询选项来探究不同的用户组:Explore different groups of users by adjusting the query options at the top of the Users tool:

  • 显示:选择要分析的一组用户。Show: Choose a cohort of users to analyze.
  • 使用者:选择自定义事件和页面视图。Who used: Choose custom events and page views.
  • 期间:选择一个时间范围。During: Choose a time range.
  • 依据:选择如何划分数据的存储段,可以按时间段或按其他属性(例如浏览器或城市)。By: Choose how to bucket the data, either by a period of time or by another property such as browser or city.
  • 拆分依据:选择对数据进行拆分或分段时要依据的属性。Split By: Choose a property by which to split or segment the data.
  • 添加筛选器:将查询限制到特定的用户、会话或事件(根据其属性,例如浏览器或城市)。Add Filters: Limit the query to certain users, sessions, or events based on their properties, such as browser or city.

保存和共享报表Saving and sharing reports

可以将用户报表保存为在“我的报表”部分中专供你使用的报表,或者将其保存为在“共享报表”部分中可供对此 Application Insights 资源具有访问权限的其他所有人访问的共享报表。You can save Users reports, either private just to you in the My Reports section, or shared with everyone else with access to this Application Insights resource in the Shared Reports section.

若要共享“用户”、“会话”或“事件”报表的链接,请单击工具栏中的“共享” ,然后复制该链接。To share a link to a Users, Sessions, or Events report; click Share in the toolbar, then copy the link.

若要共享“用户”、“会话”或“事件”报表中的数据副本,请单击工具栏中的“共享” ,然后单击“Word 图标” 使用该数据创建一个 Word 文档。To share a copy of the data in a Users, Sessions, or Events report; click Share in the toolbar, then click the Word icon to create a Word document with the data. 或者,单击主图表上方的“Word 图标” 。Or, click the Word icon above the main chart.

了解用户Meet your users

“了解用户” 部分显示与当前查询匹配的五个示例用户的相关信息。The Meet your users section shows information about five sample users matched by the current query. 除了聚合之外,考虑并探究个体的行为可以洞察人们使用应用的实际方式。Considering and exploring the behaviors of individuals, in addition to aggregates, can provide insights about how people actually use your app.

后续步骤Next steps