Commit 8c1ac2ba952d83ef5e290a11f64ec82aeb75d96f
1 parent
95c83ce2
ga output
Showing
1 changed file
with
10 additions
and
26 deletions
Show diff stats
app/library/App/Resources/GaResource.php
@@ -31,37 +31,21 @@ class GaResource extends ApiResource { | @@ -31,37 +31,21 @@ class GaResource extends ApiResource { | ||
31 | ->allow(AclRoles::USER) | 31 | ->allow(AclRoles::USER) |
32 | ->description('Returns data from Google Analytics Api. https://developers.google.com/analytics/devguides/reporting/core/dimsmets') | 32 | ->description('Returns data from Google Analytics Api. https://developers.google.com/analytics/devguides/reporting/core/dimsmets') |
33 | ->exampleResponse([ | 33 | ->exampleResponse([ |
34 | - 'reports' => [ | ||
35 | - 'columnHeader' => [ | ||
36 | - 'metricHeaderEntries' => [ | ||
37 | - 'name' => 'ga:users', | ||
38 | - 'type' => 'INTEGER' | ||
39 | - ] | ||
40 | - ], | ||
41 | - 'data' => [ | ||
42 | - 'rows' => [ | ||
43 | - 'metrics' => [ | ||
44 | - 'values' => '777' | ||
45 | - ], | ||
46 | - ], | ||
47 | - 'totals' => [ | ||
48 | - 'values' => '777' | ||
49 | - ], | ||
50 | - 'rowCount' => '1', | ||
51 | - 'minimums' => [ | ||
52 | - 'values' => '777' | ||
53 | - ], | ||
54 | - 'maximums' => [ | ||
55 | - 'values' => '777' | ||
56 | - ], | ||
57 | - ] | ||
58 | - ], | 34 | + "name" => "rukzachok.com.ua", |
35 | + "(Other)" => "646", | ||
36 | + "Direct" => "482", | ||
37 | + "Display" => "134", | ||
38 | + "Organic Search" => "2278", | ||
39 | + "Paid Search" => "2989", | ||
40 | + "Referral" => "128", | ||
41 | + "Social" => "29" | ||
59 | ]) | 42 | ]) |
60 | ->exampleRequest([ | 43 | ->exampleRequest([ |
61 | 'get params' => [ | 44 | 'get params' => [ |
62 | 'required' => [], | 45 | 'required' => [], |
63 | 'optional' => [ | 46 | 'optional' => [ |
64 | - 'view_id' => 'GA VIEW_ID', | 47 | + 'user_id' => '1', |
48 | + 'view_id' => 'GA VIEW_ID', | ||
65 | 'start' => '30daysAgo / 2015-03-01', | 49 | 'start' => '30daysAgo / 2015-03-01', |
66 | 'end' => 'today', | 50 | 'end' => 'today', |
67 | 'metric' => 'users,sessions', | 51 | 'metric' => 'users,sessions', |