Application Insights - 没有屏幕分辨率信息
Application Insights - No screen resolution info
我们有 ASP.Net 个带有 AppInsights 的 Web 应用程序。 Azure 门户中可以查看按客户端 操作系统、浏览器、屏幕分辨率 等分组的会话图表。但是现在,有了新版本的 AppInsights (2.1.0),似乎没有收集有关屏幕分辨率的任何信息的选项。
有什么解决办法吗?或者可能是一些额外的特定配置选项?
with a new version of AppInsights (2.1.0), it seemed that there is no option for gathering any information about screen resolution.
我创建了一个安装 Application Insights v2.1.0 的应用程序,并浏览了来自 Application Insights 门户的数据。
pic :data and charts in portal
如您所说,我们找不到存储有关 Device.ScreenResolution 信息的属性。
Is there any workaround?
Application Insights API 提供调用 TrackEvent(name) 和 TrackMetric(name, value),这使我们能够发送自己的自定义事件和指标。客户端也有等效的调用。如果您想收集客户的屏幕分辨率,您可以尝试编写自定义遥测。您可以通过 javascript.
获取屏幕属性
我找到了这个案例的解决方案。您可以在 JavaScript 代码中使用附加参数扩展调用 trackPageView 方法,如下所示:
appInsights.trackPageView(
null,
null,
{
"Screen Resolution": screen.width + "x" + screen.height,
});
我们有 ASP.Net 个带有 AppInsights 的 Web 应用程序。 Azure 门户中可以查看按客户端 操作系统、浏览器、屏幕分辨率 等分组的会话图表。但是现在,有了新版本的 AppInsights (2.1.0),似乎没有收集有关屏幕分辨率的任何信息的选项。
有什么解决办法吗?或者可能是一些额外的特定配置选项?
with a new version of AppInsights (2.1.0), it seemed that there is no option for gathering any information about screen resolution.
我创建了一个安装 Application Insights v2.1.0 的应用程序,并浏览了来自 Application Insights 门户的数据。
pic :data and charts in portal
如您所说,我们找不到存储有关 Device.ScreenResolution 信息的属性。
Is there any workaround?
Application Insights API 提供调用 TrackEvent(name) 和 TrackMetric(name, value),这使我们能够发送自己的自定义事件和指标。客户端也有等效的调用。如果您想收集客户的屏幕分辨率,您可以尝试编写自定义遥测。您可以通过 javascript.
获取屏幕属性我找到了这个案例的解决方案。您可以在 JavaScript 代码中使用附加参数扩展调用 trackPageView 方法,如下所示:
appInsights.trackPageView(
null,
null,
{
"Screen Resolution": screen.width + "x" + screen.height,
});