From 73bbe13108f4d83b7d58fcf47ad60c0344269ae1 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 23 Mar 2017 16:27:04 +0200 Subject: [PATCH] -Analytics in process --- backend/views/site/analytic.php | 10 +++++++--- composer.lock | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 94 insertions(+), 5 deletions(-) diff --git a/backend/views/site/analytic.php b/backend/views/site/analytic.php index 68a31e0..bf32e38 100644 --- a/backend/views/site/analytic.php +++ b/backend/views/site/analytic.php @@ -15,13 +15,17 @@ $dateRange->setEndDate("today"); $sessions = new Google_Service_AnalyticsReporting_Metric(); - $sessions->setExpression('ga:users'); - $sessions->setAlias('Пользователи'); + $sessions->setExpression('ga:sessions'); + $sessions->setAlias('Сеансы'); + + $dimensions = new Google_Service_AnalyticsReporting_Dimension(); + $dimensions->setName('ga:date'); $request = new Google_Service_AnalyticsReporting_ReportRequest(); $request->setViewId($profile_id); $request->setDateRanges($dateRange); - $request->setMetrics([ $sessions ]); + $request->setMetrics($sessions); + $request->setDimensions($dimensions); $body = new Google_Service_AnalyticsReporting_GetReportsRequest(); $body->setReportRequests([ $request ]); diff --git a/composer.lock b/composer.lock index 72b28b7..90902d8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,10 +4,72 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "7024a3493d0dd61f5018018e8987f846", - "content-hash": "f3f1ac35100ae05210344f07161221a4", + "hash": "aa326c5f3fbc6bf643995c57820a41a5", + "content-hash": "3827d959ce5cb915b9885f6c8387da17", "packages": [ { + "name": "2amigos/yii2-highcharts-widget", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/2amigos/yii2-highcharts-widget.git", + "reference": "e820aa981335d0c7269706ad6cb2d0ae81da495b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/2amigos/yii2-highcharts-widget/zipball/e820aa981335d0c7269706ad6cb2d0ae81da495b", + "reference": "e820aa981335d0c7269706ad6cb2d0ae81da495b", + "shasum": "" + }, + "require": { + "bower-asset/highcharts-release": "4.1.4", + "yiisoft/yii2": "*" + }, + "require-dev": { + "phpunit/phpunit": "4.*", + "scrutinizer/ocular": "~1.1" + }, + "type": "yii2-extension", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + }, + "asset-installer-paths": { + "bower-asset-library": "vendor/bower" + } + }, + "autoload": { + "psr-4": { + "dosamigos\\highcharts\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "2amigOS! Consulting Group", + "email": "hola@2amigos.us", + "homepage": "http://2amigos.us", + "role": "Developer" + } + ], + "description": "Highcharts JS widget for Yii2.", + "homepage": "http://yiiwheels.com/extension/highcharts-widget", + "keywords": [ + "2amigos", + "chart", + "extension", + "highcharts", + "widget", + "yii", + "yii 2", + "yii2" + ], + "time": "2015-03-16 21:55:20" + }, + { "name": "2amigos/yii2-tinymce-widget", "version": "1.1.1", "source": { @@ -211,6 +273,29 @@ ] }, { + "name": "bower-asset/highcharts-release", + "version": "v4.1.4", + "source": { + "type": "git", + "url": "https://github.com/highcharts/highcharts-dist.git", + "reference": "8ec04ca0aa02fe7e9584dc24b6902e4338360763" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/highcharts/highcharts-dist/zipball/8ec04ca0aa02fe7e9584dc24b6902e4338360763", + "reference": "8ec04ca0aa02fe7e9584dc24b6902e4338360763", + "shasum": "" + }, + "type": "bower-asset-library", + "extra": { + "bower-asset-main": [ + "highcharts.js", + "highcharts-more.js", + "modules/exporting.js" + ] + } + }, + { "name": "bower-asset/icheck", "version": "1.0.2", "source": { -- libgit2 0.21.4