Commit 050d419e79e5f73cd8149428006bf3e6b7aa0f02

Authored by Alex Savenko
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,7 +19,13 @@ $this->params['breadcrumbs'][] = $this->title;
19 <div> 19 <div>
20 <h1><?= Html::encode($this->title) ?></h1> 20 <h1><?= Html::encode($this->title) ?></h1>
21 <?php 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 // Вызов the Analytics Reporting API V4. 30 // Вызов the Analytics Reporting API V4.
25 $response = getReport($analytics); 31 $response = getReport($analytics);