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.I am stuck with this issue for last few days, and your help will be greatly appreciated.

Here is how the Response look likehttps://i.stack.imgur.com/OOL4p.png

Please help and save my ass!

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>