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