2017 © Pedro Peláez
 

library piwik-client

Simple client for Piwik (web analytics) API.

image

tzi/piwik-client

Simple client for Piwik (web analytics) API.

  • Thursday, October 13, 2016
  • by tzi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

PiwikClient

PHP 5.3 client for Piwik web analytics., (*1)

To see all available methods & their parameters, visit Piwik API Reference., (*2)

Usage

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

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

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

"require": {
        ...
        "knplabs/knp-piwik-client": "dev-master"
},

PiwikClient is released under the MIT License. See the bundled LICENSE file for details., (*4)

The Versions

13/10 2016

dev-master

9999999-dev https://github.com/tzi/PiwikClient

Simple client for Piwik (web analytics) API.

  Sources   Download

MIT

The Requires

 

analytics piwik

13/10 2016

v1.1

1.1.0.0 https://github.com/tzi/PiwikClient

Simple client for Piwik (web analytics) API.

  Sources   Download

MIT

The Requires

 

analytics piwik