From 0305f729ca0506884b212bbb18620ef003bdcdf4 Mon Sep 17 00:00:00 2001 From: Michael Levin Date: Mon, 28 Oct 2024 17:00:42 -0400 Subject: [PATCH] [Feature] Convert demograhpics reports to be by users instead of sessions --- reports/usa.json | 1387 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 1121 insertions(+), 266 deletions(-) diff --git a/reports/usa.json b/reports/usa.json index ab17fb6..99c6a98 100644 --- a/reports/usa.json +++ b/reports/usa.json @@ -25,6 +25,9 @@ ], "query": { "dimensions": [ + { + "name": "month" + }, { "name": "screenResolution" } @@ -59,7 +62,29 @@ "filter": { "fieldName": "screenResolution", "stringFilter": { - "value": "other", + "value": "null", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "screenResolution", + "stringFilter": { + "value": "", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "screenResolution", + "stringFilter": { + "value": "(not set)", "caseSensitive": false } } @@ -69,6 +94,12 @@ } }, "orderBys": [ + { + "dimension": { + "dimensionName": "month" + }, + "desc": true + }, { "metric": { "metricName": "totalUsers" @@ -77,6 +108,7 @@ } ] }, + "limit": "100000", "meta": { "name": "Screen Resolution", "description": "30 days of screen resolution demographics by user for all sites." @@ -91,6 +123,9 @@ ], "query": { "dimensions": [ + { + "name": "month" + }, { "name": "screenResolution" } @@ -125,7 +160,29 @@ "filter": { "fieldName": "screenResolution", "stringFilter": { - "value": "other", + "value": "null", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "screenResolution", + "stringFilter": { + "value": "", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "screenResolution", + "stringFilter": { + "value": "(not set)", "caseSensitive": false } } @@ -135,6 +192,12 @@ } }, "orderBys": [ + { + "dimension": { + "dimensionName": "month" + }, + "desc": true + }, { "metric": { "metricName": "totalUsers" @@ -143,6 +206,7 @@ } ] }, + "limit": "100000", "meta": { "name": "Screen Resolution", "description": "90 days of screen resolution demographics by user for all sites." @@ -152,12 +216,15 @@ "name": "language", "frequency": "daily", "slim": true, - "sumVisitsByColumns": [ + "sumUsersByColumns": [ "language", "language_code" ], "query": { "dimensions": [ + { + "name": "month" + }, { "name": "language" }, @@ -167,9 +234,103 @@ ], "metrics": [ { - "name": "sessions" + "name": "totalUsers" } ], + "dimensionFilter": { + "andGroup": { + "expressions": [ + { + "notExpression": { + "filter": { + "fieldName": "language", + "stringFilter": { + "value": "(other)", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "language", + "stringFilter": { + "value": "null", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "language", + "stringFilter": { + "value": "", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "language", + "stringFilter": { + "value": "(not set)", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "languageCode", + "stringFilter": { + "value": "(other)", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "languageCode", + "stringFilter": { + "value": "null", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "languageCode", + "stringFilter": { + "value": "", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "languageCode", + "stringFilter": { + "value": "(not set)", + "caseSensitive": false + } + } + } + } + ] + } + }, "dateRanges": [ { "startDate": "90daysAgo", @@ -179,28 +340,35 @@ "orderBys": [ { "dimension": { - "dimensionName": "sessions" + "dimensionName": "month" + }, + "desc": true + }, + { + "metric": { + "metricName": "totalUsers" }, "desc": true } ] }, + "limit": "100000", "meta": { "name": "Browser Language", - "description": "90 days of visits by browser language for all sites." + "description": "90 days of browser language demographics by user for all sites." } }, { "name": "devices", "frequency": "daily", "slim": true, - "sumVisitsByColumns": [ + "sumUsersByColumns": [ "device" ], "query": { "dimensions": [ { - "name": "date" + "name": "month" }, { "name": "deviceCategory" @@ -208,7 +376,7 @@ ], "metrics": [ { - "name": "sessions" + "name": "totalUsers" } ], "dimensionFilter": { @@ -224,6 +392,39 @@ } } } + }, + { + "notExpression": { + "filter": { + "fieldName": "deviceCategory", + "stringFilter": { + "value": "null", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "deviceCategory", + "stringFilter": { + "value": "", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "deviceCategory", + "stringFilter": { + "value": "(not set)", + "caseSensitive": false + } + } + } } ] } @@ -237,151 +438,231 @@ "orderBys": [ { "dimension": { - "dimensionName": "date" + "dimensionName": "month" }, "desc": true - } - ] - }, - "meta": { - "name": "Devices", - "description": "30 days of desktop/mobile/tablet visits for all sites." - } - }, - { - "name": "devices-90-days", - "frequency": "daily", - "slim": true, - "sumVisitsByColumns": [ - "device" - ], - "query": { - "dimensions": [ - { - "name": "date" }, { - "name": "deviceCategory" - } - ], - "metrics": [ - { - "name": "sessions" - } - ], - "dateRanges": [ - { - "startDate": "90daysAgo", - "endDate": "yesterday" - } - ], - "orderBys": [ - { - "dimension": { - "dimensionName": "date" + "metric": { + "metricName": "totalUsers" }, "desc": true } ] }, + "limit": "100000", "meta": { - "name": "Devices - 90 days", - "description": "90 days of desktop/mobile/tablet visits for all sites." + "name": "Devices", + "description": "30 days of desktop/mobile/tablet demographics by user for all sites." } }, { - "name": "device-model", + "name": "devices-90-days", "frequency": "daily", "slim": true, - "sumVisitsByColumns": [ - "mobile_device" + "sumUsersByColumns": [ + "device" ], "query": { "dimensions": [ { - "name": "date" + "name": "month" }, { - "name": "mobileDeviceModel" + "name": "deviceCategory" } ], "metrics": [ { - "name": "sessions" - } - ], - "dateRanges": [ - { - "startDate": "90daysAgo", - "endDate": "yesterday" + "name": "totalUsers" + } + ], + "dimensionFilter": { + "andGroup": { + "expressions": [ + { + "notExpression": { + "filter": { + "fieldName": "deviceCategory", + "stringFilter": { + "value": "(other)", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "deviceCategory", + "stringFilter": { + "value": "null", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "deviceCategory", + "stringFilter": { + "value": "", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "deviceCategory", + "stringFilter": { + "value": "(not set)", + "caseSensitive": false + } + } + } + } + ] + } + }, + "dateRanges": [ + { + "startDate": "90daysAgo", + "endDate": "yesterday" } ], "orderBys": [ { "dimension": { - "dimensionName": "date" + "dimensionName": "month" + }, + "desc": true + }, + { + "metric": { + "metricName": "totalUsers" }, "desc": true } ] }, + "limit": "100000", "meta": { - "name": "Device Model", - "description": "90 days of visits by Device Model for all sites." + "name": "Devices - 90 days", + "description": "90 days of desktop/mobile/tablet demographics by user for all sites." } }, { - "name": "os", + "name": "device-model", "frequency": "daily", "slim": true, - "sumVisitsByColumns": [ - "os" + "sumUsersByColumns": [ + "mobile_device" ], "query": { "dimensions": [ { - "name": "date" + "name": "month" }, { - "name": "operatingSystem" + "name": "mobileDeviceModel" } ], "metrics": [ { - "name": "sessions" + "name": "totalUsers" } ], + "dimensionFilter": { + "andGroup": { + "expressions": [ + { + "notExpression": { + "filter": { + "fieldName": "mobileDeviceModel", + "stringFilter": { + "value": "(other)", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "mobileDeviceModel", + "stringFilter": { + "value": "null", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "mobileDeviceModel", + "stringFilter": { + "value": "", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "mobileDeviceModel", + "stringFilter": { + "value": "(not set)", + "caseSensitive": false + } + } + } + } + ] + } + }, "dateRanges": [ { - "startDate": "30daysAgo", + "startDate": "90daysAgo", "endDate": "yesterday" } ], "orderBys": [ { "dimension": { - "dimensionName": "date" + "dimensionName": "month" + }, + "desc": true + }, + { + "metric": { + "metricName": "totalUsers" }, "desc": true } ] }, + "limit": "100000", "meta": { - "name": "Operating Systems", - "description": "30 days of visits, broken down by operating system and date, for all sites." + "name": "Device Model", + "description": "90 days of mobile device model demographics by user for all sites." } }, { - "name": "os-90-days", + "name": "os", "frequency": "daily", "slim": true, - "sumVisitsByColumns": [ + "sumUsersByColumns": [ "os" ], "query": { "dimensions": [ { - "name": "date" + "name": "month" }, { "name": "operatingSystem" @@ -389,63 +670,204 @@ ], "metrics": [ { - "name": "sessions" + "name": "totalUsers" } ], + "dimensionFilter": { + "andGroup": { + "expressions": [ + { + "notExpression": { + "filter": { + "fieldName": "operatingSystem", + "stringFilter": { + "value": "(other)", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "operatingSystem", + "stringFilter": { + "value": "null", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "operatingSystem", + "stringFilter": { + "value": "", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "operatingSystem", + "stringFilter": { + "value": "(not set)", + "caseSensitive": false + } + } + } + } + ] + } + }, "dateRanges": [ { - "startDate": "90daysAgo", + "startDate": "30daysAgo", "endDate": "yesterday" } ], "orderBys": [ { "dimension": { - "dimensionName": "date" + "dimensionName": "month" + }, + "desc": true + }, + { + "metric": { + "metricName": "totalUsers" }, "desc": true } ] }, + "limit": "100000", "meta": { - "name": "Operating Systems - 90 Days", - "description": "90 days of visits, broken down by operating system and date, for all sites." + "name": "Operating Systems", + "description": "30 days of operating system demographics by user for all sites." } }, { - "name": "windows", + "name": "os-90-days", "frequency": "daily", "slim": true, - "sumVisitsByColumns": [ - "os_version" + "sumUsersByColumns": [ + "os" ], "query": { "dimensions": [ { - "name": "date" + "name": "month" }, { - "name": "operatingSystemVersion" + "name": "operatingSystem" } ], "metrics": [ { - "name": "sessions" + "name": "totalUsers" } ], + "dimensionFilter": { + "andGroup": { + "expressions": [ + { + "notExpression": { + "filter": { + "fieldName": "operatingSystem", + "stringFilter": { + "value": "(other)", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "operatingSystem", + "stringFilter": { + "value": "null", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "operatingSystem", + "stringFilter": { + "value": "", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "operatingSystem", + "stringFilter": { + "value": "(not set)", + "caseSensitive": false + } + } + } + } + ] + } + }, "dateRanges": [ { - "startDate": "30daysAgo", + "startDate": "90daysAgo", "endDate": "yesterday" } ], "orderBys": [ + { + "dimension": { + "dimensionName": "month" + }, + "desc": true + }, { "metric": { - "metricName": "sessions" + "metricName": "totalUsers" }, "desc": true } + ] + }, + "limit": "100000", + "meta": { + "name": "Operating Systems - 90 Days", + "description": "90 days of operating system demographics by user for all sites." + } + }, + { + "name": "windows", + "frequency": "daily", + "slim": true, + "sumUsersByColumns": [ + "os_version" + ], + "query": { + "dimensions": [ + { + "name": "month" + }, + { + "name": "operatingSystemVersion" + } + ], + "metrics": [ + { + "name": "totalUsers" + } ], "dimensionFilter": { "filter": { @@ -454,24 +876,45 @@ "value": "Windows" } } - } + }, + "dateRanges": [ + { + "startDate": "30daysAgo", + "endDate": "yesterday" + } + ], + "orderBys": [ + { + "dimension": { + "dimensionName": "month" + }, + "desc": true + }, + { + "metric": { + "metricName": "totalUsers" + }, + "desc": true + } + ] }, + "limit": "100000", "meta": { "name": "Windows", - "description": "30 days of visits from Windows users, broken down by operating system version and date, for all sites." + "description": "30 days of Windows users, broken down by operating system version and date, for all sites." } }, { "name": "windows-90-days", "frequency": "daily", "slim": true, - "sumVisitsByColumns": [ + "sumUsersByColumns": [ "os_version" ], "query": { "dimensions": [ { - "name": "date" + "name": "month" }, { "name": "operatingSystemVersion" @@ -479,9 +922,67 @@ ], "metrics": [ { - "name": "sessions" + "name": "totalUsers" } ], + "dimensionFilter": { + "andGroup": { + "expressions": [ + { + "filter": { + "fieldName": "operatingSystem", + "stringFilter": { + "value": "Windows" + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "operatingSystemVersion", + "stringFilter": { + "value": "(other)", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "operatingSystemVersion", + "stringFilter": { + "value": "null", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "operatingSystemVersion", + "stringFilter": { + "value": "", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "operatingSystemVersion", + "stringFilter": { + "value": "(not set)", + "caseSensitive": false + } + } + } + } + ] + } + }, "dateRanges": [ { "startDate": "90daysAgo", @@ -489,38 +990,37 @@ } ], "orderBys": [ + { + "dimension": { + "dimensionName": "month" + }, + "desc": true + }, { "metric": { - "metricName": "sessions" + "metricName": "totalUsers" }, "desc": true } - ], - "dimensionFilter": { - "filter": { - "fieldName": "operatingSystem", - "stringFilter": { - "value": "Windows" - } - } - } + ] }, + "limit": "100000", "meta": { "name": "Windows - 90 days", - "description": "90 days of visits from Windows users, broken down by operating system version and date, for all sites." + "description": "90 days of Windows users, broken down by operating system version and date, for all sites." } }, { "name": "browsers", "frequency": "daily", "slim": true, - "sumVisitsByColumns": [ + "sumUsersByColumns": [ "browser" ], "query": { "dimensions": [ { - "name": "date" + "name": "month" }, { "name": "browser" @@ -528,9 +1028,59 @@ ], "metrics": [ { - "name": "sessions" + "name": "totalUsers" } ], + "dimensionFilter": { + "andGroup": { + "expressions": [ + { + "notExpression": { + "filter": { + "fieldName": "browser", + "stringFilter": { + "value": "(other)", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "browser", + "stringFilter": { + "value": "null", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "browser", + "stringFilter": { + "value": "", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "browser", + "stringFilter": { + "value": "(not set)", + "caseSensitive": false + } + } + } + } + ] + } + }, "dateRanges": [ { "startDate": "30daysAgo", @@ -540,34 +1090,35 @@ "orderBys": [ { "dimension": { - "dimensionName": "date" + "dimensionName": "month" }, "desc": true }, { "metric": { - "metricName": "sessions" + "metricName": "totalUsers" }, "desc": true } ] }, + "limit": "100000", "meta": { "name": "Browsers", - "description": "30 days of visits broken down by browser for all sites." + "description": "30 days of browser demographics by user for all sites." } }, { "name": "browsers-90-days", "frequency": "daily", "slim": true, - "sumVisitsByColumns": [ + "sumUsersByColumns": [ "browser" ], "query": { "dimensions": [ { - "name": "date" + "name": "month" }, { "name": "browser" @@ -575,9 +1126,59 @@ ], "metrics": [ { - "name": "sessions" + "name": "totalUsers" } ], + "dimensionFilter": { + "andGroup": { + "expressions": [ + { + "notExpression": { + "filter": { + "fieldName": "browser", + "stringFilter": { + "value": "(other)", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "browser", + "stringFilter": { + "value": "null", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "browser", + "stringFilter": { + "value": "", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "browser", + "stringFilter": { + "value": "(not set)", + "caseSensitive": false + } + } + } + } + ] + } + }, "dateRanges": [ { "startDate": "90daysAgo", @@ -587,21 +1188,22 @@ "orderBys": [ { "dimension": { - "dimensionName": "date" + "dimensionName": "month" }, "desc": true }, { "metric": { - "metricName": "sessions" + "metricName": "totalUsers" }, "desc": true } ] }, + "limit": "100000", "meta": { "name": "Browsers - 90 days", - "description": "90 days of visits broken down by browser for all sites." + "description": "90 days of browser demographics by user for all sites." } }, { @@ -611,99 +1213,449 @@ "query": { "dimensions": [ { - "name": "date" + "name": "month" + }, + { + "name": "browser" + }, + { + "name": "operatingSystem" + } + ], + "metrics": [ + { + "name": "totalUsers" + } + ], + "dimensionFilter": { + "andGroup": { + "expressions": [ + { + "notExpression": { + "filter": { + "fieldName": "browser", + "stringFilter": { + "value": "(other)", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "browser", + "stringFilter": { + "value": "null", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "browser", + "stringFilter": { + "value": "", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "browser", + "stringFilter": { + "value": "(not set)", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "operatingSystem", + "stringFilter": { + "value": "(other)", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "operatingSystem", + "stringFilter": { + "value": "null", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "operatingSystem", + "stringFilter": { + "value": "", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "operatingSystem", + "stringFilter": { + "value": "(not set)", + "caseSensitive": false + } + } + } + } + ] + } + }, + "dateRanges": [ + { + "startDate": "90daysAgo", + "endDate": "yesterday" + } + ], + "orderBys": [ + { + "dimension": { + "dimensionName": "month" + }, + "desc": true + }, + { + "metric": { + "metricName": "totalUsers" + }, + "desc": true + } + ] + }, + "limit": "100000", + "meta": { + "name": "OS-browser combinations", + "description": "90 days of browser and OS demographics by user for all sites." + } + }, + { + "name": "windows-browsers", + "frequency": "daily", + "slim": true, + "query": { + "dimensions": [ + { + "name": "month" }, { "name": "browser" }, { - "name": "operatingSystem" + "name": "operatingSystemVersion" + } + ], + "metrics": [ + { + "name": "totalUsers" + } + ], + "dimensionFilter": { + "andGroup": { + "expressions": [ + { + "notExpression": { + "filter": { + "fieldName": "browser", + "stringFilter": { + "value": "(other)", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "browser", + "stringFilter": { + "value": "null", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "browser", + "stringFilter": { + "value": "", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "browser", + "stringFilter": { + "value": "(not set)", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "operatingSystemVersion", + "stringFilter": { + "value": "(other)", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "operatingSystemVersion", + "stringFilter": { + "value": "null", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "operatingSystemVersion", + "stringFilter": { + "value": "", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "operatingSystemVersion", + "stringFilter": { + "value": "(not set)", + "caseSensitive": false + } + } + } + }, + { + "filter": { + "fieldName": "operatingSystem", + "stringFilter": { + "value": "Windows" + } + } + } + ] + } + }, + "dateRanges": [ + { + "startDate": "90daysAgo", + "endDate": "yesterday" + } + ], + "orderBys": [ + { + "dimension": { + "dimensionName": "month" + }, + "desc": true + }, + { + "metric": { + "metricName": "totalUsers" + }, + "desc": true + } + ] + }, + "limit": "100000", + "meta": { + "name": "Windows-browser combinations", + "description": "90 days of Windows versions and browser demographics by user for all sites." + } + }, + { + "name": "top-cities-realtime", + "frequency": "realtime", + "realtime": true, + "query": { + "dimensions": [ + { + "name": "city" } ], "metrics": [ { - "name": "sessions" + "name": "activeUsers" } ], - "dateRanges": [ - { - "startDate": "90daysAgo", - "endDate": "yesterday" + "dimensionFilter": { + "andGroup": { + "expressions": [ + { + "notExpression": { + "filter": { + "fieldName": "city", + "stringFilter": { + "value": "(other)", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "city", + "stringFilter": { + "value": "null", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "city", + "stringFilter": { + "value": "", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "city", + "stringFilter": { + "value": "(not set)", + "caseSensitive": false + } + } + } + } + ] } - ], + }, "orderBys": [ - { - "dimension": { - "dimensionName": "date" - }, - "desc": true - }, { "metric": { - "metricName": "sessions" + "metricName": "activeUsers" }, "desc": true } ] }, + "limit": "100000", "meta": { - "name": "OS-browser combinations", - "description": "90 days of visits broken down by browser and OS for all sites." + "name": "Top Cities (Live)", + "description": "Top cities for active onsite users." } }, { - "name": "windows-browsers", - "frequency": "daily", - "slim": true, + "name": "top-countries-realtime", + "frequency": "realtime", + "realtime": true, "query": { "dimensions": [ { - "name": "date" - }, - { - "name": "browser" - }, - { - "name": "operatingSystemVersion" + "name": "country" } ], "metrics": [ { - "name": "sessions" + "name": "activeUsers" } ], - "dateRanges": [ - { - "startDate": "90daysAgo", - "endDate": "yesterday" + "dimensionFilter": { + "andGroup": { + "expressions": [ + { + "notExpression": { + "filter": { + "fieldName": "country", + "stringFilter": { + "value": "(other)", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "country", + "stringFilter": { + "value": "null", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "country", + "stringFilter": { + "value": "", + "caseSensitive": false + } + } + } + }, + { + "notExpression": { + "filter": { + "fieldName": "country", + "stringFilter": { + "value": "(not set)", + "caseSensitive": false + } + } + } + } + ] } - ], + }, "orderBys": [ - { - "dimension": { - "dimensionName": "date" - }, - "desc": true - }, { "metric": { - "metricName": "sessions" + "metricName": "activeUsers" }, "desc": true } - ], - "dimensionFilter": { - "filter": { - "fieldName": "operatingSystem", - "stringFilter": { - "value": "Windows" - } - } - } + ] }, + "limit": "100000", "meta": { - "name": "Windows-browser combinations", - "description": "90 days of visits broken down by Windows versions and browser for all sites." + "name": "Top Countries (Live)", + "description": "Top countries for active onsite users." } }, { @@ -1784,103 +2736,6 @@ "description": "Count of total users with file download events in the last 30 days." } }, - { - "name": "top-cities-realtime", - "frequency": "realtime", - "realtime": true, - "query": { - "dimensions": [ - { - "name": "city" - } - ], - "metrics": [ - { - "name": "activeUsers" - } - ], - "orderBys": [ - { - "metric": { - "metricName": "activeUsers" - }, - "desc": true - } - ], - "dimensionFilter": { - "andGroup": { - "expressions": [ - { - "notExpression": { - "filter": { - "fieldName": "city", - "stringFilter": { - "value": "(other)", - "caseSensitive": false - } - } - } - }, - { - "notExpression": { - "filter": { - "fieldName": "city", - "stringFilter": { - "value": "null", - "caseSensitive": false - } - } - } - }, - { - "notExpression": { - "filter": { - "fieldName": "city", - "stringFilter": { - "value": "", - "caseSensitive": false - } - } - } - } - ] - } - } - }, - "meta": { - "name": "Top Cities (Live)", - "description": "Top cities for active onsite users." - } - }, - { - "name": "top-countries-realtime", - "frequency": "realtime", - "realtime": true, - "query": { - "dimensions": [ - { - "name": "country" - } - ], - "metrics": [ - { - "name": "activeUsers" - } - ], - "orderBys": [ - { - "metric": { - "metricName": "activeUsers" - }, - "desc": true - } - ] - }, - "meta": { - "name": "Top Countries", - "description": "Top countries for active onsite users." - } - }, { "name": "all-pages-realtime", "frequency": "realtime",