diff --git a/statcounter.admin.inc b/statcounter.admin.inc
index f16c83a..e39d865 100644
--- a/statcounter.admin.inc
+++ b/statcounter.admin.inc
@@ -9,6 +9,7 @@
  * Implements hook_admin_settings() for configuring the module.
  */
 function statcounter_admin_settings_form($form_state) {
+  // General settings.
   $form['account'] = array(
     '#type' => 'fieldset',
     '#title' => t('General settings'),
@@ -24,7 +25,7 @@ function statcounter_admin_settings_form($form_state) {
     '#description' => t('The Project ID number is unique. Copy this number from the <strong>Statcounter Configuration Pages</strong>, or extract this number from the <strong>Statcounter Code</strong> and enter it into this field.'),
   );
 
-    $form['account']['statcounter_security_code'] = array(
+  $form['account']['statcounter_security_code'] = array(
     '#type' => 'textfield',
     '#title' => t('Statcounter Security Code'),
     '#default_value' => variable_get('statcounter_security_code', ''),
@@ -34,6 +35,13 @@ function statcounter_admin_settings_form($form_state) {
     '#description' => t('The Security Code is unique. Copy this number from the <strong>Statcounter Configuration Pages</strong>, or extract this number from the <strong>Statcounter Code</strong> and enter it into this field.'),
   );
 
+  $form['account']['statcounter_invisible_tracking'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('No counter or button'),
+    '#description' => t('If checked, this option allows your site to be tracked without a counter or button appearing on your webpages.'),
+    '#default_value' => variable_get('statcounter_invisible_tracking', 1),
+    );
+
   // Visibility settings.
   $form['tracking_title'] = array(
     '#type' => 'item',
@@ -165,13 +173,10 @@ function statcounter_admin_settings_form($form_state) {
 
   $form['advanced']['statcounter_js_scope'] = array(
     '#type' => 'select',
-    '#title' => t('JavaScript scope'),
-    '#description' => t("<strong>Warning:</strong> Adding the external JavaScript files to the footer region is recommended for performance reasons."),
-    '#options' => array(
-      'footer' => t('Footer'),
-      'header' => t('Header'),
-    ),
-    '#default_value' => variable_get('statcounter_js_scope', 'footer'),
+    '#title' => t('Choose region to insert JavaScript'),
+    '#description' => t("<strong>Warning:</strong> Adding the external JavaScript files to the Page bottom region is recommended for performance reasons."),
+    '#options' => system_region_list(variable_get('theme_default', 'bartik')),
+    '#default_value' => variable_get('statcounter_js_scope', 'page_bottom'),
   );
 
   return system_settings_form($form);
diff --git a/statcounter.install b/statcounter.install
index 4139c93..6c7ab6b 100644
--- a/statcounter.install
+++ b/statcounter.install
@@ -32,6 +32,7 @@ function statcounter_uninstall() {
   variable_del('statcounter_security_code');
   variable_del('statcounter_visibility_pages');
   variable_del('statcounter_visibility_roles');
+  variable_del('statcounter_invisible_tracking');
 }
 
 /**
diff --git a/statcounter.module b/statcounter.module
index a9baffd..a879491 100644
--- a/statcounter.module
+++ b/statcounter.module
@@ -70,12 +70,12 @@ function statcounter_menu() {
 /**
  * Implements hook_page_alter() to insert JavaScript to the appropriate scope/region of the page.
  */
-function statcounter_page_alter(&$page) {
+function statcounter_page_build(&$page) {
   global $user;
 
   $id = variable_get('statcounter_project_id', '');
   $security_code = variable_get('statcounter_security_code', '');
-
+  $invisibility = variable_get('statcounter_invisible_tracking', 1);
   // Get page status code for visibility filtering.
   $status = drupal_get_http_header('Status');
   $trackable_status_codes = array(
@@ -92,7 +92,7 @@ function statcounter_page_alter(&$page) {
 
     // Build tracker code.
     $inline_script = 'var sc_project=' . $id . ';';
-    $inline_script .= 'var sc_invisible=1;';
+    $inline_script .= 'var sc_invisible=' . $invisibility . ';';
     $inline_script .= 'var sc_security="' . $security_code . '";';
 
     // Should a local cached copy of the tracking code be used?
@@ -112,8 +112,14 @@ function statcounter_page_alter(&$page) {
     }
 
     // Add tracker code to scope.
-    drupal_add_js($inline_script, array('scope' => $scope, 'type' => 'inline'));
-    drupal_add_js($file, array('scope' => $scope, 'type' => $type));
+    $page[$scope]['statcounter']['first'] = array(
+      '#markup' => $inline_script,
+      '#prefix' => '<script type="text/javascript">',
+      '#suffix' => '</script>',
+    );
+    $page[$scope]['statcounter']['second'] = array(
+      '#markup' => "<script type=\"text/javascript\" src=\"$file\"></script>",
+    );
   }
 }
 
