PHPackages                             justbetter/statamic-content-usage - 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. justbetter/statamic-content-usage

ActiveLibrary

justbetter/statamic-content-usage
=================================

1.0.0(1mo ago)057PHPPHP ^8.4|^8.5CI passing

Since Apr 21Pushed 1mo agoCompare

[ Source](https://github.com/justbetter/statamic-content-usage)[ Packagist](https://packagist.org/packages/justbetter/statamic-content-usage)[ RSS](/packages/justbetter-statamic-content-usage/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (9)Versions (2)Used By (0)

Statamic Content Usage
======================

[](#statamic-content-usage)

> Track and analyze asset and entry usage across your Statamic site. Identify which assets and entries are being used, find unused content, and export detailed reports to CSV.

Features
--------

[](#features)

- **Asset Usage Tracking**: Discover which assets are used across content sources
- **Entry Usage Tracking**: Track which entries from a specific collection are referenced across content sources
- **Unused Content Detection**: Identify assets and entries that aren't being used anywhere
- **CSV Exports**: Export usage reports and unused content lists to CSV files
- **Dashboard Widgets**: Quick access to exports directly from the Statamic control panel
- **Artisan Commands**: Export reports via command line for automation and scheduled tasks
- **Container Filtering**: Filter unused assets by specific asset containers
- **Collection Tracking**: Track entry usage for any collection (e.g., global blocks, blog posts)

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

[](#installation)

You can install this addon via Composer:

```
composer require justbetter/statamic-content-usage
```

Usage
-----

[](#usage)

### Dashboard Widgets

[](#dashboard-widgets)

After installation, you'll find two widgets available in your Statamic dashboard:

#### Asset Usage Widget

[](#asset-usage-widget)

The Asset Usage widget allows you to:

- Export a report of all assets and where they're used
- Export a list of unused assets (optionally filtered by container)

#### Entry Usage Widget

[](#entry-usage-widget)

The Entry Usage widget allows you to:

- Select a collection to track
- Export a report of entries from that collection and where they're referenced
- Export a list of unused entries from that collection

### Artisan Commands

[](#artisan-commands)

#### Export Asset Usage

[](#export-asset-usage)

Export a CSV report showing which assets are used across content sources:

```
php artisan content-usage:export-assets
```

**Options:**

- `--output=path/to/file.csv` - Specify a custom output path (default: `storage/app/asset_usage_YYYY-MM-DD_HHMMSS.csv`)

**Example:**

```
php artisan content-usage:export-assets --output=/tmp/asset-report.csv
```

#### Export Unused Assets

[](#export-unused-assets)

Export a CSV list of assets that aren't being used anywhere:

```
php artisan content-usage:export-unused-assets
```

**Options:**

- `--containers=container1,container2` - Filter by specific asset container handles (comma-separated)
- `--output=path/to/file.csv` - Specify a custom output path (default: `storage/app/unused_assets_YYYY-MM-DD_HHMMSS.csv`)

**Examples:**

```
# Export all unused assets
php artisan content-usage:export-unused-assets

# Export unused assets from specific containers
php artisan content-usage:export-unused-assets --containers=main,images

# Custom output path
php artisan content-usage:export-unused-assets --output=/tmp/unused.csv
```

#### Export Entry Usage

[](#export-entry-usage)

Export a CSV report showing which entries from a collection are referenced across content sources:

```
php artisan content-usage:export-entries --collection=blog
```

**Options:**

- `--collection=handle` - **Required.** The handle of the collection to track
- `--output=path/to/file.csv` - Specify a custom output path (default: `storage/app/entry_usage_{collection}_YYYY-MM-DD_HHMMSS.csv`)

**Example:**

```
php artisan content-usage:export-entries --collection=global --output=/tmp/global-usage.csv
```

#### Export Unused Entries

[](#export-unused-entries)

Export a CSV list of entries from a collection that aren't referenced anywhere:

```
php artisan content-usage:export-unused-entries blog
```

**Options:**

- `collection` - **Required.** The handle of the collection (as an argument)
- `--output=path/to/file.csv` - Specify a custom output path (default: `storage/app/unused_entries_{collection}_YYYY-MM-DD_HHMMSS.csv`)

**Example:**

```
php artisan content-usage:export-unused-entries global --output=/tmp/unused-global.csv
```

CSV Export Formats
------------------

[](#csv-export-formats)

### Asset Usage Export

[](#asset-usage-export)

ColumnDescriptionAsset PathThe path to the asset fileAsset URLThe public URL of the assetAsset BasenameThe filename of the assetSource TitleThe title of the content source using the assetSource URLThe URL of the content source (when available)Source TypeThe source type/handle (e.g. collection, globals, navigation, taxonomy)### Entry Usage Export

[](#entry-usage-export)

ColumnDescriptionEntry TitleThe title of the referenced entryEntry URLThe URL of the referenced entryEntry CollectionThe collection handle of the referenced entrySource TitleThe title of the content source referencing itSource URLThe URL of the content source (when available)Source TypeThe source type/handle (e.g. collection, globals, navigation, taxonomy)### Unused Assets Export

[](#unused-assets-export)

ColumnDescriptionAsset PathThe path to the asset fileAsset URLThe public URL of the assetAsset BasenameThe filename of the assetContainerThe asset container handle### Unused Entries Export

[](#unused-entries-export)

ColumnDescriptionEntry IDThe ID of the unused entryEntry TitleThe title of the unused entryEntry URLThe URL of the unused entryCollectionThe collection handleUse Cases
---------

[](#use-cases)

- **Content Cleanup**: Identify unused assets and entries that can be safely removed
- **Content Audit**: Track which global blocks or reusable content is actually being used
- **Performance Optimization**: Remove unused assets to reduce storage and improve site performance
- **Content Strategy**: Understand content usage patterns to inform future content decisions
- **Migration Planning**: Identify orphaned content before migrating or archiving

How It Works
------------

[](#how-it-works)

The addon scans content sources in your Statamic site and:

1. **Sources scanned**:

    - Entries
    - Globals (all localizations)
    - Navigation trees
    - Terms (all localizations)
2. **For Assets**: Extracts asset references from source data, including:

    - `assets::` prefixed IDs (e.g., `assets::main::image.jpg`)
    - Plain file paths that can be resolved to assets
3. **For Entries**: Extracts entry references from source data, including:

    - `entry::collection::id` format references
    - Plain UUID references that match entries in the tracked collection

The addon then generates comprehensive reports showing relationships between your content.

License
-------

[](#license)

This addon is licensed under the MIT license.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance90

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

49d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d00b3f55cd4ae8b8cfb001a644ed6c7a1127a956c24375bcfe16ce12bd89bed?d=identicon)[justbetter](/maintainers/justbetter)

---

Top Contributors

[![kevinmeijer97](https://avatars.githubusercontent.com/u/9716909?v=4)](https://github.com/kevinmeijer97 "kevinmeijer97 (16 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/justbetter-statamic-content-usage/health.svg)

```
[![Health](https://phpackages.com/badges/justbetter-statamic-content-usage/health.svg)](https://phpackages.com/packages/justbetter-statamic-content-usage)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.5M901](/packages/statamic-cms)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135212.4k7](/packages/statamic-rad-pack-runway)[kimai/kimai

Kimai - Time Tracking

4.7k8.7k1](/packages/kimai-kimai)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

744284.3k34](/packages/civicrm-civicrm-core)[craftcms/feed-me

Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.

294943.4k27](/packages/craftcms-feed-me)[october/rain

October Rain Library

1591.7M72](/packages/october-rain)

PHPackages © 2026

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