Commit a87b0e3d27559c116214ff28a098563fcbdcca2b
1 parent
d6c4c133
ga response
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/library/App/Controllers/GaController.php
| @@ -33,7 +33,7 @@ class GaController extends CrudResourceController { | @@ -33,7 +33,7 @@ class GaController extends CrudResourceController { | ||
| 33 | $client->setScopes(['https://www.googleapis.com/auth/analytics.readonly']); | 33 | $client->setScopes(['https://www.googleapis.com/auth/analytics.readonly']); |
| 34 | $analytics = new Google_Service_AnalyticsReporting($client); | 34 | $analytics = new Google_Service_AnalyticsReporting($client); |
| 35 | 35 | ||
| 36 | - $param[] = ['metric' => $metric]; | 36 | + $param[] = ['metric' => 'ga:'.$metric, 'alias' => 'alias']; |
| 37 | 37 | ||
| 38 | $response = []; | 38 | $response = []; |
| 39 | 39 | ||
| @@ -47,7 +47,7 @@ class GaController extends CrudResourceController { | @@ -47,7 +47,7 @@ class GaController extends CrudResourceController { | ||
| 47 | // Создание объекта Metrics. | 47 | // Создание объекта Metrics. |
| 48 | $sessions = new Google_Service_AnalyticsReporting_Metric(); | 48 | $sessions = new Google_Service_AnalyticsReporting_Metric(); |
| 49 | $sessions->setExpression($item['metric']); | 49 | $sessions->setExpression($item['metric']); |
| 50 | - //$sessions->setAlias($item['alias']); | 50 | + $sessions->setAlias($item['alias']); |
| 51 | 51 | ||
| 52 | 52 | ||
| 53 | // Создание объекта ReportRequest. | 53 | // Создание объекта ReportRequest. |