Search code examples
google-analyticsgoogle-apigoogle-analytics-api

Why my query is valid but doesn't show any results?


I used https://ga-dev-tools.appspot.com/query-explorer/ to construct a query in my view. Everything goes fine but when I click on "Run Query" it shows no values. I know that my dimensions age and gender are empty right know but I was expecting to see a column full of "not set" in both dimensions. When I remove them I get the result of my query just fine.

How can I return the five dimensions (age, gender, page, region, city) even if some of them are empty? Eventually, I hope to get data on these dimensions and don't want to change my script later, that's why I need to keep them.


Solution

  • Thresholds are applied to prevent anyone viewing a report from inferring the demographics or interests of individual users. When a report contains Age, Gender, or Interest Category (as a primary or secondary dimension, or as part of an applied segment), a threshold may be applied and some data may be withheld from the report. For example, if there are fewer than N instances of Gender=male in a report, then data for the male value may be withheld.

    https://support.google.com/analytics/answer/2799357?hl=en

    In conclusion, it is not always possible to obtain demographic data with granular detail in Google Analytics reports. This is due to both user privacy issues and the fact that these data, based on a portion of total users, are found in the database of the analysis platform within dedicated tables and with pre-aggregated values.

    Therefore, since the detail attributable to the individual actual sessions is lacking, the result provided may be not statistically significant.

    https://www.analyticstraps.com/i-report-con-i-dati-demografici-non-tornano/