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 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