WP-Piwik is a WordPress plugin which integrates Piwik and WordPress. By using the Piwik API, WP-Piwik is able to include a summary statistics page to your WordPress dashboard as shown below:
In addition to including your traffic stats, WP-Piwik can add the Piwik tracking code to your WordPress blog and even manage your WordPress network in Piwik:
In this blog post I explain how you can configure WP-Piwik to get great Web Analytics for your wordpress website(s) or for your entire network of sites automatically. But first you need your Piwik server URL and your auth token.
The Piwik URL is the same URL you use to access your Piwik, e.g. http://demo.piwik.org is the demo site’s Piwik URL. Your auth token is some kind of a secret password, which allows WP-Piwik to fetch the necessary data from Piwik. To get your super user auth token, just click on the API link in your Piwik dashboard:
The token is stated in the box behind “&token_auth=” (the demo site’s super user auth token is “anonymous”, but yours should look like a string of letters and numbers):
Alternatively you can use a user account’s auth token (see Settings → Users) to restrict the plugin’s access to Piwik:
Keep in mind WP-Piwik needs more than view access to create new sites (admin user, or Super User token). If you use an auth token restricted to view access, you have to add your sites to Piwik manually.
Now you got all the information you need to configure WP-Piwik, next choose your type of use:
- 1) I just want to integrate Piwik and my single blog.
- 2) I want to allow my WordPress network’s users to track their blog using their own Piwik setup.
- 3) I want to provide an all-inclusive solution to my WordPress network’s users.
Put WP-Piwik into your plugins directory and activate it using your Plugins page. Now open the settings page (Settings → WP-Piwik) and enter your Piwik path and auth token:
After saving your settings, WP-Piwik will automatically determine your site by its URL. If the site does not exist, WP-Piwik will create a new site – assumed that your auth token is not restricted to view access.
You want WP-Piwik to add the tracking code automatically? Open the Tracking tab and activate the Add tracking code option. That’s all!
If you operate a WordPress network and like to allow all your users to configure WP-Piwik with their own Piwik instance as described before, you have to install WP-Piwik as a site specific plugin. Put WP-Piwik into your plugins folder, but don’t activate it as a network plugin. Instead enable the Plugins page for individual site administrators from the Network Admin’s Settings → Network Settings menu:
Now each site admin is able to activate and configure WP-Piwik on his own.
To run WP-Piwik as a fully automated feature of your WordPress network using a common Piwik instance you can activate it as a so-called network plugin. Put WP-Piwik in your plugins directory and activate it using the Network Admin’s plugin settings:
Now you can configure WP-Piwik as described before, but you have to access WP-Piwik’s settings via Network Admin’s settings. All users can access their own statistics while the network admin is allowed to see all stats. (Please keep in mind WP-Piwik needs more than view access to create new network sites in Piwik automatically.)
Get Support for WP-Piwik
To get support or further information: