core23/piwik-bundle

This package is abandoned and no longer maintained. The author suggests using the core23/matomo-bundle package instead.

This bundle provides a block service for using Matomo/Piwik inside the sonata-project.

Maintainers

👁 core23

Package info

github.com/core23/PiwikBundle

Homepage

Type:symfony-bundle

pkg:composer/core23/piwik-bundle

Statistics

Installs: 69

Dependents: 0

Suggesters: 0

Stars: 0

2.0.0 2017-09-14 08:05 UTC

Suggests

Provides

None

Conflicts

None

Replaces

None

MIT 2bb3650ada97313d9fb6fed45e250d0e9388e214

  • Christian Gripp <mail.woop@core23.de>

symfonysonatabundlepiwikblockstatisticwidget

This package is not auto-updated.

Last update: 2022-02-01 12:52:26 UTC


README

⚠️ This package is not maintained anymore. ⚠️

Use the MatomoBundle instead.

👁 Latest Stable Version
👁 Latest Unstable Version
👁 License

👁 Total Downloads
👁 Monthly Downloads
👁 Daily Downloads

👁 Build Status
👁 Scrutinizer Code Quality
👁 Code Climate
👁 Coverage Status

👁 Donate to this project using Flattr
👁 Donate to this project using PayPal

This bundle provides a wrapper for using the matomo (Piwik) statistic inside the symfony sonata-project.

Installation

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

composer require core23/piwik-bundle
composer require php-http/guzzle6-adapter # if you want to use Guzzle

Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in bundles.php file of your project:

// config/bundles.php

return [
 // ...
 Http\HttplugBundle\HttplugBundle::class => ['all' => true],
 Core23\PiwikBundle\Core23PiwikBundle::class => ['all' => true],
];

Usage

Define a HTTPlug client in your configuration.

# config/packages/httplug.yaml

httplug:
 classes:
 client: Http\Adapter\Guzzle6\Client
 message_factory: Http\Message\MessageFactory\GuzzleMessageFactory
 uri_factory: Http\Message\UriFactory\GuzzleUriFactory
 stream_factory: Http\Message\StreamFactory\GuzzleStreamFactory
{# template.twig #}

{{ sonata_block_render({ 'type': 'core23_piwik.block.statistic' }, {
 'host': 'http://matomo.example.com',
 'site': 1,
 'token': 'MATOMO_API_TOKEN'
}) }}

License

This bundle is under the MIT license.