diff --git a/app/library/App/Controllers/GaController.php b/app/library/App/Controllers/GaController.php index 3817298..39e5119 100644 --- a/app/library/App/Controllers/GaController.php +++ b/app/library/App/Controllers/GaController.php @@ -29,8 +29,6 @@ class GaController extends CrudResourceController { $client = new Google_Client(); $client->useApplicationDefaultCredentials(); $client->setScopes(['https://www.googleapis.com/auth/analytics.readonly']); - $api_key = 'AIzaSyBNYr7n7bcHbO-sJ9xuWwS9xQ2OY5aFAiE'; - $client->setDeveloperKey($api_key); $analytics = new Google_Service_AnalyticsReporting($client); $param[] = ['metric' => 'ga:sessions', 'alias' => 'Сессии']; @@ -62,6 +60,7 @@ class GaController extends CrudResourceController { $response = $analytics->reports->batchGet( $body ); } + return $response->toSimpleObject(); return $this->printResults($response); } -- libgit2 0.21.4