From 92c9fb64f18b04a97505630c866baff7f70d91f9 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 10 Jan 2017 01:30:32 +0200 Subject: [PATCH] ga --- backend/views/report/index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/views/report/index.php b/backend/views/report/index.php index 3dc5fb6..ae646f4 100644 --- a/backend/views/report/index.php +++ b/backend/views/report/index.php @@ -60,7 +60,7 @@ if (isset($_SESSION['access_token']) && $_SESSION['access_token']) { } -function getReport($analytics, $metric) { +function getReport($analytics, $metric, $alias) { // Замена на свой идентификатор представления, напр. XXXX. $VIEW_ID = "119240817"; @@ -73,7 +73,7 @@ function getReport($analytics, $metric) { // Создание объекта Metrics. $sessions = new Google_Service_AnalyticsReporting_Metric(); $sessions->setExpression($metric); - $sessions->setAlias($metric); + $sessions->setAlias($alias); // Создание объекта ReportRequest. @@ -106,10 +106,10 @@ function printResults($reports) { for ($j = 0; $j < count( $metricHeaders ) && $j < count( $metrics ); $j++) { $entry = $metricHeaders[$j]; $values = $metrics[$j]; - print("Metric type: " . $entry->getType() . "\n" ); + //print("Metric type: " . $entry->getType() . "\n" ); for ( $valueIndex = 0; $valueIndex < count( $values->getValues() ); $valueIndex++ ) { $value = $values->getValues()[ $valueIndex ]; - print($entry->getName() . ": " . $value . "\n"); + print($entry->getName() . ": " . $value . "\r\n"); } } } -- libgit2 0.21.4