$this->client = new Google_Client();
$this->client->setAuthConfig($credentials);
$this->client->addScope(Google_Service_YouTube::YOUTUBE);
$this->client->addScope(Google_Service_YouTubeAnalytics::YT_ANALYTICS_MONETARY_READONLY);
$this->client->setAccessType('offline');
$this->client->setIncludeGrantedScopes(true);
$service = new \Google_Service_YouTubeAnalytics($this->client);
$report = $service->reports->query('channel==' . $channelId, '2020-01-11', '2020-01-13',
'views,likes,dislikes', ['dimensions' => 'day']);