WordPress.org

Plugin Directory

Light Views Counter โ€“ Fast, Scalable View Counter for High-Traffic Sites

Image
Image

Light Views Counter โ€“ Fast, Scalable View Counter for High-Traffic Sites

Description

Light Views Counter is a professional, high-performance WordPress plugin that tracks post views using intelligent scroll detection.

It is specifically designed for high-traffic websites and large databases, where other plugins often slow down or fail to perform efficiently. It delivers reliable view tracking without adding query overhead or slowing down your siteโ€™s performance.

Designed for news sites, magazines, bloggers, and content creators, this plugin helps you filter popular posts and show views that truly resonate with your audience.

๐ŸŒŸ Why Choose Light Views Counter?

Looking for a lightweight, reliable, and high-performance post views counter for WordPress? Light Views Counter is designed with precision and efficiency in mind, built to track genuine user engagement without slowing down your site.

Tracking

  • Scroll Detection Technology: Only counts views when visitors actually read your content (configurable scroll threshold)
  • Bot Protection: Automatically filters out search engine crawlers and automated traffic
  • Duplicate Prevention: Prevent counting the same user multiple times within a configurable time window
  • Short Content Smart Detection: Intelligently handles posts that fit in viewport without requiring scroll

Lightning Fast Performance

  • Zero Impact on Page Speed: Asynchronous REST API ensures counting happens in the background
  • Built-in Caching: caching system reduces database load
  • sendBeacon API: Fire-and-forget counting for maximum performance (enabled by default)

Easy to Use

  • Automatic Tracking: Works immediately after activation, no configuration required
  • Flexible Shortcode: Display views anywhere with [lightvc_post_views] shortcode
  • Popular Posts Widgets: Ready-to-use WordPress and Elementor widgets
  • Auto-Display Option: Automatically show view counts at the end of posts

Developer Friendly

  • Clean Public API: Simple functions: lightvc_get_post_views(), lightvc_get_popular_posts()
  • WP_Query Integration: Sort posts by views: 'orderby' => 'lightvc_views'
  • Hooks & Filters: Customize everything: lightvc_post_views_count, lightvc_views_html, lightvc_exclude_user
  • REST API Endpoints: HTTP access for external integrations

Enterprise Ready

  • High Traffic Optimized: Tested on sites with millions of views per day
  • Cache Plugin Compatible: Works perfectly with WP Rocket, W3 Total Cache, LiteSpeed Cache, Cloudflare
  • GDPR Compliant: No personal data collection, no cookies, privacy-focused

Perfect For

  • Bloggers: See which posts your readers love most
  • News Websites: Track trending stories and breaking news engagement
  • Magazine Sites: Identify top-performing content and popular topics
  • Content Marketers: Measure content performance and reader engagement
  • E-commerce: Track product page views and customer interest
  • Publishers: Understand content performance across categories

๐Ÿ—๏ธ Key features:

Every feature is carefully engineered to ensure accuracy, speed, and seamless integration with your WordPress site. From smart counting logic and flexible widgets to detailed analytics and developer-friendly APIs.

Smart Counting System

  • Scroll-based view detection
  • Automatic short content detection and handling
  • Configurable time window to prevent duplicate counts
  • Admin user exclusion (don’t count your own views)
  • Bot and crawler filtering

Widgets & Integration

  • Standard WordPress widget for popular posts
  • Display options: thumbnails, view counts, dates
  • Fully customizable layouts
  • Works in any widget area

Analytics & Reporting

  • Admin dashboard with statistics
  • Total views across all posts
  • Most viewed posts list
  • Average views per post
  • Views column in posts list (sortable)

Performance Features

  • Custom database table with optimized indexes
  • WP cache support
  • sendBeacon API for fire-and-forget requests
  • Conditional script loading
  • No external dependencies

Translations & Compatibility

  • Translation ready with .pot file included
  • Works with any WordPress theme
  • Deep integration with Foxiz News theme
  • Cache Plugins: WP Rocket, W3 Total Cache, WP Super Cache, LiteSpeed Cache, Autoptimize
  • CDN Services: Cloudflare, StackPath, KeyCDN, BunnyCDN

๐Ÿ”’ Privacy & Security

  • No personal data collection
  • No cookies used
  • No cross-site tracking
  • localStorage is client-side only
  • Complete transparency
  • Rate limiting to prevent abuse
  • Admin capability checks

Configuration (Optional)

After activation, you can customize settings:

Navigate to Settings > Light Views Counter
With Foxiz Theme: Navigate to Foxiz Admin > Light Views Counter

The plugin features a modern admin interface with toast notifications, and organized sections.

Available Settings:

Easily customize how Light Views Counter works on your site. Every option is designed to give you full control while keeping things fast, and easy to manage.

Tracking Settings:

  • Scroll Threshold (default: 50%) – How far users must scroll before counting a view
  • Time Window (default: 1800 seconds / 30 minutes) – Prevents duplicate counts from same user
  • Supported Post Types (default: Posts) – Select which post types to track (Posts, Pages, Custom Types)
  • Fast Mode (default: Enabled) – Uses sendBeacon API for maximum performance

Performance Settings:

  • Enable Caching (default: Enabled) – Cache view counts for better performance
  • Cache Duration (default: 300 seconds / 5 minutes) – How long to cache data
  • Query Method (default: Subquery) – Choose Subquery (<100k posts) or JOIN (100k+ posts) for orderby queries

