You are here

function google_analytics_help in Google Analytics 8.3

Same name and namespace in other branches
  1. 8.2 google_analytics.module \google_analytics_help()
  2. 4.x google_analytics.module \google_analytics_help()

Implements hook_help().

File

./google_analytics.module, line 38
Drupal Module: Google Analytics.

Code

function google_analytics_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.google_analytics':
      $output = '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('Google Analytics adds a web statistics tracking system to your website. This system incorporates numerous statistical features. For an extensive listing of these features see the <a href=":project">Google Analytics</a> project site. Beyond that, additional information can be found at the <a href=":documentation">Drupal - Google Analytics documentation</a>.', [
        ':documentation' => 'https://www.drupal.org/node/37694',
        ':project' => 'https://www.drupal.org/project/google_analytics',
      ]) . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<dt>' . t('Configuring Google Analytics') . '</dt>';
      $output .= '<dd>' . t('All settings for this module can be found on the <a href=":ga_settings">Google Analytics settings</a> page. When entering the Google Analytics account number here, it will automatically add the required JavaScript to every page generated. The <em>General Settings</em> section on this page provides additional instruction about setting up tracking thru the Google account.', [
        ':ga_settings' => Url::fromRoute('google_analytics.admin_settings_form')
          ->toString(),
      ]) . '</dd>';
      $output .= '<dt>' . t('Additional features') . '</dt>';
      $output .= '<dd>' . t('The Google Analytics module offers a bit more than basic tracking. <em>Page Tracking</em> for instance allows you to provide a list of pages to track, or a list of pages not to track. Role and Link tracking features are also available. For a comprehensive discussion on the setup and use of its many feature see the <a href=":documentation">Drupal - Google Analytics documentation</a>.', [
        ':documentation' => 'https://www.drupal.org/node/37694',
      ]) . '</dd>';
      return $output;
    case 'google_analytics.admin_settings_form':
      return t('<a href=":ga_url">Google Analytics</a> is a free (registration required) website traffic and marketing effectiveness service.', [
        ':ga_url' => 'https://marketingplatform.google.com/about/analytics/',
      ]);
  }
}