Title: [Plugin: WP Super Cache] Hook for statistics plugin?
Last modified: August 19, 2016

---

# [Plugin: WP Super Cache] Hook for statistics plugin?

 *  [cywhale](https://wordpress.org/support/users/cywhale/)
 * (@cywhale)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-hook-for-statistics-plugin/)
 * Hello.
    For one of the next versions of [CyStats](http://wordpress.org/extend/plugins/cystats/)(
   a WP statistics plugin) i intended to implement wp-super-cache compatibility.
   Right now CyStats uses the WordPress init-Hook for collecting and saving data,
   resulting in no data at all if wp-super-cache is used and enabled.
 * Is there any hook which could be used for collecting data ($_SERVER[], WordPress
   post/page IDs,…) and saving it ($wpdb-…) which is usable if wp-super-cache is
   enabled?
    The only solution i found is using a javascript-snippet (embedded in
   the requested pages/posts)+external script to collect and save data but javascript
   is the one ‘feature’ i tried to avoid completely…
 * Greets
    Michael

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-hook-for-statistics-plugin/#post-837773)
 * Use a fake stylesheet LINK tag as a trigger instead of javascript. Works just
   as well, doesn’t have the same problems as javascript. As long as you return 
   a blank file to the browser from that hit, the browser won’t be affected in any
   major way.
 * Make sure that you return proper no-cache headers on the blank response, so that
   the hits are recorded correctly and the browser doesn’t cache it.
 *  Thread Starter [cywhale](https://wordpress.org/support/users/cywhale/)
 * (@cywhale)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-hook-for-statistics-plugin/#post-837779)
 * Hm. Thanky you. So there is absolutely no way to use an internal hook?
 * Just tested add_action(‘add_cacheaction’,’cystats_logger’); (the hook mentioned
   at the wp-super-cache additional notes) instead of using ‘init’-hook but did 
   not receive any reaction of cystats.
 * Tried to avoid external scripts – does a stylesheet link with parameters like?
   pageid=1&bla=blub&blub=bla… validate? Referer-stats wouldn’t be possible, too.
 *  Thread Starter [cywhale](https://wordpress.org/support/users/cywhale/)
 * (@cywhale)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-hook-for-statistics-plugin/#post-837849)
 * No way, knowing the cache mechanisms now – only an external script would be able
   to track statistics data. Thank you very much.
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-hook-for-statistics-plugin/#post-837892)
 * There’s no way to hook when using “super cache”, because it’s never actually 
   running any PHP code. But if you turn that off and just use the normal wp-cache
   mechanism, you can hook there.
 *  Thread Starter [cywhale](https://wordpress.org/support/users/cywhale/)
 * (@cywhale)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-hook-for-statistics-plugin/#post-837895)
 * Yes, thank you – thats what i found out when after deactivating wpsc wordpress
   still delivered the cached page via the wpsc .htaccess 🙂
 *  [bobkumar](https://wordpress.org/support/users/bobkumar/)
 * (@bobkumar)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-hook-for-statistics-plugin/#post-837949)
 * Not sure if this is the best place to post this, but I am looking for a clean
   way of refreshing the cache in WordPress via a CRON job (daily)…I have a custom
   site developed where content is published to the site directly to the database
   daily and need to refresh the cache daily to get it working properly.
 * Anyone know how I can do this for WP 2.5+

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘[Plugin: WP Super Cache] Hook for statistics plugin?’ is closed to new
replies.

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 6 replies
 * 3 participants
 * Last reply from: [bobkumar](https://wordpress.org/support/users/bobkumar/)
 * Last activity: [17 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-hook-for-statistics-plugin/#post-837949)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
