public function request(array $settings, array $handler)
    {
        if (empty($settings['ga_profile_id'])) {
            throw new OutOfRangeException('Google Analytics profile ID is empty in the request settings');
        }

        $service = $this->getService($settings); // Also loads all needed libraries

        $request = new \Google_Service_AnalyticsReporting_ReportRequest;
        $request->setViewId($settings['ga_profile_id']);

        $this->setRequestDate($request, $handler);
        $this->setRequestMetrics($request, $handler);
        $this->setRequestSorting($request, $handler);
        $this->setRequestDimensions($request, $handler);

        $body = new \Google_Service_AnalyticsReporting_GetReportsRequest;
        $body->setReportRequests(array($request));

        return $service->reports->batchGet($body);
    }