Optimize Plugin Performance

Fine-tune Customer History for maximum speed and efficiency without sacrificing functionality.

Tracking Optimization

Asynchronous Tracking

Enable non-blocking tracking:

  • Tracking JavaScript loads asynchronously
  • Doesn’t delay page rendering
  • Data sent in background requests
  • No impact on page load times

Already enabled by default.

Tracking Frequency

Adjust how often data is sent:

  • Real-time: Every page view (default)
  • Batched: Every 5-10 page views
  • Session End: When visitor leaves

Batched mode reduces server requests but delays data availability.

Database Optimization

Query Caching

Enable query result caching:

  • Cache dashboard statistics for 5 minutes
  • Cache customer lists for 1 minute
  • Cache analytics for 15 minutes
  • Reduces database load significantly

Enable at: Settings → Performance → Query Cache

Index Optimization

Ensure proper database indexes:

  • Run index check monthly
  • Add missing indexes automatically
  • Remove unused indexes
  • Speeds up common queries

Table Partitioning

For large databases (1M+ sessions):

  • Partition by month
  • Faster queries on recent data
  • Easier archival

Contact support for setup assistance.

Frontend Performance

Minimize JavaScript

Tracking script is already:

  • Minified (< 5KB)
  • Compressed with gzip
  • Cached for 30 days
  • Loaded asynchronously

Disable Unused Features

Turn off features you don’t use:

  • Live session monitoring
  • Search tracking
  • Referral system
  • Email campaigns

Each disabled feature reduces overhead.

Server Optimization

PHP Configuration

Recommended settings:

  • Memory Limit: 256MB minimum
  • Max Execution Time: 300 seconds
  • OPcache: Enabled
  • PHP Version: 8.0 or higher

Object Caching

Use Redis or Memcached:

  • Dramatically improves performance
  • Reduces database queries
  • Compatible with popular caching plugins

Caching Plugin Compatibility

Works with:

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

Tracking bypasses page cache automatically.

CDN Integration

Serve tracking script from CDN:

  1. Enable CDN option in settings
  2. JavaScript served from CDN
  3. Reduces server load
  4. Faster global delivery

Performance Monitoring

Monitor plugin impact:

  • Page Load Time: Track impact on speed
  • Database Queries: Count queries per page
  • Memory Usage: Track PHP memory
  • Server Load: Monitor CPU usage

View at: Customer History → Tools → Performance

Optimization Checklist

  1. ✓ Enable query caching
  2. ✓ Run database optimization monthly
  3. ✓ Archive old session data
  4. ✓ Disable unused features
  5. ✓ Use object caching if available
  6. ✓ Enable CDN for static files
  7. ✓ Keep PHP and WordPress updated
  8. ✓ Monitor performance metrics

When to Optimize

Optimize if you experience:

  • Slow dashboard loading
  • High database CPU usage
  • Memory limit errors
  • Timeout errors
  • Slow page loads on frontend