Commit 050d419e79e5f73cd8149428006bf3e6b7aa0f02
1 parent
2d10f818
testing
Showing
1 changed file
with
7 additions
and
1 deletions
Show diff stats
backend/views/report/index.php
... | ... | @@ -19,7 +19,13 @@ $this->params['breadcrumbs'][] = $this->title; |
19 | 19 | <div> |
20 | 20 | <h1><?= Html::encode($this->title) ?></h1> |
21 | 21 | <?php |
22 | - $analytics = new Google_Service_AnalyticsReporting(\Yii::$app->googleApi->client); | |
22 | + | |
23 | + $client = new Google_Client(); | |
24 | + //$client->setAuthConfig(__DIR__ . '/client_secrets.json'); | |
25 | + $client->addScope(Google_Service_Analytics::ANALYTICS_READONLY); | |
26 | + | |
27 | + $analytics = new Google_Service_AnalyticsReporting($client); | |
28 | + //$analytics = new Google_Service_AnalyticsReporting(\Yii::$app->googleApi->client); | |
23 | 29 | |
24 | 30 | // Вызов the Analytics Reporting API V4. |
25 | 31 | $response = getReport($analytics); | ... | ... |