Main Menu

Installation & License Activation

Download

You will receive an email with your download link(s) & license key(s) after your purchase. In case the download link in your email has expired, you can always log into your account to download plugin.


Installation

  1. Download the zip file from to your computer.
  2. Unzip the file.
  3. Upload the folder to your /wp-content/plugins/ directory.
  4. Activate the plugin through the Plugins menu in your WordPress admin area.

License Activation

To activate your license key, navigate to plugin → License in your WordPress admin area. After saving your license, don’t forget to activate it to receive future updates.

If you are having trouble activating your license key, please follow these steps in the exact order:

  1. Remove your license key
  2. Hit save
  3. Re-enter your license key
  4. Hit save (not activate!)
  5. After the page has refreshed, hit activate

Bước 1: Tạo mới file sheet tại: https://sheet.new để có URL dạng https://docs.google.com/spreadsheets/d/xxx/editVisitors traffic 1

Bước 2: Tạo mới script tại: https://script.google.com và dán nội dung bên dưới vào (Lưu ý: Thay xxx bằng file sheet vừa tạo ở bước 1)

function doPost(e) {
  var ss = SpreadsheetApp.openById("xxx"); 
  var today = new Date().toISOString().split("T")[0];
  var sheetName = today;
  var sheet = ss.getSheetByName(sheetName);
  if (!sheet) {
    sheet = ss.insertSheet(sheetName);
    sheet.appendRow(["Timestamp", "IP Address", "Location", "Referer", "URL", "Device", "User Agent"]);
    sheet.setFrozenRows(1);
  }
  if (!e || !e.parameter || Object.keys(e.parameter).length === 0) {
    return ContentService.createTextOutput(JSON.stringify({ success: false, error: "No data received" })).setMimeType(ContentService.MimeType.JSON);
  }
  var data = e.parameter;
  var timestamp = data.timestamp || new Date().toISOString();
  var ipAddress = data.ip_address || "";
  var location = data.location || "";
  var referer = data.referer || "";
  var url = data.url || "";
  var userAgent = data.user_agent || "";
  var botKeywords = [
    "bot", "crawler", "spider", "meta-externalagent"
  ];
  var isBot = botKeywords.some(bot => userAgent.toLowerCase().includes(bot.toLowerCase()));
  var device = isBot ? "Bot" : (userAgent.match(/Mobile|iPhone|Android/i) ? "Mobile" : "Desktop");
  var newRow = [timestamp, ipAddress, location, referer, url, device, userAgent];
  var allData = sheet.getDataRange().getValues().slice(1);
  function normalizeRow(row) {
    return row.map(cell => (cell ? String(cell).trim() : ""));
  }
  var compareRow = normalizeRow(newRow.slice(1));
  for (var i = 0; i < allData.length; i++) {
    var existingRow = normalizeRow(allData[i].slice(1));
    if (JSON.stringify(existingRow) === JSON.stringify(compareRow)) {
      return ContentService.createTextOutput(JSON.stringify({ success: false, error: "Duplicate data" })).setMimeType(ContentService.MimeType.JSON);
    }
  }
  sheet.appendRow(newRow);
  return ContentService.createTextOutput(JSON.stringify({ success: true, sheet: sheetName })).setMimeType(ContentService.MimeType.JSON);
}

Visitors traffic 2

Visitors traffic 3

Visitors traffic 4

Visitors traffic 5

Visitors traffic 6

Bước 3: Dán đầy đủ url vừa tạo ở bước 2 vào URL Macros trong cấu hình của Plugin Visitors Traffic, ví dụ: https://script.google.com/macros/s/xxx/exec

Ngoài ra bạn có thể cấu hình chặn IPs và Bots tuỳ theo nhu cầu.

Demo traffic của website này: Xem chi tiết

Demo visitors traffic