laravel-email-tracker-filament maintained by r0bdiabl0
Laravel Email Tracker - Filament Plugin
A Filament admin panel plugin for Laravel Email Tracker. Provides dashboard widgets, statistics, and resource pages for managing your email tracking data.
Table of Contents
- Features
- Requirements
- Installation
- Setup
- Dashboard
- Resources
- Statistics Service
- Configuration
- Widgets on Other Dashboards
- Related Packages
- Contributing
- Credits
- License
Features
- Dashboard Widgets - Overview stats, delivery charts, health scores
- Sent Emails Resource - Browse, search, and filter sent emails
- Bounces Resource - View and manage bounce records with severity badges
- Complaints Resource - Track spam complaints
- Statistics Service - Aggregated stats for custom integrations
- Filament v3, v4 & v5 Compatible - Works with latest Filament versions
Requirements
- PHP 8.2+
- Laravel 11.0+
- Filament 3.0+, 4.0+, or 5.0+
- r0bdiabl0/laravel-email-tracker ^1.0
Installation
First, install the main email tracker package if you haven't:
composer require r0bdiabl0/laravel-email-tracker
php artisan email-tracker:install
Then install the Filament plugin:
composer require r0bdiabl0/laravel-email-tracker-filament
Optionally publish the config:
php artisan vendor:publish --tag=email-tracker-filament-config
Setup
Register the plugin in your Filament panel provider:
use R0bdiabl0\EmailTrackerFilament\EmailTrackerFilamentPlugin;
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugins([
EmailTrackerFilamentPlugin::make(),
]);
}
Customizing the Plugin
EmailTrackerFilamentPlugin::make()
->resources(true) // Enable/disable resource pages
->widgets(true) // Enable/disable dashboard widgets
->dashboard(true) // Enable/disable dedicated dashboard page
Dashboard
The plugin adds an "Email Tracker" dashboard with:
- Stats Overview - Sent, delivered, bounced, complained, opened counts with rates
- Health Score - 0-100 score based on bounce/complaint rates
- Delivery Chart - Daily trends for sent/delivered/bounced
- Recent Activity - Latest bounces and events
Resources
Sent Emails
Browse all tracked emails with:
- Search by recipient or message ID
- Filter by provider, delivery status, bounce status
- View delivery/bounce/complaint status icons
- Batch filtering
Bounces
View bounce records with:
- Permanent vs Transient type badges
- Provider filtering
- Navigation badge showing recent bounce count
Complaints
View spam complaints with:
- Provider filtering
- Link to original sent email
- Navigation badge showing recent complaint count
Statistics Service
Use the Stats service for custom queries:
use R0bdiabl0\EmailTrackerFilament\Services\Stats;
// Get summary stats
$stats = Stats::make()->getSummary();
// Returns: total_sent, total_delivered, bounce_rate, etc.
// Filter by provider
$sesStats = Stats::make()
->forProvider('ses')
->lastDays(7)
->getSummary();
// Get daily data for charts
$dailyData = Stats::make()->getDailyData();
// Get stats by provider
$byProvider = Stats::make()->getByProvider();
// Get health score (0-100)
$score = Stats::make()->getHealthScore();
// Get recent activity
$activity = Stats::make()->getRecentActivity(15);
// Get top bounced emails
$topBounces = Stats::make()->getTopBounces(10);
Configuration
// config/email-tracker-filament.php
return [
'navigation' => [
'group' => 'Email Tracker',
'icon' => 'heroicon-o-envelope',
'sort' => 100,
],
'dashboard' => [
'enabled' => true,
'path' => 'email-tracker',
'title' => 'Email Tracker',
],
'resources' => [
'sent_emails' => true,
'bounces' => true,
'complaints' => true,
'opens' => false, // High volume, disabled by default
'links' => false, // High volume, disabled by default
],
'widgets' => [
'stats_overview' => true,
'delivery_chart' => true,
'recent_activity' => true,
'top_bounces' => true,
],
'default_days' => 30,
'pagination' => [
'default' => 25,
'options' => [10, 25, 50, 100],
],
];
Widgets on Other Dashboards
Use the widgets on your main Filament dashboard:
use R0bdiabl0\EmailTrackerFilament\Filament\Widgets\EmailStatsOverview;
use R0bdiabl0\EmailTrackerFilament\Filament\Widgets\EmailDeliveryChart;
public function panel(Panel $panel): Panel
{
return $panel
->widgets([
EmailStatsOverview::class,
EmailDeliveryChart::class,
]);
}
Related Packages
- laravel-email-tracker - Main email tracking package (required)
- laravel-email-tracker-nova - Laravel Nova admin panel plugin
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Run
composer testandcomposer format - Submit a pull request
For bugs and feature requests, please open an issue.
Credits
- Robert Pettique - Author and maintainer
License
The MIT License (MIT). Please see License File for more information.