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

Installs: 213

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 0


2.3.0 2019-11-18 22:21 UTC

This package is auto-updated.

Last update: 2020-03-24 21:33:59 UTC


Latest Stable Version Latest Unstable Version License

Total Downloads Monthly Downloads Daily Downloads

Continuous Integration Code Coverage

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


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/matomo-bundle
# To define a default http client and message factory
composer require symfony/http-client nyholm/psr7

Enable the Bundle

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

// config/bundles.php

return [
    // ...
    Core23\MatomoBundle\Core23MatomoBundle::class => ['all' => true],


It is recommended to use webpack / webpack-encore to include the MatomoTable.js file in your page. These file is located in the assets folder.

You can use npm or yarn to load the library:


Define a http client in your configuration.

# config/packages/core23_matomo.yaml

        client: 'httplug.client'
        message_factory: 'nyholm.psr7.psr17_factory'
{# template.twig #}

{{ sonata_block_render({ 'type': 'core23_matomo.block.statistic' }, {
    'host': '',
    'site': 1,
    'token': 'MATOMO_API_TOKEN'
}) }}


This bundle is under the MIT license.