Integration & tools · Knowledge
What is a Joomla system plugin?
A system plugin is a small extension that hooks into Joomla's page lifecycle – it can act on every single request, before or while the page is assembled.
That is exactly why site-wide jobs – tracking codes, redirects, security headers – live in system plugins: one place, every page, no template surgery.
The lifecycle, the events – and what JStats does with them
On every request, Joomla fires a series of events – after initialisation, after routing, before rendering, before the response leaves. Plugins subscribe to these events by group; the “system” group receives the most fundamental ones, which is what makes system plugins so universal. JStats is a textbook example: it listens late in the cycle and asks Joomla's document object to add one custom tag to the head section (the addCustomTag API) – the framework-blessed way to inject markup without touching any template file. Two practical consequences follow. First, system plugins are disabled after installation by design – Joomla will not let freshly installed code run on every request without an explicit yes; that is the activation step in every plugin manual. Second, because they run on every request, system plugins deserve a quality glance before installing: a sloppy one slows every page. The honest yardstick is what the plugin does per request – JStats assembles one string and hands it to the document, which is as close to zero cost as PHP gets.
Key facts
- Definition: an extension hooked into Joomla's per-request event chain (group “system”).
- Typical jobs: tracking codes, redirects, headers – anything that must touch every page.
- JStats mechanism: addCustomTag places the snippet in the head – no template file is modified.
- By design: system plugins are disabled after installation – activation is a deliberate step.
- Quality yardstick: work per request – lean plugins cost effectively nothing.