Commit a6a1fb9fff11f5136e33fb8fc605db77120bbcc2
1 parent
28168cad
ga output
Showing
1 changed file
with
3 additions
and
8 deletions
Show diff stats
app/library/App/Controllers/GaController.php
| ... | ... | @@ -78,14 +78,9 @@ class GaController extends CrudResourceController { |
| 78 | 78 | |
| 79 | 79 | $response = $analytics->reports->batchGet($body); |
| 80 | 80 | |
| 81 | - $report = $response->getReports()[0]; | |
| 82 | - $rows = $report->getData()->getRows(); | |
| 83 | - | |
| 84 | - die(var_dump($rows)); | |
| 85 | - | |
| 86 | - | |
| 87 | - //$response = $response->toSimpleObject(); | |
| 88 | - //$response = $response->reports[0]['data']['rows']; | |
| 81 | + //have to rewrite code below (2 rows) | |
| 82 | + $response = $response->toSimpleObject(); | |
| 83 | + $response = $response->reports[0]['data']['rows']; | |
| 89 | 84 | |
| 90 | 85 | $result = []; |
| 91 | 86 | ... | ... |