From 5b3bd67f6c4d252f1ec2f1add20067b3f3e28dee 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 | 1479 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 1167 insertions(+), 312 deletions(-) diff --git a/reports/usa.json b/reports/usa.json index ab17fb6..5e9e636 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,13 +94,20 @@ } }, "orderBys": [ + { + "dimension": { + "dimensionName": "month" + }, + "desc": true + }, { "metric": { "metricName": "totalUsers" }, "desc": true } - ] + ], + "limit": "100000" }, "meta": { "name": "Screen Resolution", @@ -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,13 +192,20 @@ } }, "orderBys": [ + { + "dimension": { + "dimensionName": "month" + }, + "desc": true + }, { "metric": { "metricName": "totalUsers" }, "desc": true } - ] + ], + "limit": "100000" }, "meta": { "name": "Screen Resolution", @@ -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,28 +438,35 @@ "orderBys": [ { "dimension": { - "dimensionName": "date" + "dimensionName": "month" + }, + "desc": true + }, + { + "metric": { + "metricName": "totalUsers" }, "desc": true } - ] + ], + "limit": "100000" }, "meta": { "name": "Devices", - "description": "30 days of desktop/mobile/tablet visits for all sites." + "description": "30 days of desktop/mobile/tablet demographics by user for all sites." } }, { "name": "devices-90-days", "frequency": "daily", "slim": true, - "sumVisitsByColumns": [ + "sumUsersByColumns": [ "device" ], "query": { "dimensions": [ { - "name": "date" + "name": "month" }, { "name": "deviceCategory" @@ -266,50 +474,59 @@ ], "metrics": [ { - "name": "sessions" - } - ], - "dateRanges": [ - { - "startDate": "90daysAgo", - "endDate": "yesterday" + "name": "totalUsers" } ], - "orderBys": [ - { - "dimension": { - "dimensionName": "date" - }, - "desc": true - } - ] - }, - "meta": { - "name": "Devices - 90 days", - "description": "90 days of desktop/mobile/tablet visits for all sites." - } - }, - { - "name": "device-model", - "frequency": "daily", - "slim": true, - "sumVisitsByColumns": [ - "mobile_device" - ], - "query": { - "dimensions": [ - { - "name": "date" - }, - { - "name": "mobileDeviceModel" - } - ], - "metrics": [ - { - "name": "sessions" + "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", @@ -319,69 +536,133 @@ "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,113 +670,205 @@ ], "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 - } - ] - }, - "meta": { - "name": "Operating Systems - 90 Days", - "description": "90 days of visits, broken down by operating system and date, for all sites." - } - }, - { - "name": "windows", - "frequency": "daily", - "slim": true, - "sumVisitsByColumns": [ - "os_version" - ], - "query": { - "dimensions": [ - { - "name": "date" }, - { - "name": "operatingSystemVersion" - } - ], - "metrics": [ - { - "name": "sessions" - } - ], - "dateRanges": [ - { - "startDate": "30daysAgo", - "endDate": "yesterday" - } - ], - "orderBys": [ { "metric": { - "metricName": "sessions" + "metricName": "totalUsers" }, "desc": true } ], - "dimensionFilter": { - "filter": { - "fieldName": "operatingSystem", - "stringFilter": { - "value": "Windows" - } - } - } + "limit": "100000" }, "meta": { - "name": "Windows", - "description": "30 days of visits from Windows users, broken down by operating system version and date, for all sites." + "name": "Operating Systems", + "description": "30 days of operating system demographics by user for all sites." } }, { - "name": "windows-90-days", + "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" } ], - "dateRanges": [ - { - "startDate": "90daysAgo", - "endDate": "yesterday" - } + "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", + "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": { "fieldName": "operatingSystem", @@ -503,71 +876,151 @@ "value": "Windows" } } - } + }, + "dateRanges": [ + { + "startDate": "30daysAgo", + "endDate": "yesterday" + } + ], + "orderBys": [ + { + "dimension": { + "dimensionName": "month" + }, + "desc": true + }, + { + "metric": { + "metricName": "totalUsers" + }, + "desc": true + } + ], + "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." + "name": "Windows", + "description": "30 days of Windows users, broken down by operating system version and date, for all sites." } }, { - "name": "browsers", + "name": "windows-90-days", "frequency": "daily", "slim": true, - "sumVisitsByColumns": [ - "browser" + "sumUsersByColumns": [ + "os_version" ], "query": { "dimensions": [ { - "name": "date" + "name": "month" }, { - "name": "browser" + "name": "operatingSystemVersion" } ], "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": "30daysAgo", + "startDate": "90daysAgo", "endDate": "yesterday" } ], "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." + "name": "Windows - 90 days", + "description": "90 days of Windows users, broken down by operating system version and date, for all sites." } }, { - "name": "browsers-90-days", + "name": "browsers", "frequency": "daily", "slim": true, - "sumVisitsByColumns": [ + "sumUsersByColumns": [ "browser" ], "query": { "dimensions": [ { - "name": "date" + "name": "month" }, { "name": "browser" @@ -575,135 +1028,634 @@ ], "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", + "startDate": "30daysAgo", "endDate": "yesterday" } ], "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." + "name": "Browsers", + "description": "30 days of browser demographics by user for all sites." } }, { - "name": "os-browsers", + "name": "browsers-90-days", "frequency": "daily", "slim": true, + "sumUsersByColumns": [ + "browser" + ], "query": { "dimensions": [ { - "name": "date" + "name": "month" }, { "name": "browser" - }, + } + ], + "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 + } + } + } + } + ] + } + }, + "dateRanges": [ + { + "startDate": "90daysAgo", + "endDate": "yesterday" + } + ], + "orderBys": [ + { + "dimension": { + "dimensionName": "month" + }, + "desc": true + }, + { + "metric": { + "metricName": "totalUsers" + }, + "desc": true + } + ], + "limit": "100000" + }, + "meta": { + "name": "Browsers - 90 days", + "description": "90 days of browser demographics by user for all sites." + } + }, + { + "name": "os-browsers", + "frequency": "daily", + "slim": true, + "query": { + "dimensions": [ + { + "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": "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": "operatingSystem" + "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",