PS PrestaShop Intermediate

Traffic Radar — Complete guide

Install, configure and operate the Traffic Radar real-time dashboard: online humans/bots counter, AI crawler detection, charts, heatmap, robots.txt control and CSV export for PrestaShop 8 and 9.

Updated Module version 1.1.1

Traffic Radar shows in real time who is visiting your PrestaShop store and separates real visitors from bots and AI crawlers. The module installs a dedicated dashboard under Stats → Traffic Radar: an instant online counter (humans vs bots), trend charts, an activity heatmap, the top AI crawlers, a live activity feed, AI crawler control via robots.txt and CSV export. This guide covers installation, settings, how detection works, every dashboard view, privacy and troubleshooting.

Installation

  1. Download the dftrafficradar.zip archive from your DataFirefly account.
  2. PrestaShop back office → ModulesUpload a module → send the ZIP.
  3. On install, the module creates its two tables (df_traffic_visit and df_traffic_online), registers its hooks and adds the Stats → Traffic Radar tab.

Compatible with PrestaShop 8.0 to 9.x, on PHP 7.4 to 8.3. No theme override, no Composer dependency, no CDN (Chart.js is bundled locally). Multistore and multilingual (FR, EN, ES, DE, IT).

Configuration

Go to Modules → DataFirefly Traffic Radar → Configure.

  • Enable tracking: master switch. When off, no visit is recorded.
  • Record bots / AI crawlers: turn it off to track human visits only.
  • Anonymise IP addresses (GDPR): IPs are always hashed; this option also masks the last octet before hashing.
  • Data retention (days): older visits are deleted automatically. 0 = keep forever. Default: 90.
  • Heartbeat interval (seconds): how often an online visitor pings to stay counted. Default: 15.
  • Online window (seconds): a visitor is “online now” if seen within this window. Default: 90.
  • Excluded IP addresses: one per line (or comma separated). Ideal to ignore your own and your team’s traffic.

Add your office IPs to the excluded list right after install so your own tests do not inflate the stats.

How detection works

Traffic Radar combines two complementary signals, which is what lets it truly separate humans from crawlers.

Server-side detection

On every page view, via the actionFrontControllerSetMedia hook, the module classifies the User-Agent against a base of 40+ signatures (AI, search engines, SEO, social, monitoring) and assigns a type. This is what captures AI crawlers, which almost never run JavaScript.

Client-side heartbeat

A tiny script (tracker.js) periodically pings the track front controller to keep real visitors counted as “online” between page loads. Because bots do not fire that beat, the real-time human counter stays clean.

AJAX requests and module sub-requests (add to cart, wishlist, comments, as well as the heartbeat itself) are not counted as page views: only real, navigable pages are recorded.

The dashboard

The Stats → Traffic Radar tab gathers every view, filterable by period (today, 24h, 7 / 30 / 90 days, custom) and by audience (all traffic, humans, all bots, or a specific bot type).

  • Online now: real-time counter split into humans and bots, refreshed on the heartbeat cadence.
  • KPIs: visits, unique sessions, human visits, bot visits and AI / LLM hits. Each KPI shows its variation (▲ / ▼ in percent) versus the previous window of the same length.
  • Visits over time: humans vs bots line chart, with automatic granularity (hourly or daily depending on the period).
  • Audience split: doughnut by type (human, AI, search, SEO, social, monitoring, other).
  • Top AI crawlers: horizontal bars of the most active AI crawlers (GPTBot, ClaudeBot, PerplexityBot, Google-Extended, Bytespider…).
  • Activity heatmap: hour × weekday grid.
  • Top pages, referrers and countries: ranked bars.
  • Live activity feed: latest visits with type, identity, page, device and country.

The real-time counter

The “Online now” block relies on the df_traffic_online table, updated on every page view and every heartbeat. A visitor drops off the counter as soon as they have not been seen for the duration set by the online window.

If the counter stays at zero while visitors are present, make sure you are on version 1.1.1 or later: a timezone mismatch between PHP and MySQL could skew the real-time window in earlier versions. The fix aligns the read with the write clock.

Newly detected crawlers radar

The “Newly detected crawlers” panel highlights bots whose very first recorded visit falls within the analysed period. It is the ideal tool to spot a new AI crawler arriving on your catalog immediately: bot name, type, first-seen date and hit count.

AI crawler control (robots.txt)

The control center lists 25 known AI crawlers with their official robots.txt token. For each one you choose “allowed” or “blocked” via a checkbox; training crawlers are pre-ticked as blocked by default, while agents that answer a user request are left through.

  • Crawlers actually seen on your store are flagged with a badge.
  • Two one-click presets: “Block all” and “Reset to recommended”.
  • The module generates a ready-to-paste robots.txt block live, with a Copy button.

In this version, applying it is intentionally manual: you copy the generated block into your robots.txt file. The module never writes the file automatically, which guarantees your existing directives are never overwritten by surprise.

Back-office home widget

The module adds a “Traffic Radar” card in the right column of the back-office home dashboard (dashboardZoneTwo hook): a live online counter (humans / bots) and today’s counters (visits, humans, bots, AI / LLM), with a shortcut to the full dashboard.

CSV export

The CSV button in the toolbar exports all traffic matching the active filters (period and audience). The file is UTF-8 encoded with a BOM so it opens cleanly in Excel, and contains one row per visit: date, type, bot name, device, page, referrer, country, etc.

Privacy and GDPR

  • No raw IP address is stored: only salted SHA-1 hashes.
  • Optional anonymisation masks the last octet (IPv4) or the trailing groups (IPv6) before hashing.
  • Retention is configurable, with probabilistic automatic purge: no cron is required.
  • The excluded IP list lets you ignore your own traffic.

Cleanup of old data runs probabilistically as traffic flows. If you prefer deterministic cleanup, you can call the purge from a cron, but it is not necessary.

Compatibility and technical notes

  • PrestaShop 8.0 to 9.x, multistore and multilingual.
  • PSR-4 architecture under the DataFirefly/TrafficRadar namespace (backslash separator) with a bundled autoloader, no Composer.
  • Legacy admin controller (ModuleAdminController) for PS8 / PS9 compatibility.
  • Back-office AJAX endpoints via the 4th argument of getAdminLink(); JSON responses emitted by a dedicated method.
  • Hooks used: actionFrontControllerSetMedia, displayHeader, dashboardZoneTwo.
  • Two indexed utf8mb4 tables: df_traffic_visit (visit log) and df_traffic_online (presence, unique key per session).
  • Chart.js bundled locally, no CDN call.

FAQ and troubleshooting

“Online now” stays at zero. Make sure you are on version 1.1.1 or later (PHP/MySQL timezone fix). Also check that tracking is enabled and that your own IP is not in the excluded list.

“module-…” entries appeared in the feed. Fixed in 1.1.1: AJAX and module sub-requests are no longer counted as page views.

Are AI crawlers really detected? Yes. Server-side detection captures them even without JavaScript. Signatures cover OpenAI, Anthropic, Google-Extended, Perplexity, ByteDance, Meta, Mistral, Cohere, Amazon, Common Crawl and more.

Does the module slow the store down? No. User-Agent classification is a simple in-memory string comparison, and tracking boils down to one indexed insert and one upsert per page view.

Does a full-page cache skew the numbers? Pages served from a full-page cache do not hit PHP and are therefore not re-counted server-side. The JavaScript heartbeat still keeps human visitors counted as online.

Compatible with PrestaShop 1.7? No, only PrestaShop 8.0 to 9.x.

Was this page helpful?

Still stuck? Contact support