View source
<?php
function analytics_settings_form($form_state) {
$form = array();
$form['analytics_js_enable'] = array(
'#type' => 'checkbox',
'#title' => 'Enable javascript',
'#description' => 'When selected, analytics will include it\'s javascript library on every page request.',
'#default_value' => variable_get('analytics_js_enable', TRUE),
);
$form['analytics_js_settings_enable'] = array(
'#type' => 'checkbox',
'#title' => 'Enable settings via javascript',
'#description' => 'When selected, analytics will make expose common data about the site and the currently logged in user via javascript to allow advanced analytics to be tracked via javascript.',
'#default_value' => variable_get('analytics_js_settings_enable', FALSE),
);
return system_settings_form($form);
}