You are here

function amp_analytics_admin_form in Accelerated Mobile Pages (AMP) 7

Form constructor for the AMP analytics form.

1 string reference to 'amp_analytics_admin_form'
amp_analytics_menu in modules/amp_analytics/amp_analytics.module
Implements hook_menu().

File

modules/amp_analytics/amp_analytics.admin.inc, line 11
Administrative page callbacks for the AMP analytics module.

Code

function amp_analytics_admin_form($form, &$form_state) {
  $form['amp_analytics'] = array(
    '#type' => 'fieldset',
    '#title' => t('AMP Analytics'),
    '#group' => 'additional_settings',
    '#weight' => 100,
  );
  $form['amp_analytics']['amp_google_analytics_id'] = array(
    '#title' => t('Google Analytics Web Property ID'),
    '#type' => 'textfield',
    '#default_value' => variable_get('amp_google_analytics_id'),
    '#size' => 15,
    '#maxlength' => 20,
    '#description' => t('This ID is unique to each site you want to track separately, and is in the form of UA-xxxxxxx-yy. To get a Web Property ID, <a href="@analytics">register your site with Google Analytics</a>, or if you already have registered your site, go to your Google Analytics Settings page to see the ID next to every site profile. <a href="@webpropertyid">Find more information in the documentation</a>.', array(
      '@analytics' => 'http://www.google.com/analytics/',
      '@webpropertyid' => url('https://developers.google.com/analytics/resources/concepts/gaConceptsAccounts', array(
        'fragment' => 'webProperty',
      )),
    )),
  );
  return system_settings_form($form);
}