Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

YouTube Analytics API not returning demographic data for channel owner

$
0
0

I am using YouTube Analytics API with oauth2.0 authorization to get channel owner demographic(ageGroup and gender).

It does not return any values for the ageGroup and gender. The login(authentication) part works and GAPI loads perfectly as well, but, no values are returned (even though channel analytics show agegroup and gender).

Surprisingly, when I use the basic dimensions (views, likes, comments etc.), it returns the values properly.

Here is how the response look like:

screenshot

This is the code:

function execute() {             return gapi.client.youtubeAnalytics.reports.query({         "ids": "channel==MINE",         "startDate": "2019-01-01",         "endDate": "2022-03-27",         "metrics": "viewerPercentage",         "dimensions": "ageGroup,gender",           "filters": "subscribedStatus==SUBSCRIBED",         "sort": "ageGroup,gender"              })                      .then(function(response) {                                                     console.log("Response", response);                             },                       function(err) { console.error("Execute error", err); });     }

Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>