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.registerEvents() snippet and a link to the developer reference. Search it, filter it by category, show only the hooks with listeners, or rescan the source code on demand. Hooks whose name is built at runtime are listed as dynamic.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.>=6.0.0-b1,<7.0.0-b1)For Matomo 5, use HooksViewer 5.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.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.
Every HTML response (full pages, widgets, AJAX HTML fragments) gets a collapsible HooksViewer panel, visible to super users only. Its summary shows how many hooks fired and the request id. Expand it to list the hooks in the order they fired, then expand a hook to see a clean, indented dump of its arguments.
ViewDataTable.filterViewDataTable, Visualization.beforeRender or
Metrics.isLowerValueBetter are visible for the widget that
triggered them.The panel is a Vue component. On the rare responses where Matomo does not compile Vue components (error pages, some AJAX HTML), it falls back to the plain list of hook names.
Administration > Diagnostic > Hooks Viewer (super users only) lists every known hook:
postEvent() call, which is how Matomo documents its
events.registerEvents(), and observers declared in observers.global.registerEvents() snippet to listen to the hook from your own
plugin, and a link to the developer reference.Search by hook name, description, listener or file, filter by category
(the part before the first dot, e.g. Request), or show only the hooks
that have listeners. Hooks marked dynamic are listened to but their
name is built at runtime (like Controller.CoreHome.index), so they
are not found in the source code.
Rescan the source code rebuilds the catalog immediately.
tmp/logs/hooksviewer.log receives one line per fired
event from every request, including JSON API calls, tracker hits,
console commands, and requests made by users who cannot see the panel.
Each line carries a timestamp, a short request id (the same one as in
the panel summary), an event index, the hook name, and a compact view of
the arguments.
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.
Nothing is printed while a hook fires. Matomo renders templates and widgets into nested output buffers, so markup printed at that moment would end up inside HTML attributes, graph data or JSON bodies.
Instead, hooks are collected during the request and the panel is written once the response is complete:
Content-Type is HTML;<body> for full pages, so the doctype stays first;These responses are never modified:
module=API (JSON / XML / CSV / TSV / RSS)#[JsonResponse], e.g.
Dashboard.getAllDashboards)matomo.php and piwik.php (tracker hits and image responses)Use the log file to observe their hooks.
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 6.x runs on Matomo 6 (PHP 8.1+, MySQL 8.0+ or MariaDB 10.6+). For Matomo 5.10.0 or higher, use HooksViewer 5.x.
The plugin shows internal hook arguments (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:
tmp/logs/hooksviewer.log. This catches
every hook from every request, including JSON API calls, tracker
hits and console commands, where the plugin never adds any markup.
Tail it with tail -f tmp/logs/hooksviewer.log.Only super users, and only super users can open the hook catalog. Everyone else browses Matomo normally, but the hooks of their requests are still written to the log file.
registerEvents() snippet.Administration > Diagnostic > Hooks Viewer. It lists every hook found in the source code with its description, parameters, call sites and listeners, plus the hooks only known through their listeners.
Printing markup at the exact moment a hook fires broke Matomo: it ended up inside HTML attributes, graph data and JSON responses, and before the page doctype. The panel is now written once the response is complete. The hooks are still listed in the exact order they fired, and each widget gets its own panel.
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 rebuilds 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.
No. The panel is only added to HTML responses. API responses, JSON controller actions, CSV exports, XML, images, redirects 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.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
6.2.1
License
GPL v3+
Keywords
viewer, hooks, event, events, dev
Last Updated
Oct 21st 2026
Requirements
Matomo >=6.0.0-b1,<7.0.0-b1
PHP >=8.1.0
Matomo 5.x, Matomo 6.x
Downloads
7732
Changelog
Authors
Websites
Activity
10 commits (last commit 9 days ago)
Developer
Support
View and download this plugin for a specific Matomo version: