From a87b0e3d27559c116214ff28a098563fcbdcca2b Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 10 Feb 2017 16:36:54 +0200 Subject: [PATCH] ga response --- app/library/App/Controllers/GaController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/library/App/Controllers/GaController.php b/app/library/App/Controllers/GaController.php index d34985a..3032e9f 100644 --- a/app/library/App/Controllers/GaController.php +++ b/app/library/App/Controllers/GaController.php @@ -33,7 +33,7 @@ class GaController extends CrudResourceController { $client->setScopes(['https://www.googleapis.com/auth/analytics.readonly']); $analytics = new Google_Service_AnalyticsReporting($client); - $param[] = ['metric' => $metric]; + $param[] = ['metric' => 'ga:'.$metric, 'alias' => 'alias']; $response = []; @@ -47,7 +47,7 @@ class GaController extends CrudResourceController { // Создание объекта Metrics. $sessions = new Google_Service_AnalyticsReporting_Metric(); $sessions->setExpression($item['metric']); - //$sessions->setAlias($item['alias']); + $sessions->setAlias($item['alias']); // Создание объекта ReportRequest. -- libgit2 0.21.4