diff --git a/request_statistics_record/request_statistics_record.js b/request_statistics_record/request_statistics_record.js
index c4f2ef8..957e954 100644
--- a/request_statistics_record/request_statistics_record.js
+++ b/request_statistics_record/request_statistics_record.js
@@ -9,7 +9,7 @@
 (function ($, Drupal, window, document, undefined) {
   var date_time = new Date();
   var request_id = '';
-  var record_url = '/request_statistics_record';
+  var record_url = 'request_statistics_record';
   var previous_inner_width = 0;
   function id_create()
     {
@@ -102,7 +102,7 @@
     else if (typeof window.window.screen.width !== 'undefined') {
       post.screen_width = window.window.screen.width;
     }
-    $.post(record_url, post);
+    $.post(Drupal.settings.basePath + record_url, post);
     return false;
     // Return false so the navigation stops here and not continue to the page in the link.
     }
