WP-Piwik: Tracking using the HTTP API instead of JS?


I am running a Wordpress Blog and would like to use the WP-Piwik plugin to track the page. Piwik is running on the same server and it was no problem to connect the plugin to Piwik using the “Self-hosted (PHP API)” option.

However I was quite surprised that there seems to be no option to use such a “direct” connection for tracking as well. There are different options to activate the tracking but all of them use the default JS script which is places somewhere within the pages and sends the tracking request to Piwik.

Is there no option to use the PHP / HTTP API for tracking instead? I prefer these APIs since it seems to be much “cleaner”. Why should communication be routed over some JS Script if the Plugin could talk to Piwik on the same server directly? The Piwik URL is not exposed to the visitors.

Is it possible to use these trackings APIs with the Plugin?

The major reason to use the JS API is for Action tracking. You can track all kinds of actions including clicks, scrolling etc that you just cannot do with the PHP API. Seeing as most web sites today use some kind of JS library (We use Sencha) this is the best way of tracking users and their actions.

Thank you very much for your feedback. I see your point. However, following your argument, you could completely drop the other tracking APIs since JS is simply the best…

I do not track actions and from my point of view the HTTPS API is the preferred solution. Wouldn’t it make sense to integrate these tracking APIs as well and let the user decide?

Piwik provides a number of ways of using a HTTP API. You can DIY with the Tracking API or use a Tracking API Client like the PHP Client.

You can also Import your web server logs.

Yes I know this. In fact I have already manually integrated the HTTP API into a Symfony based project. But the question was about the WP-Piwik plugin, which allows a simple and convenient connection between a Wordpress blog and Piwik installation with just a few clicks. Why does this plugin only supports the JS API?

I understand that using JS has some advantages in some cases and that other APIs can be used manually. But HTTP API has advantages in other cases, and I just wanted to know, if/why the plugin does not support this API.

Since the HTTP API is currently not supported by the plugin I would suggest this as a feature request.

Since the HTTP API is currently not supported by the plugin I would suggest this as a feature request.

please submit your feature request to the project WP-Piwik directly (in the WP-Piwik foruM) as here is not the right place for it. Cheers