Skip to content
[UNMAINTAINED] Simple Piwik API client, written in PHP 5.3
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/Knp/PiwikClient fix CS Nov 12, 2013
tests fix CS Nov 12, 2013
LICENSE add a note about maintenance of the project Feb 28, 2014
composer.json Remove vendor from versioning, use composer for dependencies & autoload Nov 6, 2013
phpunit.xml.dist Change namespace from Knplabs to Knp Jul 9, 2011

Not actively maintained

This project is not actively maintained by KnpLabs. Please contact us if you would like to take over.


PHP 5.3 client for Piwik web analytics.

To see all available methods & their parameters, visit Piwik API Reference.


Through HTTP connection

use Knp\PiwikClient\Connection\HttpConnection;
use Knp\PiwikClient\Client;

// Instantiate piwik client
$connection = new HttpConnection('');
$client = new Client($connection, 'YOUR_API_TOKEN');

// Call piwik API
$array = $client->call('PLUGIN.METHOD', $parameters);

Through local (PHP) connection

use Knp\PiwikClient\Connection\PiwikConnection;
use Knp\PiwikClient\Client;

// Instantiate piwik
require_once PIWIK_INCLUDE_PATH . "/index.php";
require_once PIWIK_INCLUDE_PATH . "/core/API/Request.php";

// Instantiate piwik client
$connection = new PiwikConnection();
$client = new Client($connection, 'YOUR_API_TOKEN');

// Call piwik API
$array = $client->call('PLUGIN.METHOD', $parameters);


This library can be installed using composer by adding the following in the require section of your composer.json file:

"require": {
    "knplabs/knp-piwik-client": "1.*"


PiwikClient is released under the MIT License. See the bundled LICENSE file for details.

You can’t perform that action at this time.