core23/matomo-bundle

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

This bundle provides a block service for using Matomo inside symfony applications.

Maintainers

👁 core23

Package info

github.com/nucleos/NucleosMatomoBundle

Homepage

Type:symfony-bundle

pkg:composer/core23/matomo-bundle

Statistics

Installs: 331

Dependents: 0

Suggesters: 0

Stars: 6

Open Issues: 3

4.4.0 2026-05-02 18:24 UTC

Requires

Requires (Dev)

Suggests

Provides

None

Conflicts

None

Replaces

None

MIT 6220a9448e0d268da87731af3ea73378da127f86

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

symfonysonatabundlepiwikblockstatisticwidgetmatomosonata-blocksymfony-ux


README

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

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 nucleos/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 [
 // ...
 Nucleos\MatomoBundle\NucleosMatomoBundle::class => ['all' => true],
];

Assets

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:

Usage

Define a http client in your configuration.

# config/packages/nucleos_matomo.yaml

nucleos_matomo:
 http:
 client: 'httplug.client'
 message_factory: 'nyholm.psr7.psr17_factory'

Render tracking code

{{ sonata_block_render({ 'type': 'nucleos_matomo.block.tracker' }, {
 'host': 'http://matomo.example.com',
 'site': 1
}) }}

Render statistic graph

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

License

This bundle is under the MIT license.