Commit 73bbe13108f4d83b7d58fcf47ad60c0344269ae1

Authored by Alexey Boroda
1 parent 0bdfedea

-Analytics in process

Showing 2 changed files with 94 additions and 5 deletions   Show diff stats
backend/views/site/analytic.php
... ... @@ -15,13 +15,17 @@
15 15 $dateRange->setEndDate("today");
16 16  
17 17 $sessions = new Google_Service_AnalyticsReporting_Metric();
18   - $sessions->setExpression('ga:users');
19   - $sessions->setAlias('Пользователи');
  18 + $sessions->setExpression('ga:sessions');
  19 + $sessions->setAlias('Сеансы');
  20 +
  21 + $dimensions = new Google_Service_AnalyticsReporting_Dimension();
  22 + $dimensions->setName('ga:date');
20 23  
21 24 $request = new Google_Service_AnalyticsReporting_ReportRequest();
22 25 $request->setViewId($profile_id);
23 26 $request->setDateRanges($dateRange);
24   - $request->setMetrics([ $sessions ]);
  27 + $request->setMetrics($sessions);
  28 + $request->setDimensions($dimensions);
25 29  
26 30 $body = new Google_Service_AnalyticsReporting_GetReportsRequest();
27 31 $body->setReportRequests([ $request ]);
... ...
composer.lock
... ... @@ -4,10 +4,72 @@
4 4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5 5 "This file is @generated automatically"
6 6 ],
7   - "hash": "7024a3493d0dd61f5018018e8987f846",
8   - "content-hash": "f3f1ac35100ae05210344f07161221a4",
  7 + "hash": "aa326c5f3fbc6bf643995c57820a41a5",
  8 + "content-hash": "3827d959ce5cb915b9885f6c8387da17",
9 9 "packages": [
10 10 {
  11 + "name": "2amigos/yii2-highcharts-widget",
  12 + "version": "1.0.1",
  13 + "source": {
  14 + "type": "git",
  15 + "url": "https://github.com/2amigos/yii2-highcharts-widget.git",
  16 + "reference": "e820aa981335d0c7269706ad6cb2d0ae81da495b"
  17 + },
  18 + "dist": {
  19 + "type": "zip",
  20 + "url": "https://api.github.com/repos/2amigos/yii2-highcharts-widget/zipball/e820aa981335d0c7269706ad6cb2d0ae81da495b",
  21 + "reference": "e820aa981335d0c7269706ad6cb2d0ae81da495b",
  22 + "shasum": ""
  23 + },
  24 + "require": {
  25 + "bower-asset/highcharts-release": "4.1.4",
  26 + "yiisoft/yii2": "*"
  27 + },
  28 + "require-dev": {
  29 + "phpunit/phpunit": "4.*",
  30 + "scrutinizer/ocular": "~1.1"
  31 + },
  32 + "type": "yii2-extension",
  33 + "extra": {
  34 + "branch-alias": {
  35 + "dev-master": "1.0-dev"
  36 + },
  37 + "asset-installer-paths": {
  38 + "bower-asset-library": "vendor/bower"
  39 + }
  40 + },
  41 + "autoload": {
  42 + "psr-4": {
  43 + "dosamigos\\highcharts\\": "src"
  44 + }
  45 + },
  46 + "notification-url": "https://packagist.org/downloads/",
  47 + "license": [
  48 + "BSD-3-Clause"
  49 + ],
  50 + "authors": [
  51 + {
  52 + "name": "2amigOS! Consulting Group",
  53 + "email": "hola@2amigos.us",
  54 + "homepage": "http://2amigos.us",
  55 + "role": "Developer"
  56 + }
  57 + ],
  58 + "description": "Highcharts JS widget for Yii2.",
  59 + "homepage": "http://yiiwheels.com/extension/highcharts-widget",
  60 + "keywords": [
  61 + "2amigos",
  62 + "chart",
  63 + "extension",
  64 + "highcharts",
  65 + "widget",
  66 + "yii",
  67 + "yii 2",
  68 + "yii2"
  69 + ],
  70 + "time": "2015-03-16 21:55:20"
  71 + },
  72 + {
11 73 "name": "2amigos/yii2-tinymce-widget",
12 74 "version": "1.1.1",
13 75 "source": {
... ... @@ -211,6 +273,29 @@
211 273 ]
212 274 },
213 275 {
  276 + "name": "bower-asset/highcharts-release",
  277 + "version": "v4.1.4",
  278 + "source": {
  279 + "type": "git",
  280 + "url": "https://github.com/highcharts/highcharts-dist.git",
  281 + "reference": "8ec04ca0aa02fe7e9584dc24b6902e4338360763"
  282 + },
  283 + "dist": {
  284 + "type": "zip",
  285 + "url": "https://api.github.com/repos/highcharts/highcharts-dist/zipball/8ec04ca0aa02fe7e9584dc24b6902e4338360763",
  286 + "reference": "8ec04ca0aa02fe7e9584dc24b6902e4338360763",
  287 + "shasum": ""
  288 + },
  289 + "type": "bower-asset-library",
  290 + "extra": {
  291 + "bower-asset-main": [
  292 + "highcharts.js",
  293 + "highcharts-more.js",
  294 + "modules/exporting.js"
  295 + ]
  296 + }
  297 + },
  298 + {
214 299 "name": "bower-asset/icheck",
215 300 "version": "1.0.2",
216 301 "source": {
... ...