From 5776b7c89a38c735e4489457e9528bb79275f34b Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 9 Jan 2017 02:37:13 +0200 Subject: [PATCH] ga --- backend/views/report/index.php | 95 ++++++++++++++++++++++++----------------------------------------------------------------------- 1 file changed, 24 insertions(+), 71 deletions(-) diff --git a/backend/views/report/index.php b/backend/views/report/index.php index b3f968d..d503802 100644 --- a/backend/views/report/index.php +++ b/backend/views/report/index.php @@ -15,82 +15,11 @@ use yii\helpers\Url; $this->title = Yii::t('app', 'Report'); $this->params['breadcrumbs'][] = $this->title; ?> -

title) ?>

-
-
-
- - - 'ga:source,ga:keyword', + 'sort' => '-ga:sessions,ga:source', + 'filters' => 'ga:medium==organic', + 'max-results' => '25'); + + return $service->data_ga->get( + TABLE_ID, + '2010-01-01', + '2010-01-15', + 'ga:sessions', + $optParams); + } + try { + $results = queryCoreReportingApi(); + // Success. Do something cool! + + } catch (apiServiceException $e) { + // Handle API service exceptions. + $error = $e->getMessage(); + } + } else { $redirect_uri = 'http://' . $_SERVER['HTTP_HOST'] . '/admin/report/callback'; header('Location: ' . filter_var($redirect_uri, FILTER_SANITIZE_URL)); @@ -179,3 +131,4 @@ function printResults($reports) { } + -- libgit2 0.21.4