I'm thinking about hosting a WordPress website with agressive caching/optimization strategies (like varnish, microcache, ngx_pagespeed, etc). But I still want Jetpack stats to work alright.

What should I pay attention to? How does jetpack-stats count visits?

  • tracking images?
  • AJAX calls?
  • internal WP hooks?

Depending on its strategy, I'd probably have to tweak my cache configuration...


Let me quote what's mentioned in the official FAQ of WordPress.com Stats plugin (JetPack statistics module uses this plugin as the base)...

The plugin collects stats via a javascript call, so as long as the JS call is on the page stats will be collected just fine, whether the page is cached or not.

In short, you don't have to worry about JetPack stats. It works irrespective of the caching layer/s used.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.