diff --git a/better_statistics.admin.inc b/better_statistics.admin.inc
index bccc75c..ec59592 100644
--- a/better_statistics.admin.inc
+++ b/better_statistics.admin.inc
@@ -14,6 +14,36 @@ function _better_statistics_form_statistics_settings_form_alter(&$form, &$form_s
   $log_description = &$form['access']['statistics_enable_access_log']['#description'];
   $log_description .= ' ' . t('Also required by the Better Statistics module.');
 
+  // Alter the access log settings to indicate included/excluded paths.
+  $form['access']['statistics_enable_access_log']['#weight'] = 10;
+  $form['access']['statistics_access_log_include_pages'] = array(
+    '#weight' => 20,
+    '#type' => 'textarea',
+    '#rows' => 2,
+    '#title' => t("Page requests to be recorded in the access log"),
+    '#default_value' => variable_get('statistics_access_log_include_pages', '*'),
+    '#description' => t("Enter relative paths, one per line. Where they exist use the URL aliases rather than the node numbers. <strong>&lt;front&gt;</strong> means the front page.<br/>The asterisk <em>*</em> is the wildcard character, i.e. <em>recipes/mains*</em> denotes all pages that have a path starting with <em>recipes/mains</em><br/>The asterisk by itself means any page on your site."),
+    '#states' => array(
+      'visible' => array(
+        ':input[name="statistics_enable_access_log"]' => array('checked' => TRUE),
+      ),
+    ),
+  );
+  $form['access']['statistics_access_log_exclude_pages'] = array(
+    '#weight' => 30,
+    '#type' => 'textarea',
+    '#rows' => 3,
+    '#title' => t('Exceptions: pages excluded from the set of pages specified above'),
+    '#default_value' => variable_get('statistics_access_log_exclude_pages', 'system/files/*'),
+    '#description' => t('As above, one path specification per line.'),
+    '#states' => array(
+      'visible' => array(
+        ':input[name="statistics_enable_access_log"]' => array('checked' => TRUE),
+      ),
+    ),
+  );
+  $form['access']['statistics_flush_accesslog_timer']['#weight'] = 100;
+
   // Create a fieldset for our settings.
   $form['better_statistics'] = array(
     '#type' => 'fieldset',
diff --git a/better_statistics.install b/better_statistics.install
index 5adb77f..c7e5bbd 100644
--- a/better_statistics.install
+++ b/better_statistics.install
@@ -54,4 +54,6 @@ function better_statistics_uninstall() {
   }
 
   variable_del('better_statistics_fields');
+  variable_del('statistics_access_log_include_pages');
+  variable_del('statistics_access_log_exclude_pages');
 }
diff --git a/better_statistics.module b/better_statistics.module
index 21855af..07ab29d 100644
--- a/better_statistics.module
+++ b/better_statistics.module
@@ -75,22 +75,39 @@ function better_statistics_exit() {
     // @see statistics_exit()
     drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION);
     include_once DRUPAL_ROOT . '/includes/unicode.inc';
+    require_once DRUPAL_ROOT . '/' . variable_get('path_inc', 'includes/path.inc');
+
+    // Resolve whether page request needs to be logged.
+    $do_logging = TRUE;
+    $path = truncate_utf8($_GET['q'], 255);
+    $include_requests = variable_get('statistics_access_log_include_pages', '*');
+    if (!drupal_match_path($path, $include_requests)) {
+      $do_logging = FALSE;
+    }
+    if ($do_logging) {
+      $exclude_requests = variable_get('statistics_access_log_exclude_pages', 'system/files/*');
+      if (drupal_match_path($path, $exclude_requests)) {
+        $do_logging = FALSE;
+      }
+    }
 
-    // Get all declared fields and their computed values.
-    $fields = better_statistics_get_fields_data();
+    if ($do_logging) {
+      // Get all declared fields and their computed values.
+      $fields = better_statistics_get_fields_data();
 
-    // Now that we have data, try to insert it.
-    try {
-      db_insert('accesslog')->fields($fields)->execute();
-    }
-    catch (Exception $e) {
-      // At least log core fields.
-      $defaults = better_statistics_get_default_fields();
-      $core_fields = array_intersect_key($fields, $defaults);
-      db_insert('accesslog')->fields($core_fields)->execute();
-
-      // Log the error.
-      watchdog('better statistics', 'There was an error collecting statistics data:<br /><br />@error', array('@error' => $e->getMessage()), WATCHDOG_ERROR);
+      // Now that we have data, try to insert it.
+      try {
+        db_insert('accesslog')->fields($fields)->execute();
+      }
+      catch (Exception $e) {
+        // At least log core fields.
+        $defaults = better_statistics_get_default_fields();
+        $core_fields = array_intersect_key($fields, $defaults);
+        db_insert('accesslog')->fields($core_fields)->execute();
+
+        // Log the error.
+        watchdog('better statistics', 'There was an error collecting statistics data:<br /><br />@error', array('@error' => $e->getMessage()), WATCHDOG_ERROR);
+      }
     }
   }
 
