The Statistics Counter module for Drupal 11 has been updated to version 1.0.3, and with it comes a major improvement: accurate, reliable page view tracking that mirrors the behavior of Drupal’s now-contributed core Statistics module—without overcounting or noise from bot traffic.
This release is a must-have for site builders and developers who care about clean, accurate analytics—especially in modern, decoupled, and heavily cached environments.
What's New in Version 1.0.3?
In earlier versions, the module’s view-counting logic could inflate statistics by incrementing views indiscriminately—even for cached pages, bot traffic, or duplicate requests. This new release fixes that with an entirely refactored event subscriber.
✅ Key Improvements
- Bot Filtering via User-Agent
Now filters out known bots and crawlers (e.g., Googlebot, Slurp, Bingbot) to prevent skewed data. - Only Counts Canonical Node Views
Views are only counted on entity.node.canonical routes—ignoring admin pages, JSON responses, previews, etc. - Respects Drupal’s count_content_views Setting
Just like the core Statistics module, counting is conditional on the statistics.settings configuration. - Prevents Duplicate Counting
Implements static flags to ensure each node is only counted once per request. - Ignores Admin Users by Default
Users with administer nodes permission are excluded from view counts to reflect more authentic audience behavior.
Why It Matters
In a post-Drupal-10.3 world, where Statistics is no longer a core module, many site owners are left without reliable built-in view tracking. While the contributed Statistics module fills that gap, it doesn’t always meet the needs of developers who want:
- Fine-grained control over what gets counted
- Better integration with custom workflows
- Clean data to power things like “Most Viewed” content blocks or time-based analytics
Statistics Counter 1.0.3 brings you that control—now with parity to core behavior and flexibility to build even more.
Final Thoughts
The statistics_counter module is now a modern, developer-friendly replacement for Drupal’s legacy statistics system—designed for Drupal 11, optimized for real-world traffic, and ready for integration into advanced Views, Blocks, or custom reporting dashboards.
If you’ve been frustrated by inaccurate page counts or noisy bot traffic in your analytics, version 1.0.3 is the clean break you’ve been waiting for.
Download the latest version:
github.com/idflorin/statistics_counter
Have questions or feature suggestions? Feel free to open an issue or start a discussion on GitHub.