You are here

function fb_instant_articles_module_config_analytics in Facebook Instant Articles 7.2

Same name and namespace in other branches
  1. 7 includes/admin.inc \fb_instant_articles_module_config_analytics()

Generates Analytics sub-section of Module Configuration section

1 call to fb_instant_articles_module_config_analytics()
fb_instant_articles_settings in includes/admin.inc
Form constructor for Facebook Instant Articles Base settings form.

File

includes/admin.inc, line 143
Settings for Facebook Instant Articles Base module.

Code

function fb_instant_articles_module_config_analytics($form) {
  $form['analytics'] = array(
    '#type' => 'fieldset',
    '#title' => t('Analytics'),
    '#collapsible' => TRUE,
    '#description' => t('Enable 3rd-party analytics to be used with Instant Articles. You can embed code to insert your own trackers and analytics. Learn more about <a href="@analytics_url">analytics in Instant Articles</a>.', array(
      '@analytics_url' => 'https://developers.facebook.com/docs/instant-articles/ads-analytics#analytics',
    )),
  );
  $form['analytics']['fb_instant_articles_analytics_embed_code'] = array(
    '#type' => 'textarea',
    '#title' => t('Analytics Embed Code'),
    '#default_value' => variable_get('fb_instant_articles_analytics_embed_code'),
    '#description' => t('Add code for any analytics services you wish to use. <strong>Note:</strong> you do not need to include any &lt;op-tracker&gt; tags. The module will automatically include them in the article markup.'),
    '#size' => 30,
  );
  return $form;
}