Skip to content

chmielot/Zend_Service_Piwik

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Zend_Service_Piwik

Synopsis:

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

Basic usage:

$piwik = new Zend_Service_Piwik();
$piwik->setHost('http://demo.piwik.org')
      ->setAuthToken('anonymous')
      ->setIdSite(7)
      ->setFormat(Zend_Service_Piwik::FORMAT_JSON)
      ->setDate('previous7');

$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.

[piwik]
host = 'http://demo.piwik.org'
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);

About

Service class to use the Piwik API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published