You are here

public function GoogleAnalyticsCounterMessageManager::googleProjectName in Google Analytics Counter 8.3

Returns the link with the Google project name if it is available.

Return value

string Project name.

Overrides GoogleAnalyticsCounterMessageManagerInterface::googleProjectName

File

src/GoogleAnalyticsCounterMessageManager.php, line 135

Class

GoogleAnalyticsCounterMessageManager
Defines the Google Analytics Counter message manager.

Namespace

Drupal\google_analytics_counter

Code

public function googleProjectName() {
  $config = $this->config;
  $project_name = !empty($config
    ->get('general_settings.project_name')) ? Url::fromUri('https://console.developers.google.com/apis/api/analytics.googleapis.com/quotas?project=' . $config
    ->get('general_settings.project_name'))
    ->toString() : Url::fromUri('https://console.developers.google.com/apis/api/analytics.googleapis.com/quotas')
    ->toString();
  return $project_name;
}