Overview:
Vercount is a website counter powered by NextJS, Redis, and Vercel. It aims to provide a faster, more stable, and secure alternative to the popular website counter tool, Busuanzi. With features like fast response times, high availability, accurate statistics, security measures, automatic data synchronization, compatibility, and serverless architecture, Vercount aims to address the shortcomings of traditional counters.
Features:
- Fast Response: Server response time within 10ms.
- High Availability: Supports China-accelerated version or Vercel global CDN for 99.99% uptime.
- Accurate Statistics: Uses POST requests for precise tracking across devices.
- Security Protection: Prevents CSRF attacks with JSON callback and supports JSONP method.
- Automatic Data Sync: Data like site_pv, site_uv, and page_pv sync automatically.
- Seamless Compatibility: Supports Busuanzi’s span tags for easy switching.
- Persistent Data Storage: Regular backup using Redis to prevent data loss.
- Serverless Architecture: Utilizes Vercel Serverless Functions for backend support.
Installation:
To integrate Vercount into a React project, add the following script for optimized access in China:
<script async src="https://vercount.one/script/china.js"></script>
Alternatively, for overseas access optimization, use this script:
<script async src="https://vercount.one/script/global.js"></script>
To start counting, use the following tags:
<span id="vercount_pv"></span>
<span id="vercount_uv"></span>
Summary:
Vercount is a high-performance website counter built on NextJS and Redis, offering fast response times, precise statistics, and enhanced security features. By addressing the limitations of traditional counters like Busuanzi, Vercount provides a reliable and efficient solution for tracking website traffic. The seamless compatibility and automatic data synchronization make it a convenient choice for website owners looking to improve their analytics capabilities.