You are here

function google_analytics_api_menu in Google Analytics Reports 6

Same name and namespace in other branches
  1. 7 google_analytics_api.module \google_analytics_api_menu()

Implementation of hook_menu().

File

./google_analytics_api.module, line 35
Implements the API through which Google Analytics data can be accessed.

Code

function google_analytics_api_menu() {
  $items['admin/settings/google-analytics-reports'] = array(
    'title' => 'Google Analytics Reports',
    'description' => 'Configure your account, profiles, and reports.',
    'page callback' => 'drupal_get_form',
    'file' => 'google_analytics_api.pages.inc',
    'page arguments' => array(
      'google_analytics_api_admin',
    ),
    'access arguments' => array(
      'administer google analytics reports',
    ),
  );

  /* OAuth callback from Google */
  $items['google-analytics-reports/oauth'] = array(
    'title' => 'Google Analytics Reports OAuth Callback',
    'access callback' => TRUE,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'google_analytics_reports_oauth_callback',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'google_analytics_api.pages.inc',
  );
  return $items;
}