0
votes

quick question here : I am using Google Analytics reporting API v4 to perform some extractions from GA data, all working as desired except for one set of Audience data.

Basically I'm querying Audience data with the following dimensions and metrics(also as described here : https://developers.google.com/analytics/devguides/reporting/core/dimsmets#view=detail&group=audience) :

Metrics :
    ga:visits

Dimensions :
    ga:dateHourMinute
    ga:dataSource
    ga:userAgeBracket
    ga:userGender
    ga:interestInMarketCategory

If I send a request with this combination, data is returned normally. However, if I add one more dimension of interest such ga:city , the API doesn't throws any errors, but also does not return any data.

Weird thing is that for other combination of dimensions/metrics with ga:city simply works correctly.

Any ideas on why it is not returning data, perhaps, how to make this work would be greatly appreciated since I'm stuck with this for some days :-|

Thanks in advance everyone !

2
Can you share with us the request you built?Rcordoval

2 Answers

1
votes

According to docs ga:visits in API V4 is deprecated, use ga:sessions instead.

Try with this combination:

metrics:

ga:sessions

Dimensions

ga:dateHourMinute
ga:dataSource
ga:userAgeBracket
ga:userGender
ga:interestInMarketCategory
ga:city
0
votes

For privacy reasons, and maybe because they do not want yout to be able to extract data to another system, Google does not allow that you narrow down data too accurately.

They do not want you to be able to guess private data (interests, gender, age bracket...) from a specific user.