I am using the YouTube Analytics API to get analytics for specific queries.
For channel queries it works great. Problems occurred, when I execute a query for a specific video..like this (start is defined):
/*****************************
* deviceType-stats
*****************************/
$optparams = array('dimensions' => 'deviceType',
"filters" => "video==" . $videoId,
);
$currentDate = date("Y-m-d", time());
$resDeviceTypes = $youtubeService->analytics->reports->query(
"channel==" . $videoendorsement->ytchannelid
,$startDate
,$currentDate
,"views,estimatedMinutesWatched"
,$optparams);
I don't get any result ROWS for this query, but only for some video Ids. For other video Ids it works. Btw: The videos where I don't get any result ROWS are online since 2 days on YouTube. Do I have to wait a little bit longer since I get a result from API?!
Overall there is additionally a problem to get demography and geography for any video. Doesn't matter which video Id I use, I don't get any result ROWS for demography and geography stats.
Does anybody know where the problem is?