I want to get an overview of my connected user's viewers demographics, including the country where they live. Ideally, I would want to get something like this:
rows: [['France', 22], ['Germany', 30], ['Canada', 48]]
I assume that it's possible because Youtube has that data, since they show it in the Creator Studio.
Here's the query what I first tried:
{
access_token: myAccessToken,
metrics: 'viewerPercentage',
dimensions: 'country',
startDate: '2013-01-01',
endDate: '2019-08-01',
ids: 'channel==MINE'
}
But it returned an error, saying "The query is not supported".
The problem is that they only let us use the country
key as a filter, not as a dimension.
So how can we access get that data?