diff --git a/app/library/App/Controllers/GaController.php b/app/library/App/Controllers/GaController.php index 999ae9e..850cf7e 100644 --- a/app/library/App/Controllers/GaController.php +++ b/app/library/App/Controllers/GaController.php @@ -25,6 +25,7 @@ class GaController extends CrudResourceController { public function getAction() { + $view_id = $this->request->get('view_id') ?? '119240817'; $get_metrics = $this->request->get('metric') ?? 'users'; $get_start_date = $this->request->get('start') ?? '30daysAgo'; $get_end_date = $this->request->get('end') ?? 'today'; @@ -64,7 +65,7 @@ class GaController extends CrudResourceController { // Создание объекта ReportRequest. $request = new Google_Service_AnalyticsReporting_ReportRequest(); - $request->setViewId(self::VIEW_ID); + $request->setViewId($view_id); $request->setDateRanges($dateRange); $request->setDimensions(array($dimensions)); $request->setMetrics(array($metrics)); -- libgit2 0.21.4