Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Kirby Tracker

Tracker is a plugin for Kirby 3 to track content changes and create panel logs or front-end notifications in member areas.

On privacy

Before using this plugin, please think about the privacy implications. You will be processing personal data of your users: their name, the date of their change and meta information about their change. This requires you to follow the privacy laws in your jurisdiction. Please consult a lawyer in case of doubt.

This plugin was initially conceived to create a dashboard for a private members area where all users consented to share their changes with the other users.


$notifications = new Hananils\TracksCollection('notifications');
  ->filterBy('datetime', '>=', $start->format('Y-m-d'))
  ->sortBy('datetime', 'asc')

<h1>Recent changes</h1>
<?php foreach ($notification as $notification): ?>
        <?= $notification
          ->title() ?>
<?php endforeach; ?>



Download and copy this repository to /site/plugins/tracker.

Git submodule

git submodule add site/plugins/tracker


composer require hananils/kirby-tracker

Tracked data

Tracker will create a SQLite datebase in site/logs/tracker.sqlite. It will create two tables:


Tracker will create a log of all change in this database:

  • id: the internal id
  • user: the Kirby user id
  • datetime: the timestamp of the change
  • kid: the Kirby id of the current context (page id, user id, file id)
  • model: the model of the current context (page, user, file)
  • action: the name of the action, referring to the Kirby hook, see
  • changes: meta information about the change, e. g. the field names affected or the page status before and after


Tracker will also create a list of all related pages, users and files that are affected by a change:

  • id: the internal id
  • kid: the related Kirby id
  • datetime: the timestamp of the change
  • track: the tracked change
  • status: whether the page, user or file has been added, untouched or removed as reference



Returns a TracksCollection of all changes of all users.

$limit: limit, defaults to 20 entries.


Returns a TracksCollection of all notifications.

$limit: limit, defaults to 20 entries.


Returns a TracksCollection of all changes on the given page.

$limit: limit, defaults to 20 entries.


Returns a TracksCollection of all notifications for the given page.

$limit: limit, defaults to 20 entries.


Returns a TracksCollection of all changes for the given user.

$limit: limit, defaults to 20 entries.


Returns a TracksCollection of all notifications for the given user.

$limit: limit, defaults to 20 entries.


The plugin provides a TracksCollection you can use to query, filter and output tracking information:

$tracks = new Hananils\TracksCollection();
$notifications = new Hananils\TracksCollection('notifications');

filterBy($column, $method, $value)

Applies a filter to the output.

$column: the table column. $method: filter method. $value: filter value.


Limits the number of returned tracks.

$limit: limit, defaults to 20 entries.


Applies and offset to the result.

$offset: entry offset.


Sorts the results.


Makes sure that only tracks for existing pages, users and files are returned, excluding those deleted in the meantime.


Returns the result as an array


Each item of the TrackCollection is a Track object:


Returns true is the referenced Kirby object exists, otherwise false.


Returns the Kirby user object.


Returns the Kirby object of the given reference, either the changed page, user or file.


Returns either the DateTime representation of the track or – if a format was provided – the formatted date.

$format: a PHP-readable date format.


Returns the related track for a notification.


Returns the status of a notified reference, either added, unchanged or removed.


Returns the value of the track.


Returns an array representation of the track.

To Do

  • Create Panel sections for tracks and notifications
  • Make TracksCollection use Kirby's collection classes.
  • Make TracksCollection groupable by fields.


This plugin is provided freely under the MIT license by hana+nils · Büro für Gestaltung. We create visual designs for digital and analog media.