protected function getClient(array $settings)
    {
        if (empty($settings['credential_id'])) {
            throw new OutOfRangeException('Credential ID is empty in Google client settings');
        }

        $client = $this->getApiModule()->getGoogleClient($settings['credential_id']);
        $client->setApplicationName('Analytics Reporting');
        $client->setScopes(array('https://www.googleapis.com/auth/analytics.readonly'));

        return $client;
    }