This guide helps you configure Post Views Counter Pro for optimal performance on cached WordPress sites. Fast AJAX delivers view counting up to 10 times faster than JavaScript Mode or REST API Mode. Combined with object caching support and caching plugin compatibility, these features ensure accurate tracking without compromising site speed.
Prerequisites
Before configuring performance optimization, ensure the following:
- Post Views Counter Pro installed and activated with a valid license
- WordPress 6.3 or higher running on your site
- Caching plugin or server-side caching configured (recommended but not required)
- Redis or Memcached available on your server (required only for Object Cache Support)
- Tracking targets configured at Post Views > Counting > Tracking Targets
Steps
Enable Fast AJAX
-
Navigate to Counter Mode settings
Go to Post Views > Counting > Tracking Behavior > Counter Mode.
-
Select Fast AJAX
Choose Fast AJAX from the available counter modes:
- PHP Mode
- JavaScript Mode
- REST API Mode
- Fast AJAX
Fast AJAX is designed specifically for cached environments where traditional tracking methods may not work correctly. This option uses an optimized AJAX endpoint that bypasses the heavier REST API infrastructure, resulting in significantly faster tracking requests.
-
Configure data storage method
At Post Views > Counting > Tracking Behavior > Data Storage, select your preferred storage method:
- Cookies: Stores tracking data using browser cookies
- Cookieless: Stores tracking data without cookies (better for GDPR compliance)
-
Set count interval
At Post Views > Counting > Tracking Behavior > Count Interval, configure the minimum time between counting new views from the same visitor. The default is 24 hours. Enter 0 to count every page view. Available units include minutes, hours, days, weeks, months, and years.
-
Enable strict counts (optional)
At Post Views > Counting > Tracking Behavior > Strict Counts, enable this option to prevent visitors from bypassing the count interval through incognito mode or by clearing cookies.
Enable Caching Plugin Compatibility
-
Navigate to Performance & Caching settings
Go to Post Views > Counting > Performance & Caching.
-
Enable Caching Compatibility
At Post Views > Counting > Performance & Caching > Caching Compatibility, enable this option if you use a supported caching plugin. This ensures the plugin applies compatibility tweaks for accurate tracking in cached environments.
Configure Object Cache Support
-
Enable Object Cache Support
At Post Views > Counting > Performance & Caching > Object Cache Support, enable this option if your server uses Redis or Memcached object caching. This optimizes tracking performance by leveraging your existing object cache infrastructure.
-
Save settings
Click Save Changes to apply your configuration.
Verification
Confirm your performance optimization settings are working correctly:
-
Verify Counter Mode — Return to Post Views > Counting > Tracking Behavior > Counter Mode and confirm Fast AJAX is selected.
-
Test view counting — Visit a tracked post type as an incognito or logged-out user. Check if the view count increments in the admin dashboard or post list.
-
Monitor request performance — Use browser developer tools (Network tab) to verify that tracking requests complete quickly. Fast AJAX requests should be significantly faster than standard REST API calls.
-
Verify caching compatibility — Clear your site cache, then visit multiple pages. Confirm view counts increment correctly without cache-related delays.
-
Check object cache integration — If using Redis or Memcached, monitor your object cache statistics to confirm Post Views Counter is utilizing the cache for tracking data.
Troubleshooting
Views not counting with Fast AJAX
Symptom: Page views are not being recorded despite Fast AJAX being enabled.
Cause: Caching plugin may be caching the tracking response, or visitor exclusion rules are active.
Fix:
- Verify Caching Compatibility is enabled at Post Views > Counting > Performance & Caching
- Check exclusion settings at Post Views > Counting > Visitor Exclusions to ensure you are not excluded from tracking
- Clear all caches after enabling Fast AJAX
- Confirm your caching plugin is on the list of supported plugins
Counts incrementing multiple times per visitor
Symptom: Same visitor triggers multiple view counts in quick succession.
Cause: Count Interval is set too low, or cookies are not persisting correctly.
Fix:
- Increase the Count Interval at Post Views > Counting > Tracking Behavior
- If using cookieless storage, verify your server configuration supports the tracking method
- Enable Strict Counts at Post Views > Counting > Tracking Behavior to prevent interval bypass through incognito mode or cookie clearing
Object Cache Support not improving performance
Symptom: Enabling Object Cache Support shows no performance improvement.
Cause: Object cache is not properly configured on the server, or the caching backend is unavailable.
Fix:
- Verify Redis or Memcached is installed and running on your server
- Check your WordPress object cache configuration in wp-config.php
- Confirm your hosting provider supports object caching
- Test object cache connectivity using a plugin health check tool
Views counting for excluded visitors
Symptom: Views are counted for visitors that should be excluded (bots, logged-in users, specific IPs).
Cause: Exclusion rules are not properly configured.
Fix:
- Review Exclude Visitors at Post Views > Counting > Visitor Exclusions and select appropriate groups (crawlers, AI bots, logged in users, guests, selected user roles)
- Check Exclude User Roles to ensure specific roles are selected
- Verify IP addresses are entered correctly at Exclude IPs (one IP per line)
Caching plugin conflicts
Symptom: View counts do not update, or counts are inconsistent across page loads.
Cause: Caching plugin is aggressively caching tracking responses or dynamic content.
Fix:
- Ensure Caching Compatibility is enabled at Post Views > Counting > Performance & Caching
- Check if Dynamic Loading is enabled at Post Views > Display > Counter Appearance to prevent cached count values from displaying
- Configure your caching plugin to exclude Post Views Counter endpoints from caching
- Clear all plugin and server-side caches after configuration changes
Fast AJAX not appearing as an option
Symptom: Fast AJAX counter mode is not visible in the Counter Mode settings.
Cause: Fast AJAX is a Pro-only feature.
Fix:
- Verify that Post Views Counter Pro is installed and activated
- Confirm your license key is valid at Post Views > Other > Plugin Status
- If using Lite, upgrade to Pro to access Fast AJAX and other performance features
