Commit b9c0df9f0e95b40138b6cedc21bbf67b49b76d3b
1 parent
1b6d0c09
ga output
Showing
1 changed file
with
2 additions
and
3 deletions
Show diff stats
app/library/App/Controllers/GaController.php
... | ... | @@ -34,11 +34,10 @@ class GaController extends CrudResourceController { |
34 | 34 | $get_start_date = $this->request->get('start') ?? '30daysAgo'; |
35 | 35 | $get_end_date = $this->request->get('end') ?? 'today'; |
36 | 36 | |
37 | - if (true) { | |
37 | + if (empty($user_id)) { | |
38 | 38 | $projects = Project::find(['user_id' => $user_id]); |
39 | 39 | foreach ($projects as $project) { |
40 | - $result[] = $project->id; | |
41 | - //$result[] = $this->sendGaRequest($project->id, $get_metrics, $get_dimensions, $get_start_date, $get_end_date); | |
40 | + $result[] = $this->sendGaRequest($project->ga_view_id, $get_metrics, $get_dimensions, $get_start_date, $get_end_date); | |
42 | 41 | } |
43 | 42 | } |
44 | 43 | else { | ... | ... |