Skip to content

v1.3.1 - Cache Compatibility Fix

Latest

Choose a tag to compare

@JensS JensS released this 05 Feb 10:08

Bug Fixes

  • Fixed tracking on cached pages - Pages served from PHP-level cache (WP Super Cache, W3TC, etc.) are now correctly tracked via JS fallback. The old boolean flag could be cached in HTML, causing subsequent visitors to go untracked.

  • Added deduplication - Prevents duplicate pageviews within a 30-second window using transient-based deduplication on both server-side tracker and REST API.

  • Fixed duplicate array keys - Cleaned up redundant entries in REST API data handling.

Technical Details

Changed cache detection from a simple window.sa_tracked = true boolean to a timestamp-based signature (window.sa_sig). JavaScript now checks if the signature is within 10 seconds of current time to determine if PHP actually tracked the current request vs. serving stale cached HTML.

Upgrade

This is a recommended update for all users, especially those using page caching plugins.