PHPackages                             tzi/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. tzi/piwik-client

ActiveLibrary[API Development](/categories/api)

tzi/piwik-client
================

Simple client for Piwik (web analytics) API.

v1.1(9y ago)015MITPHPPHP &gt;=5.3.0

Since Oct 13Pushed 9y ago1 watchersCompare

[ Source](https://github.com/tzi/PiwikClient)[ Packagist](https://packagist.org/packages/tzi/piwik-client)[ Docs](https://github.com/tzi/PiwikClient)[ RSS](/packages/tzi-piwik-client/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

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": "dev-master"
},
```

Copyright
---------

[](#copyright)

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

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community13

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

3497d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1dd01ef560c81cff6d288330b80a88f6728cf4f2b6fc6f5ab19dacde2f1cda06?d=identicon)[tzi](/maintainers/tzi)

---

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 (8 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

piwikanalytics

### Embed Badge

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

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

###  Alternatives

[irazasyed/laravel-gamp

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

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

A PHP library for reporting events to the Keen IO API

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

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

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

PHP Library for Google Analytics 4 with Server Side Tagging

63144.7k1](/packages/alexwestergaard-php-ga4)[mediafigaro/google-analytics-api-symfony

Google Analytics API v4 Symfony

46177.7k](/packages/mediafigaro-google-analytics-api-symfony)[keen-io/keen-io-bundle

Symfony Bundle for Keen IO

16488.5k](/packages/keen-io-keen-io-bundle)

PHPackages © 2026

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