Commit dc1bb62ddf0b1fee360d33dd454aec08e2f01084

Authored by Alex Savenko
1 parent 8d4186ce

test google lib

Showing 1 changed file with 1 additions and 19 deletions   Show diff stats
app/library/App/Bootstrap/RouteBootstrap.php
@@ -7,7 +7,6 @@ use App\Constants\Services; @@ -7,7 +7,6 @@ use App\Constants\Services;
7 use Phalcon\Config; 7 use Phalcon\Config;
8 use Phalcon\DiInterface; 8 use Phalcon\DiInterface;
9 use PhalconRest\Api; 9 use PhalconRest\Api;
10 -  
11 use Google_Client; 10 use Google_Client;
12 use Google_Service_AnalyticsReporting; 11 use Google_Service_AnalyticsReporting;
13 12
@@ -53,18 +52,9 @@ class RouteBootstrap implements BootstrapInterface @@ -53,18 +52,9 @@ class RouteBootstrap implements BootstrapInterface
53 $client->setDeveloperKey($api_key); 52 $client->setDeveloperKey($api_key);
54 $analytics = new Google_Service_AnalyticsReporting($client); 53 $analytics = new Google_Service_AnalyticsReporting($client);
55 54
56 - $param[] = ['metric' => 'ga:sessions', 'alias' => 'Сессии'];  
57 - $param[] = ['metric' => 'ga:users', 'alias' => 'Пользователи'];  
58 - $param[] = ['metric' => 'ga:CTR', 'alias' => 'CTR'];  
59 - $param[] = ['metric' => 'ga:goal1Value', 'alias' => 'цель "Корзина"'];  
60 -  
61 - foreach ($param as $item) {  
62 55
63 - $response = $this->getReport($analytics, $item['metric'], $item['alias']);  
64 56
65 - }  
66 -  
67 - $var_2 = var_dump($response); 57 + $var_2 = var_dump($analytics);
68 58
69 $msg = "testing fine"; 59 $msg = "testing fine";
70 60
@@ -74,12 +64,4 @@ class RouteBootstrap implements BootstrapInterface @@ -74,12 +64,4 @@ class RouteBootstrap implements BootstrapInterface
74 ]); 64 ]);
75 }); 65 });
76 } 66 }
77 -  
78 - function getReport($analytics, $metric, $alias) {  
79 -  
80 - // Замена на свой идентификатор представления, напр. XXXX.  
81 - $VIEW_ID = "119240817";  
82 -  
83 - return $VIEW_ID;  
84 - }  
85 } 67 }
86 \ No newline at end of file 68 \ No newline at end of file