Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filament Plugin Laravel Package

simplestats-io/filament-plugin

Official Filament v5 plugin for SimpleStats.io. View analytics inside your Filament panel: visitors, registrations, revenue, top sources, and countries. PHP 8.2+, Laravel 12+. Configure via API token with optional caching and navigation settings.

View on GitHub
Deep Wiki
Context7

Filament Plugin for SimpleStats.io

Latest Version on Packagist Tests Fix PHP code style issues License Laravel Compatibility

The official Filament v5 plugin for SimpleStats.io. View your analytics directly inside your Filament panel: visitors, registrations, revenue, top sources, and top countries.

screenshot

Requirements

  • PHP 8.2+
  • Laravel 12+
  • Filament 5+
  • A SimpleStats.io account with an API token

Installation

Install via Composer:

composer require simplestats-io/filament-plugin

Optionally publish the config file:

php artisan vendor:publish --tag="simplestats-filament-config"

Add your API token to .env:

SIMPLESTATS_API_TOKEN=your-api-token-here

Setup

Register the plugin in your Filament PanelProvider:

use SimpleStatsIo\FilamentPlugin\SimplestatsPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugin(SimplestatsPlugin::make());
}

That's it. Navigate to /admin/simplestats (or your panel path + /simplestats) to see your dashboard.

Configuration

All configuration is optional. The plugin works out of the box with just an API token.

Plugin Options

SimplestatsPlugin::make()
    ->apiToken('custom-token')                        // defaults to config/env
    ->apiUrl('https://simplestats.io/api/v1')         // defaults to config/env
    ->cacheTtl(60)                                    // cache duration in seconds
    ->navigationGroup('Analytics')                    // Filament nav group
    ->navigationLabel('Stats')                        // custom nav label
    ->navigationSort(5)                               // nav position
    ->navigationIcon('heroicon-o-chart-bar-square')   // default icon

Config File

If you published the config, you can set defaults via environment variables:

// config/simplestats-filament.php

return [

    /*
     |--------------------------------------------------------------------------
     | SimpleStats API Credentials
     |--------------------------------------------------------------------------
     |
     | Define your API credentials here. The API URL defaults to the hosted
     | SimpleStats instance. If you are self-hosting, change it to your own
     | URL. The API token is the same one used by the Laravel client package.
     |
     */

    'api_url' => env('SIMPLESTATS_API_URL', 'https://simplestats.io/api/v1'),

    'api_token' => env('SIMPLESTATS_API_TOKEN'),

    /*
     |--------------------------------------------------------------------------
     | Cache Duration
     |--------------------------------------------------------------------------
     |
     | API responses are cached to avoid unnecessary requests on every page
     | load and Livewire re-render. Multiple widgets sharing the same filters
     | will reuse a single cached response. Set to 0 to disable caching.
     |
     */

    'cache_ttl' => 60,

];

Dashboard Widgets

The plugin provides seven widgets on a single dashboard page:

Widget Description
Stats Overview KPI cards: Visitors, Registrations, CR, Net Revenue, ARPU, ARPV. Includes sparklines.
Visitors & Registrations Line chart showing visitors and registrations over time.
Revenue Line chart showing gross and net revenue over time.
Top Referrers Horizontal bar chart of top referrers.
Top Sources Horizontal bar chart of top traffic sources.
Top Countries Horizontal bar chart of top visitor countries.
Entry Pages Horizontal bar chart of top landing pages.

A time range filter lets you switch between presets (Today, Last 7 Days, Last 30 Days, This Year, All Time, etc.).

Self-Hosted

If you are running a self-hosted SimpleStats instance, point the plugin to your own API:

SimplestatsPlugin::make()
    ->apiToken(config('simplestats-filament.api_token'))
    ->apiUrl('https://your-simplestats-instance.com/api/v1')

Or via .env:

SIMPLESTATS_API_URL=https://your-simplestats-instance.com/api/v1

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor
spatie/laravel-javascript-views
spatie/ignition-contracts
earls/stork-command-queue-bundle