PHPackages                             knplabs/knp-piwik-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. knplabs/knp-piwik-client

AbandonedArchivedLibrary[API Development](/categories/api)

knplabs/knp-piwik-client
========================

Simple client for Piwik (web analytics) API.

v1.0(12y ago)1910.9k↓53.3%8[1 issues](https://github.com/KnpLabs/PiwikClient/issues)MITPHPPHP &gt;=5.3.0

Since Nov 12Pushed 12y ago8 watchersCompare

[ Source](https://github.com/KnpLabs/PiwikClient)[ Packagist](https://packagist.org/packages/knplabs/knp-piwik-client)[ Docs](http://github.com/KnpLabs/PiwikClient)[ RSS](/packages/knplabs-knp-piwik-client/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Not actively maintained
-----------------------

[](#not-actively-maintained)

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

PiwikClient
===========

[](#piwikclient)

PHP 5.3 client for [Piwik](http://piwik.org/) web analytics.

To see all available methods &amp; their parameters, visit [Piwik API Reference](http://piwik.org/docs/analytics-api/reference/).

Usage
-----

[](#usage)

### Through HTTP connection

[](#through-http-connection)

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

// Instantiate piwik client
$connection = new HttpConnection('http://demo.piwik.org');
$client = new Client($connection, 'YOUR_API_TOKEN');

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

### Through local (PHP) connection

[](#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";
Piwik_FrontController::getInstance()->init();

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

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

Installation
------------

[](#installation)

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.*"
},
```

Copyright
---------

[](#copyright)

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

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4616d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/202732?v=4)[KNP Labs](/maintainers/KnpLabs)[@KnpLabs](https://github.com/KnpLabs)

---

Top Contributors

[![everzet](https://avatars.githubusercontent.com/u/30813?v=4)](https://github.com/everzet "everzet (8 commits)")[![tzi](https://avatars.githubusercontent.com/u/415891?v=4)](https://github.com/tzi "tzi (7 commits)")[![inoryy](https://avatars.githubusercontent.com/u/195271?v=4)](https://github.com/inoryy "inoryy (5 commits)")[![docteurklein](https://avatars.githubusercontent.com/u/109846?v=4)](https://github.com/docteurklein "docteurklein (5 commits)")[![l3pp4rd](https://avatars.githubusercontent.com/u/132389?v=4)](https://github.com/l3pp4rd "l3pp4rd (1 commits)")[![mbontemps](https://avatars.githubusercontent.com/u/231249?v=4)](https://github.com/mbontemps "mbontemps (1 commits)")[![stloyd](https://avatars.githubusercontent.com/u/67402?v=4)](https://github.com/stloyd "stloyd (1 commits)")

---

Tags

knpknplabspiwikanalytics

### Embed Badge

![Health badge](/badges/knplabs-knp-piwik-client/health.svg)

```
[![Health](https://phpackages.com/badges/knplabs-knp-piwik-client/health.svg)](https://phpackages.com/packages/knplabs-knp-piwik-client)
```

###  Alternatives

[matomo/matomo-php-tracker

PHP Client for Matomo Analytics Tracking API

2213.7M37](/packages/matomo-matomo-php-tracker)[irazasyed/laravel-gamp

Send analytics data to Google Analytics from Laravel. A package for GA Measurement Protocol API

3351.6M1](/packages/irazasyed-laravel-gamp)[keen-io/keen-io

A PHP library for reporting events to the Keen IO API

1362.4M7](/packages/keen-io-keen-io)[ins0/google-measurement-php-client

Server-Side PHP Client to communicate to Google Analytics over the Google Measurement Protocol

54360.1k2](/packages/ins0-google-measurement-php-client)[alexwestergaard/php-ga4

PHP Library for Google Analytics 4 with Server Side Tagging

64160.0k2](/packages/alexwestergaard-php-ga4)[fourlabs/gamp-bundle

Google Analytics Measurement Protocol bundle for Symfony

31433.2k](/packages/fourlabs-gamp-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
