PHPackages                             wabisoft/craft-wabisoft-mimi - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. wabisoft/craft-wabisoft-mimi

ActiveCraft-plugin[Logging &amp; Monitoring](/categories/logging)

wabisoft/craft-wabisoft-mimi
============================

Log Twig pings to trace template and component usage across your site.

1.0.9(7mo ago)035proprietaryPHPPHP &gt;=8.2

Since Oct 13Pushed 7mo agoCompare

[ Source](https://github.com/wabi-soft/craft-mimi)[ Packagist](https://packagist.org/packages/wabisoft/craft-wabisoft-mimi)[ RSS](/packages/wabisoft-craft-wabisoft-mimi/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (11)Used By (0)

Craft Mimi
==========

[](#craft-mimi)

A comprehensive CraftCMS 5 plugin for tracking template and component usage. Track URL hits with optional tags, template paths, element context, and more. Perfect for understanding which pages, components, and templates are being used on your site.

Features
--------

[](#features)

- **Lightweight Twig function** to track page/component usage
- **Template path tracking** - See which template files are rendering
- **Element context tracking** - Track which entries/elements are being viewed
- **Multi-site support** - Separate tracking for each site
- **Tag system** - Identify and track specific components
- **Hit counting** - Aggregate counts for each unique combination
- **Session deduplication** - Optional setting to prevent duplicate counts during development
- **Dashboard widget** - View statistics directly in the CP
- **Console commands** - Generate reports and manage data
- **Performance optimized** - Master on/off switch with zero-impact when disabled

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- Craft CMS 5.7.0 or higher

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

[](#installation)

1. Install the plugin via composer:

    ```
    composer require wabisoft/craft-wabisoft-mimi
    ```
2. Install the plugin in Craft:

    ```
    php craft plugin/install wabisoft-mimi
    ```
3. Run migrations to create/update the database table:

    ```
    php craft migrate/all
    ```

Configuration
-------------

[](#configuration)

Navigate to **Settings → Plugins → Wabisoft Mimi** in the Craft control panel, or configure via environment variables.

### Settings

[](#settings)

#### Control Panel

[](#control-panel)

- **Enable Hit Tracking** - Master switch to enable/disable all tracking. When disabled, the `mimi()` function returns immediately without any database queries for optimal performance.
- **Deduplicate Session Hits** - When enabled, hits will only be counted once per session. Useful for development/testing to avoid inflating counts during page refreshes.

#### Environment Variables

[](#environment-variables)

You can configure Mimi settings using environment variables in your `.env` file. This is especially useful for managing different settings across environments (local, staging, production).

Add these variables to your `.env` file:

```
# Enable or disable hit tracking (true/false, yes/no, 1/0)
MIMI_TRACKING_ENABLED=true

# Enable session-based deduplication (true/false, yes/no, 1/0)
MIMI_DEDUPLICATE_SESSION=false
```

Then reference them in your plugin settings file (`config/wabisoft-mimi.php`):

```
