PHPackages                             fr3nch13/cakephp-stats - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fr3nch13/cakephp-stats

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

fr3nch13/cakephp-stats
======================

Statistics plugin for CakePHP Projects

0.3(2y ago)02.4k[1 PRs](https://github.com/fr3nch13/cakephp-stats/pulls)MITPHPCI passing

Since Oct 26Pushed 1w ago1 watchersCompare

[ Source](https://github.com/fr3nch13/cakephp-stats)[ Packagist](https://packagist.org/packages/fr3nch13/cakephp-stats)[ Docs](https://github.com/fr3nch13/cakephp-stats)[ RSS](/packages/fr3nch13-cakephp-stats/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (4)Dependencies (7)Versions (6)Used By (0)

CakePHP Stats Plugin
====================

[](#cakephp-stats-plugin)

Track event-driven statistics and render Chart.js line charts in CakePHP applications.

Installation
------------

[](#installation)

Install the plugin with [Composer](https://getcomposer.org/):

```
composer require fr3nch13/cakephp-stats
```

Usage
-----

[](#usage)

Statistics are recorded through the [`StatsListener`](src/Event/StatsListener.php). Create an application listener that extends it and maps your application's events to listener methods.

See [CakePHP's event system](https://book.cakephp.org/5/en/core-libraries/events.html) for more on dispatching and handling events.

### Create A Listener

[](#create-a-listener)

`src/Event/ArticleListener.php`

```
