anyone knows how to query Azure App Insight to get analytics on client devices ? or OS ? I seem to be able to get good stats on Client countries but not devices
You should have used client_CountryOrRegion
in your existing queries, replace it with client_Browser
Or other required data models.
Here are some queries I used to see summary on browsers..
pageViews | summarize count() by client_Browser
browserTimings | summarize avg(networkDuration), avg(processingDuration), avg(totalDuration) by name
For more data model ref: Application Insights Export Data Model
Or try to use this one
requests
| project client_Type, client_Browser, client_Model, client_OS
| limit 100
You can get a lot of noise due to minor OS and browser variations. Here's a query that pulls the same data, but also simplifies the values so they can be grouped by more easily
// scalars
let startDate = ago(31d);
let totalCount = toscalar(pageViews | where timestamp > startDate | count);
// query
pageViews
| where timestamp > startDate
| project
Browser = case(
client_Browser has "Firefox", "Firefox",
client_Browser has "Safari", "Safari",
client_Browser has "Chrome", "Chrome",
client_Browser has "Samsung", "Samsung",
client_Browser has "Edg", "Edge",
client_Browser has "Opera", "Opera",
client_Browser has "Internet Explorer", "Internet Explorer",
client_Browser has "Silk", "Amazon Silk",
client_Browser has "Facebook", "Facebook",
client_Browser has "Instagram", "Instagram",
client_Browser has "Apple Mail", "Apple Mail",
client_Browser has "Android WebKit", "Android WebKit",
"Other"),
OS = case(
client_OS has "iOS", "iOS",
client_OS has "Android", "Android",
client_OS has "Mac", "Mac",
client_OS has "Windows", "Windows",
client_OS has "Linux", "Linux",
client_OS has "Chrome OS", "Chrome OS",
client_OS has "Firefox OS", "Firefox OS",
"Other")
| summarize Freq = count() by OS, Browser
| project OS, Browser, Freq, Percent = round(100.0 * Freq / totalCount, 2)
| order by Freq desc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With