Skip to content
Service class to use the Piwik API
Find file



Use the Zend_Service_Piwik-component to query your Piwik-Installation via the API.

Basic usage:

$piwik = new Zend_Service_Piwik();

$pageTitles = $piwik->Actions()->getPageTitles();

echo $pageTitles;

$pageTitles contains the relevant information and can be processed further if needed.

Configuration using Zend_Config

Alternativly you can pass an Zend_Config-object to set the options.

host = ''
tokenauth = 'anonymous'
idsite = 7
format = 'json'
date = 'previous7'
$configFile = '/path/to/ini';
$config = new Zend_Config_Ini($configFile, 'piwik');

$piwik = new Zend_Service_Piwik($config);
Something went wrong with that request. Please try again.