0

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?

remidej
  • 1,428
  • 1
  • 14
  • 21

1 Answers1

0

You actually can have country as a dimension, but not in combination with the viewerPercentage metric.

You can find the list of available metrics for the country dimension here: https://developers.google.com/youtube/analytics/channel_reports#geographic-reports

The viewerPercentage metric is only associated with the ageGroup and gender dimensions.

If you need the percentage of viewers by country and not just the numbers of viewers, I guess the only way is to sum up all the views and calculate the percentage for each country in your program.

Tara Delari
  • 186
  • 1
  • 4