Lists every event hook Matomo fires, with its arguments. For plugin development, never in production.
See every event hook Matomo dispatches, in which order and with which arguments, to find the right hook when you build a Matomo plugin.
Never install this plugin on a production instance. It is a development tool: it shows internal hook arguments (configuration values, visitor data, request parameters) and writes a log file on every request. HooksViewer stays idle unless Matomo runs in development mode.
core/ and plugins/ for Piwik::postEvent() call sites and subscribes to every hook it finds, including the hooks of third-party plugins. The list is cached in tmp/cache/hooksviewer-catalog.php and rebuilt when the source tree changes.tmp/logs/hooksviewer.log: every hook of every request, including API calls, tracker hits and console commands, with a timestamp, a request id and the arguments. Rotated above 10 MB.<script> block. API calls, exports, images, redirects and tracker hits stay byte-exact. Use the log file to observe their hooks.The search field and the hook catalog page are only available in HooksViewer 6.x, for Matomo 6.
>=5.0.0,<6.0.0-b1)For Matomo 6, use HooksViewer 6.x.
./console development:enable (or enabled = 1 in the [Development] section of config/config.ini.php). Without it, the plugin captures nothing and warns super users on every page.tail -f tmp/logs/hooksviewer.log.Sensitive values (tokens, passwords, secrets, cookies, sessions, API keys, visitor identifiers and IPs) are masked in the panel and in the log file. To show them, add this to config/config.ini.php:
[HooksViewer]
show_sensitive_values = 1
tmp/ directory. The log file is rotated to hooksviewer.log.1 above 10 MB.Openmost is an official Matomo Implementation Partner. If you would rather hand over the build, we develop custom Matomo plugins from a written spec, tested on the Matomo versions you run, published on the Marketplace or delivered privately.
HooksViewer is a development tool that subscribes to every Matomo event and surfaces them while you are browsing the Matomo UI or exercising the API.
Inline panel: for super users, HTML pages and widget AJAX requests
(format=html) get a collapsible HooksViewer panel listing every
event fired while the response was built, in order. Open a hook to see
a clean, indented dump of its arguments.
Log file: tmp/logs/hooksviewer.log receives one line per fired
event from every request, including JSON API calls, tracker hits,
and CLI commands. Each line carries a timestamp, a short request id so
you can correlate concurrent requests, an event index, the hook name,
and a compact view of the args.
tail -f tmp/logs/hooksviewer.log
The log is rotated to hooksviewer.log.1 once it grows above 10 MB.
The plugin does not ship a hand-maintained list. On the first request
after activation it scans core/ and plugins/ for every
Piwik::postEvent('…') call site, resolves same-file constant
references, and persists the result to
tmp/cache/hooksviewer-catalog.php. The cache is invalidated whenever
the source tree changes, so new events introduced by a Matomo upgrade
or by a third-party plugin appear automatically.
Wildcard event names (those containing PHP variables or sprintf
placeholders, e.g. Controller.$module.$action) are skipped because
they cannot be subscribed to as a single static name.
Some Matomo responses cannot tolerate any extra bytes:
module=API (JSON / XML / CSV / TSV / RSS)matomo.php and piwik.php (tracker hits and image responses)For these, HooksViewer does not inject anything into the response.
Use the log file (tmp/logs/hooksviewer.log) to observe their hooks.
For HTML pages and widget AJAX (format=html), the panel is written
once the response is complete, right after the opening <body> tag (or
at the top of a fragment), never inside a <script> block, and is styled to follow the light or dark Matomo
theme.
HooksViewer only runs when Matomo is in development mode (./console
development:enable, or enabled = 1 in the [Development] section of
config/config.ini.php). Outside development mode it captures and logs
nothing, deletes its log files, and super users see a warning on every
page asking to enable development mode or to uninstall the plugin.
Tokens, passwords, secrets, cookies, sessions, API keys, visitor identifiers and IPs are masked in the panel and in the log file, including inside URLs. To see them on a development instance:
[HooksViewer]
show_sensitive_values = 1
This plugin exposes internal arguments (including configuration values and visitor data) and writes a log file on every request while development mode is on. Never install it on a production instance.
It is published on the official Matomo Marketplace, like any other plugin:
HooksViewer 5.x runs on Matomo 5.0.0 or higher. For Matomo 6, use HooksViewer 6.x, which adds a search field in the panel and a hook catalog page.
The plugin renders internal hook arguments into the page (database configuration, visitor IPs, request parameters, etc.) and writes a log file on every request. Both are useful while debugging and unacceptable in production.
HooksViewer only works when Matomo runs in development mode. Enable it
with ./console development:enable, or set enabled = 1 in the
[Development] section of config/config.ini.php. Until then, no hook
is captured or logged, and super users see a warning on every page. On
a production instance, uninstall the plugin instead.
*** (masked)?Tokens, passwords, secrets, cookies, sessions, API keys, visitor
identifiers and IPs are masked in the panel and in the log file, also
when they appear as URL parameters. To see them on your development
instance, add show_sensitive_values = 1 to a [HooksViewer] section
of config/config.ini.php.
Two places, at the same time:
format=html), listing the hooks fired while it was built,
in order, each one with its arguments.tmp/logs/hooksviewer.log. This catches
every hook from every request, including JSON API calls, tracker
hits, and CLI commands, where the plugin cannot safely inject
markup. Tail it with tail -f tmp/logs/hooksviewer.log.Matomo caches the merged stylesheet bundle on disk. The plugin clears that cache on activation. If you somehow get out of sync, deactivate the plugin and reactivate it: the next request will rebuild the bundle.
The list of subscribed hooks is not hand-maintained. The plugin
scans core/ and plugins/ for Piwik::postEvent('…') calls and
caches the discovered list under tmp/cache/. The cache is rebuilt
whenever the source tree changes, so new events appear automatically
the next time the cache is invalidated.
No. The panel is written once the response is complete, and only
into HTML responses (regular pages and widget AJAX with format=html),
never inside a <script> block. API JSON, CSV exports,
XML, image responses, and tracker hits are left untouched. Use the
log file to observe hooks fired during those requests.
A few things to check:
Controller.$module.$action)? Those
are skipped because they have no fixed name to subscribe to.tmp/logs/hooksviewer.log: if it's not there either, the code
path was not reached.The panel is only shown to super users. The log file, however, records the hooks of every request from every user while the plugin is activated. Deactivate it as soon as you are done debugging.
No. It is rotated to hooksviewer.log.1 once it grows above 10 MB, so
at most about 20 MB are kept.
Open an issue or a pull request on https://github.com/openmost/HooksViewer.
As long as I keep using Matomo across projects, which is the foreseeable future. I'm the first user of this plugin: if it breaks on a Matomo upgrade I'll see it before you do.
Version
5.1.0
License
GPL v3+
Keywords
viewer, hooks, event, events, dev
Last Updated
Oct 21st 2026
Requirements
Matomo >=5.0.0,<6.0.0-b1
Matomo 5.x, Matomo 6.x
Downloads
7674
Changelog
Authors
Websites
Activity
10 commits (last commit 2 days ago)
Developer
Support
View and download this plugin for a specific Matomo version: