PHPackages                             wdmg/yii2-activity - 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. wdmg/yii2-activity

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

wdmg/yii2-activity
==================

User activity tracking system

1.2.2(2y ago)41.2k3[1 issues](https://github.com/wdmg/yii2-activity/issues)1MITPHP

Since May 22Pushed 2y ago3 watchersCompare

[ Source](https://github.com/wdmg/yii2-activity)[ Packagist](https://packagist.org/packages/wdmg/yii2-activity)[ Docs](https://github.com/wdmg/yii2-activity)[ RSS](/packages/wdmg-yii2-activity/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (5)Dependencies (2)Versions (20)Used By (1)

[![Yii2](https://camo.githubusercontent.com/3f29058a9886ae3e9efc09df82d551051f8ea6c8da1176d9e8ca8a64be6f9b40/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72657175697265642d596969325f76322e302e34302d626c75652e737667)](https://packagist.org/packages/yiisoft/yii2)[![Downloads](https://camo.githubusercontent.com/36aff1fc933d44595077927d9cd81161408aa9e46c2ea04e002804bf72dce320/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77646d672f796969322d61637469766974792e737667)](https://packagist.org/packages/wdmg/yii2-activity)[![Packagist Version](https://camo.githubusercontent.com/93e1ad4f8f9c9ebd4a0cc5c92d26f72f6f99da38a9889f3cc0fde7d38edb3faa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77646d672f796969322d61637469766974792e737667)](https://packagist.org/packages/wdmg/yii2-activity)[![Progress](https://camo.githubusercontent.com/d2c102b075c16f8a841e697b04c43bc93c8d092c5795ad8b3090d7fa993c258a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70726f67726573732d72656164795f746f5f7573652d677265656e2e737667)](https://camo.githubusercontent.com/d2c102b075c16f8a841e697b04c43bc93c8d092c5795ad8b3090d7fa993c258a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70726f67726573732d72656164795f746f5f7573652d677265656e2e737667)[![GitHub license](https://camo.githubusercontent.com/90510eac3558118a5768e0373cd7f68c72ffc26becde95378a8ac2cd825cd68f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f77646d672f796969322d61637469766974792e737667)](https://github.com/wdmg/yii2-activity/blob/master/LICENSE)

[![Yii2 Activity](./docs/images/yii2-activity.png)](./docs/images/yii2-activity.png)

Yii2 Activity Module
====================

[](#yii2-activity-module)

User activity tracking system for Yii2. You can use the extension component to register any activity.

This module is an integral part of the [Butterfly.СMS](https://butterflycms.com/) content management system, but can also be used as an standalone extension.

Copyrights (c) 2019-2023 [W.D.M.Group, Ukraine](https://wdmg.com.ua/)

Requirements
============

[](#requirements)

- PHP 5.6 or higher
- Yii2 v.2.0.40 and newest
- [Yii2 Base](https://github.com/wdmg/yii2-base) module (required)
- [Yii2 Users](https://github.com/wdmg/yii2-users) module (required)

Installation
============

[](#installation)

To install the module, run the following command in the console:

`$ composer require "wdmg/yii2-activity"`

After configure db connection, run the following command in the console:

`$ php yii activity/init`

And select the operation you want to perform:

1. Apply all module migrations
2. Revert all module migrations
3. Clear users activity log

Migrations
==========

[](#migrations)

In any case, you can execute the migration and create the initial data, run the following command in the console:

`$ php yii migrate --migrationPath=@vendor/wdmg/yii2-activity/migrations`

Configure
=========

[](#configure)

To add a module to the project, add the following data in your configuration file:

```
'modules' => [
    ...
    'activity' => [
        'class' => 'wdmg\activity\Module',
        'routePrefix' => 'admin',
        'surfingActivity': false, // Log of web-surfing activity
        'backendSurfing': true, // Log of web-surfing activity by backend.
        'frontendSurfing': false, // Log of web-surfing activity by frontend.
        'ignoringRoutes': [], // Ignoring activity by request route
        'ignoringUsers': [], // Ignoring activity by user ID
        'ignoringIp': [] // Ignoring activity by user IP
    ],
    ...
],

```

Usecase
=======

[](#usecase)

Use the `setActivity($message = null, $action = null, $type = null, $level = 1)` method to log events and user actions, you can use the construction

```

```

Routing
=======

[](#routing)

Use the `Module::dashboardNavItems()` method of the module to generate a navigation items list for NavBar, like this:

```

```

Status and version \[ready to use\]
===================================

[](#status-and-version-ready-to-use)

- v.1.2.2 - Update README.md and dependencies
- v.1.2.1 - Add filter/sort order, save autoupdate to user options
- v.1.2.0 - Update copyrights
- v.1.1.13 - Live auto-update for list
- v.1.1.12 - Update README.md, added clear users activity log from console
- v.1.1.11 - Update README.md and dependencies
- v.1.1.10 - Added properties, refactoring setActivity() method
- v.1.1.9 - Added pagination, up to date dependencies
- v.1.1.8 - Fixed deprecated class declaration
- v.1.1.7 - Added extra options to composer.json and navbar menu icon
- v.1.1.6 - Added choice param for non interactive mode

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~83 days

Recently: every ~279 days

Total

19

Last Release

1085d ago

Major Versions

0.0.1 → 1.0.02019-05-22

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1635637?v=4)[Alexsander Vyshnyvetskyy](/maintainers/alex-wdmg)[@alex-wdmg](https://github.com/alex-wdmg)

---

Top Contributors

[![alex-wdmg](https://avatars.githubusercontent.com/u/1635637?v=4)](https://github.com/alex-wdmg "alex-wdmg (49 commits)")

---

Tags

trackingactivityyii2wdmgyii2-activity

### Embed Badge

![Health badge](/badges/wdmg-yii2-activity/health.svg)

```
[![Health](https://phpackages.com/badges/wdmg-yii2-activity/health.svg)](https://phpackages.com/packages/wdmg-yii2-activity)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
