public function GoogleAnalyticsCounterMessageManager::getProfileName in Google Analytics Counter 8.3
Get the Profile name of the Google view from Drupal.
Parameters
string $profile_id: The profile id used in the google query.
Return value
string mixed
Overrides GoogleAnalyticsCounterMessageManagerInterface::getProfileName
File
- src/
GoogleAnalyticsCounterMessageManager.php, line 154
Class
- GoogleAnalyticsCounterMessageManager
- Defines the Google Analytics Counter message manager.
Namespace
Drupal\google_analytics_counterCode
public function getProfileName($profile_id) {
$profile_id = $this->state
->get('google_analytics_counter.total_pageviews_' . $profile_id);
if (!empty($profile_id)) {
$profile_name = '<strong>' . $profile_id[key($profile_id)] . '</strong>';
}
else {
$profile_name = '<strong>' . $this
->t('(Profile name to come)') . '</strong>';
}
return $profile_name;
}