prg / piwik-bundle
Symfony bundle for querying the piwik reporting api
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Type:symfony-bundle
Requires
- php: >=5.3.2
- guzzlehttp/guzzle: 4.*
- symfony/symfony: >=2.1
This package is not auto-updated.
Last update: 2024-12-17 09:07:07 UTC
README
Wrapper to call the Piwik Reporting API
Installation:
Run composer. Then add:
$bundles = array( new CiscoSystems\PiwikBundle\CiscoSystemsPiwikBundle(), );
Setup:
Add and adapt to your need the following to the app/config/config.yml
file:
cisco_systems_piwik: url: http://piwik.demo-site.com token: anonymous site_id: 1 format: json
Usage:
Call the service cisco.piwik.client
.
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) ).
$client = $this->container->get( 'cisco.piwik.client' ); $client->setLanguage('en');
Then load the desired module:
$visitsSummary = $client->getModule( 'VisitsSummary' );
Finally call the Method to get the data back:
return $visitsSummary->getVisits();