Displaying Piwik Post-Views on front-end associated posts


I was wondering whether it would be possible to include certain data gathered from Piwik and display it on the relevant pages on the front-end of a website (including archive pages and the homepage which have mulitple post thumbnails/excerpts displayed)?

Currently I’m managing a high-traffic wordpress powered website that makes use of Varnish cache and looking for an accurate way to display the number of hits each post has received and as Piwik as automatically gathering this data I was thinking this would be the best data to display?

All pages are purged from the cache every 12 hours, so it would be fine to update the post views or ‘hits’ upon each purge.

I’m aware that Piwik has an API call function but I’m not sure if it’s possible to match up the pages on WP with their associated analytics page-views from Piwik?

I’ve looked into many different plugins for displaying post views but each use either AJAX calls (which really slow down the site) or are otherwise not compatible with reverse caching systems, personally I’d rather be able to do it via Piwik if possible.

Thanks in advance to anyone who can offer some assistance,


I have installed piwik in my server and now I want to get the details in my website from end so that user can view it. My site is created in core php and its an online news paper Bangladesh. Can anyonle help me about it?


livefree@ I think it may be easier to use a wordpress plugin, but you should be able get the data from the PHP API
physiopavel@ you can do this with anonymous profile and a link in your footer. Please do not hijack threads the next time :slight_smile: