dev-master
9999999-devSymfony bundle for querying the piwik reporting api
MIT
The Requires
- php >=5.3.2
- symfony/symfony >=2.1
- guzzlehttp/guzzle 4.*
by Thomas Roche
api analytics piwik reporting
Symfony bundle for querying the piwik reporting api
Run composer. Then add: ``` PHP $bundles = array( new CiscoSystems\PiwikBundle\CiscoSystemsPiwikBundle(), );, (*1)
Setup: ====== Add and adapt to your need the following to the ```app/config/config.yml``` file: ``` YML cisco_systems_piwik: url: http://piwik.demo-site.com token: anonymous site_id: 1 format: json
Call the service cisco.piwik.client
., (*2)
Assign the variable you would normally use if you were to query the API directly (see [the reporting API] (http://developer.piwik.org/api-reference/reporting-api) )., (*3)
``` php $client = $this->container->get( 'cisco.piwik.client' ); $client->setLanguage('en');, (*4)
Then load the desired module: ``` php $visitsSummary = $client->getModule( 'VisitsSummary' );
Finally call the Method to get the data back:, (*5)
php
return $visitsSummary->getVisits();
, (*6)
Symfony bundle for querying the piwik reporting api
MIT
api analytics piwik reporting