Application Insight Analytics - 查询客户端浏览器和设备

时间:2017-07-26 01:10:40

标签: azure analytics azure-application-insights

任何人都知道如何查询Azure App Insight以获取客户端设备上的分析?还是OS?我似乎能够在客户国家/地区获得良好的统计数据,但现在设备

3 个答案:

答案 0 :(得分:2)

您应该在现有查询中使用client_CountryOrRegion,将其替换为client_Browser 或其他所需的数据模型。

以下是我用于查看浏览器摘要的一些查询..

pageViews | summarize count() by client_Browser

browserTimings | summarize avg(networkDuration), avg(processingDuration), avg(totalDuration) by name 

更多数据模型参考:https://docs.microsoft.com/en-us/azure/application-insights/app-insights-export-data-model

答案 1 :(得分:1)

或者尝试使用这个

VisualVm

答案 2 :(得分:1)

由于较小的操作系统和浏览器变化,您可能会收到很多噪音。这是一个提取相同数据的查询,但也简化了值,以便可以更轻松地对它们进行分组

let startDate = ago(31d);
let totalCount = toscalar(pageViews | where timestamp > startDate | count);
pageViews
 | where timestamp > startDate
 | project
    Browser = case(client_Browser contains "Firefox", "Firefox",
                    client_Browser contains "Safari", "Safari",
                    client_Browser contains "Chrome", "Chrome",
                    client_Browser contains "Samsung", "Samsung",
                    client_Browser contains "Edg", "Edge",
                    client_Browser contains "Opera", "Opera",
                    client_Browser contains "Internet Explorer", "Internet Explorer",
                    client_Browser contains "Silk", "Amazon Silk",
                    client_Browser contains "Facebook", "Facebook",
                    client_Browser contains "Instagram", "Instagram",
                    client_Browser contains "Apple Mail", "Apple Mail",
                    client_Browser contains "Android WebKit", "Android WebKit",
                    "Other"),
   OS = case(client_OS contains "iOS", "iOS",
                    client_OS contains "Android", "Android",
                    client_OS contains "Mac", "Mac",
                    client_OS contains "Windows", "Windows",
                    client_OS contains "Linux", "Linux",
                    client_OS contains "Chrome OS", "Chrome OS",
                    client_OS contains "Firefox OS", "Firefox OS",
                    "Other")
 | summarize Freq = count() by OS, Browser
 | extend Percent = round(100.0 * Freq / totalCount, 2)
 | order by Freq desc