nkamuo / notification-tracker-bundle
[EXPERIMENTAL] Notification and email tracking bundle for Symfony with webhook support - DO NOT USE IN PRODUCTION
Installs: 41
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.2
- api-platform/core: ^4.2
- doctrine/doctrine-bundle: ^2.11
- doctrine/orm: ^2.11|^3.0
- symfony/cache: ^7.3
- symfony/framework-bundle: ^7.3
- symfony/mailer: ^7.3
- symfony/messenger: ^7.3
- symfony/notifier: ^7.3
- symfony/orm-pack: ^2.4
- symfony/property-access: ^7.3
- symfony/property-info: ^7.3
- symfony/serializer: ^7.3
- symfony/twig-bundle: ^7.3
- symfony/uid: ^7.3
- symfony/validator: ^7.3
- symfony/webhook: ^7.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.48
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^10.5
- symfony/browser-kit: ^7.3
- symfony/css-selector: ^7.3
- symfony/debug-bundle: ^7.3
- symfony/maker-bundle: ^1.52
- symfony/phpunit-bridge: ^7.3
- symfony/test-pack: ^1.0
- symfony/yaml: ^7.3
- dev-master
- v0.11.1
- v0.11.0
- v0.10.13
- v0.10.12
- v0.10.11
- v0.10.10
- v0.10.9
- v0.10.8
- v0.10.7
- v0.10.6
- v0.10.5
- v0.10.4
- v0.10.3
- v0.10.2
- v0.10.1
- v0.10.0
- v0.9.8
- v0.9.7
- v0.9.6
- v0.9.5
- v0.9.4
- v0.9.3
- v0.9.2
- v0.9.1
- v0.9.0
- v0.8.0
- v0.7.1
- v0.7.0
- v0.6.2
- v0.6.1
- v0.6.0
- v0.5.0
- v0.4.1
- v0.4.0
- v0.3.0
- v0.2.0
- v0.1.19
- v0.1.18
- v0.1.17
- v0.1.16
- v0.1.15
- v0.1.14
- v0.1.13
- v0.1.12
- v0.1.11
- v0.1.10
- v0.1.9
- v0.1.8
- v0.1.7
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- dev-receive-messages-01
- dev-track-messages-id-01
- dev-contact-management-01
- dev-custom-messenger-transport-01
This package is auto-updated.
Last update: 2025-09-25 20:08:54 UTC
README
โ ๏ธ EXPERIMENTAL - This project is in active development and should not be used in production environments. APIs and features may change without notice.
Automatically track and analyze all emails and notifications sent through Symfony Mailer and Notifier components.
๐ฏ What This Bundle Does
This bundle automatically captures and tracks notifications sent through:
- โ
Symfony Mailer - All emails sent via
$mailer->send()
- โ
Symfony Notifier - All notifications sent via
$notifier->send()
- โ Manual API - Custom notifications via REST API
No code changes required! Just install, configure, and start tracking.
๐ Quick Start
- Install:
composer require nkamuo/notification-tracker-bundle
- Configure: Add to
bundles.php
- Migrate: Run
doctrine:migrations:migrate
- Use: Send emails/notifications as normal - they're automatically tracked!
๐ Documentation
๐ START HERE: Complete Documentation
Essential Links
- ๐ Main Guide - Complete setup and usage
- ๐ API Reference - REST API documentation
- ๐ Custom Filters - Advanced API filtering
- โ ๏ธ Experimental Notice - Important warnings
๐งช Experimental Status
This is an experimental project - use at your own risk:
- โ Core tracking functionality works
- โ ๏ธ APIs may change without notice
- ๐ง Active development in progress
- ๐ฌ Suitable for testing and evaluation only
๐ฏ Key Features
- ๐ง Multi-channel Support: Email, SMS, Slack, Telegram, Push notifications
- ๐ Native Symfony Integration: Works seamlessly with Symfony Mailer and Notifier events
- ๐ Complete Tracking: Track sent, delivered, opened, clicked, bounced, and failed messages
- ๐ Webhook Support: Integrate with SendGrid, Twilio, Mailgun, and more
- ๐ Async Processing: Built-in Symfony Messenger support
- ๐ API Platform Integration: Rich REST API for browsing and managing notifications
- ๐ Real-time Analytics: Performance metrics and engagement statistics
- โ๏ธ Highly Configurable: Environment-based configuration with sensible defaults
๐ป Installation
composer require nkamuo/notification-tracker-bundle
Register the Bundle
If not using Symfony Flex, register the bundle in config/bundles.php
:
return [ // ... Nkamuo\NotificationTrackerBundle\NotificationTrackerBundle::class => ['all' => true], ];
Run Migrations
php bin/console doctrine:migrations:diff php bin/console doctrine:migrations:migrate
โ๏ธ Basic Configuration
Create config/packages/notification_tracker.yaml
:
notification_tracker: enabled: true tracking: enabled: true track_opens: true track_clicks: true
๐ Usage Examples
Automatic Tracking
The bundle automatically tracks all emails and notifications sent through Symfony's components:
// Emails are automatically tracked $email = (new Email()) ->from('hello@example.com') ->to('you@example.com') ->subject('Time for Symfony Mailer!') ->html('<p>See Twig integration for better HTML integration!</p>'); $mailer->send($email);
API Access
Browse and manage notifications via API Platform:
# List tracked messages GET /api/notification-tracker/messages # Get message details GET /api/notification-tracker/messages/{id} # Retry failed message POST /api/notification-tracker/messages/{id}/retry # View analytics GET /api/notification-tracker/analytics
Console Commands
# Process failed messages php bin/console notification-tracker:process-failed # View analytics php bin/console notification-tracker:analytics # Clean up old messages php bin/console notification-tracker:cleanup --days=90
๐ Webhook Setup
Configure your webhook endpoints with your providers:
- SendGrid:
https://your-domain.com/webhooks/notification-tracker/sendgrid
- Twilio:
https://your-domain.com/webhooks/notification-tracker/twilio
- Mailgun:
https://your-domain.com/webhooks/notification-tracker/mailgun
๐งช Testing
composer test
composer cs-fix
composer phpstan
๐ค Support
For issues and feature requests, please use the GitHub issue tracker.
๐ License
MIT
Ready to enhance your notification system with comprehensive tracking and analytics? ๐
Check out the complete documentation to get started!