diff --git a/core/modules/statistics/statistics.js b/core/modules/statistics/statistics.js
new file mode 100644
index 0000000..78c24da
--- /dev/null
+++ b/core/modules/statistics/statistics.js
@@ -0,0 +1,12 @@
+(function ($) {
+   $(document).ready(function() {
+      var nid = Drupal.settings.statistics.nid;
+      var basePath = Drupal.settings.basePath
+      $.ajax({
+        type: "POST",
+        cache: false,
+        url: basePath+"core/modules/statistics/statistics.php",
+        data: "nid="+nid,
+      });
+    });
+})(jQuery);
\ No newline at end of file
diff --git a/core/modules/statistics/statistics.module b/core/modules/statistics/statistics.module
index eda808f..1e71398 100644
--- a/core/modules/statistics/statistics.module
+++ b/core/modules/statistics/statistics.module
@@ -41,7 +41,6 @@ function statistics_help($path, $arg) {
   }
 }
 
-
 /**
  * Implements hook_exit().
  *
@@ -57,22 +56,6 @@ function statistics_exit() {
   // in which case we need to bootstrap to the session phase anyway.
   drupal_bootstrap(DRUPAL_BOOTSTRAP_VARIABLES);
 
-  if (variable_get('statistics_count_content_views', 0)) {
-    // We are counting content views.
-    if (arg(0) == 'node' && is_numeric(arg(1)) && arg(2) == NULL) {
-      // A node has been viewed, so update the node's counters.
-      db_merge('node_counter')
-        ->key(array('nid' => arg(1)))
-        ->fields(array(
-          'daycount' => 1,
-          'totalcount' => 1,
-          'timestamp' => REQUEST_TIME,
-        ))
-        ->expression('daycount', 'daycount + 1')
-        ->expression('totalcount', 'totalcount + 1')
-        ->execute();
-    }
-  }
   if (variable_get('statistics_enable_access_log', 0)) {
     drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION);
 
@@ -115,6 +98,11 @@ function statistics_permission() {
  * Implements hook_node_view().
  */
 function statistics_node_view($node, $view_mode) {
+  if (!empty($node->nid) && $view_mode == 'full') {
+    drupal_add_js(drupal_get_path('module', 'statistics') . '/statistics.js', array('scope' => 'footer'));
+    drupal_add_js(array('statistics' => array('nid' => $node->nid)), 'setting');
+  }
+  
   if ($view_mode != 'rss') {
     if (user_access('view post access counter')) {
       $statistics = statistics_get($node->nid);
diff --git a/core/modules/statistics/statistics.php b/core/modules/statistics/statistics.php
new file mode 100644
index 0000000..eaaf287
--- /dev/null
+++ b/core/modules/statistics/statistics.php
@@ -0,0 +1,30 @@
+<?php
+
+// Change the directory to the Drupal root.
+chdir('../../..');
+
+/**
+ * Root directory of Drupal installation.
+ */
+define('DRUPAL_ROOT', getcwd());
+
+include_once DRUPAL_ROOT . '/core/includes/bootstrap.inc';
+drupal_bootstrap(DRUPAL_BOOTSTRAP_VARIABLES);
+
+if (variable_get('statistics_count_content_views', 0)) {
+  $nid = $_POST['nid'];
+  if(is_numeric($nid)) {
+    db_merge('node_counter')
+      ->key(array('nid' => $nid))
+      ->fields(array(
+        'daycount' => 1, 
+        'totalcount' => 1, 
+        'timestamp' => REQUEST_TIME,
+        ))
+        ->expression('daycount', 'daycount + 1')
+        ->expression('totalcount', 'totalcount + 1')
+        ->execute();
+  }
+}
+
+?>
\ No newline at end of file