Display Settings:

  • Show Views on Content (default: Disabled) – Auto-display view count at end of posts

API Settings:

  • Enable GET Endpoint (default: Disabled) – Allow public REST API access to view counts

Getting Started

  1. Verify Tracking – Visit any post on your site, scroll down, then check the admin dashboard statistics
  2. Add Widgets – Go to Appearance > Widgets and add “Popular Posts (Light Views Counter)”
  3. View Statistics – Check the Views column in your Posts list (admin area)

That’s it! Your site is now tracking post views intelligently.

๐Ÿ’ป For Developers

Light Views Counter provides a complete developer toolkit:

PHP Functions:

  • lightvc_get_post_views( $post_id )
  • lightvc_get_popular_posts( $args )

WP_Query Integration:

  • 'orderby' => 'lightvc_views'

Hooks & Filters:

  • lightvc_post_views_count
  • lightvc_views_html
  • lightvc_exclude_user
  • lightvc_views_counted

REST API:

  • GET /wp-json/lightvc/v1/views/{id}
  • POST /wp-json/lightvc/v1/count

๐Ÿ”— Useful Links

Screenshots

  • Image
    Global Settings
  • Image
    View Statistics
  • Image
    Tools
  • Image
    Usages

Installation

Automatic Installation (Recommended)

  1. Log in to your WordPress admin dashboard
  2. Navigate to Plugins > Add New
  3. Search for “Light Views Counter”
  4. Click Install Now button
  5. Click Activate button
  6. Done! The plugin starts tracking views immediately

Manual Installation

  1. Download the plugin ZIP file
  2. Log in to your WordPress admin dashboard
  3. Navigate to Plugins > Add New > Upload Plugin
  4. Click Choose File and select the downloaded ZIP file
  5. Click Install Now
  6. Click Activate Plugin

๐Ÿ”„ Migrate from Post Views Counter

Switching from the Post Views Counter plugin? No worries, you can easily bring all your existing view data into Light Views Counter.

Just go to Tools Migrate from Post Views Counter Plugin and start the migration with a single click.

FAQ

Will this plugin slow down my website?

Absolutely not! Light Views Counter is designed for zero performance impact:

  • View counting happens asynchronously after page load
  • Uses sendBeacon API for fire-and-forget requests
  • Scripts only load on single posts/pages (not on homepage or archives)
  • Built-in caching reduces database load
  • Tested on high-traffic sites with millions of views

Your visitors won’t notice any difference in page load speed.

Is this plugin GDPR compliant?

Yes, 100% GDPR compliant! Light Views Counter:

No privacy policy update needed.

Does it work with caching plugins?

Yes! Light Views Counter is specifically designed to work with all major caching plugins:

  • WP Rocket
  • W3 Total Cache
  • WP Super Cache
  • LiteSpeed Cache
  • Autoptimize
  • Cloudflare

View counting uses REST API which automatically bypasses page cache.

How does the smart counting work?

Light Views Counter uses intelligent scroll detection:

For long posts:

  • Waits until visitor scrolls to threshold (default: 50%)
  • Confirms visitor is actually reading content
  • Filters out bots and accidental clicks

For short posts:

  • Automatically detects content fits in viewport
  • Counts after 1 seconds (confirms visitor sees content)
  • No need to wait for scroll that won’t happen

This ensures only genuine engagement is counted.

Why are my view counts lower than other analytics?

This is actually a good thing! Here’s why:

Light Views Counter counts: Real engagement (people who actually read)
Google Analytics counts: Every page load (including bounces, bots, accidental clicks)

Lower, more accurate numbers give you true insights into content performance.

Will it count the same visitor multiple times?

Not within the configured time window (default: 1800 seconds / 30 minutes):

  • Uses localStorage to remember recently viewed posts
  • Prevents counting page refreshes and back-button clicks
  • Configurable time window in settings (in seconds)
  • Respects user privacy (no cookies)

This gives you accurate unique views per time period.

Does it count bot traffic?

No! Bots are automatically filtered. Your view counts reflect real human readers only.

How do I display view counts?

You have 4 flexible options:

1. Shortcode (easiest):
[lightvc_post_views] – Add anywhere in post content

2. Automatic display:
Enable in Settings > Light Views Counter

3. PHP function:

  • lightvc_get_post_views( $post_id )
  • lightvc_get_popular_posts( $args )

4. Widgets:
Use Popular Posts widget in sidebars

How do I add a Popular Posts widget?

For WordPress:

  1. Go to Appearance > Widgets
  2. Drag “Popular Posts (Light Views Counter)” to widget area
  3. Configure options and save

For Elementor:

  1. Edit page with Elementor
  2. Search for “Popular Posts (Light Views Counter)”
  3. Drag widget to desired location

Can I show popular posts from specific time?

Yes! Both widgets support:

  • All time
  • Last 7 days
  • Last 15 days
  • Last 30 days

Perfect for displaying โ€œRecent Trendingโ€ and โ€œAll-Time Popularโ€ sections.

Is there a suite for WordPress theme developers?

Yes! Comprehensive developer functions are available for all WordPress theme development needs.

What happens when I deactivate or delete the plugin?

  • Deactivation: View data is preserved, tracking stops temporarily
  • Deletion: All plugin data (including view counts) is permanently removed from database

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Light Views Counter โ€“ Fast, Scalable View Counter for High-Traffic Sites” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.0

Initial Release