From b12e40c2fb3f56538fc13a28631e105d1c978b41 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 10 Feb 2017 16:55:15 +0200 Subject: [PATCH] ga response --- app/library/App/Controllers/GaController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/library/App/Controllers/GaController.php b/app/library/App/Controllers/GaController.php index b3f213d..3dafc27 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' => 'ga:'.$getMetric]; + $param[] = ['metric' => 'ga:'.$getMetric, 'alias' => $getMetric]; $response = []; @@ -47,6 +47,7 @@ class GaController extends CrudResourceController { // Создание объекта Metrics. $metrics = new Google_Service_AnalyticsReporting_Metric(); $metrics->setExpression($item['metric']); + $metrics->setExpression('ga:pageviewsPerSession'); //$sessions->setAlias($item['alias']); -- libgit2 0.21.4