Description
Topic-Based Push Notifications for Firebase enables you to send push notifications from your WordPress admin panel directly to Android mobile applications using Firebase Cloud Messaging (FCM). Perfect for apps that need to notify users about new content, updates, or important announcements.
Key Features
- Topic-Based Targeting: Send notifications to specific user groups by topic subscription
- Rich Notifications: Support for images, custom links, and detailed messaging
- Complete Analytics: Track delivery rates, engagement, and notification performance
- Engagement Tracking: Monitor when users open notifications with detailed metrics
- History Management: View all sent notifications with filtering and search capabilities
- Modern Interface: Clean, responsive admin interface that works on all devices
- Secure Implementation: Built with WordPress security best practices
How It Works
- Setup: Upload your Firebase service account JSON file and configure topics
- Create: Compose notifications with title, message, optional image, and link
- Target: Select which topics (user groups) should receive the notification
- Send: Deliver notifications instantly to all subscribed Android devices
- Track: Monitor delivery success rates and user engagement in real-time
Perfect For
- News and blog websites with mobile apps
- E-commerce stores with Android applications
- Educational platforms with student mobile apps
- Community websites with member applications
- Any WordPress site with an Android companion app
What You Need
- Firebase project with FCM enabled
- Service account JSON file from Firebase Console
- Android app configured to receive FCM notifications (topic based). This version doesn’t handle token based notifications.
- WordPress 5.0+ and PHP 7.4+
External Services
This plugin connects to Google’s Firebase services to send push notifications to mobile applications. External service connections are required for the plugin’s core functionality.
Google OAuth API (oauth2.googleapis.com)
* Purpose: Authentication with Firebase Cloud Messaging service
* Data sent: Service account credentials (from your uploaded JSON file), authentication tokens
* When: Every time notifications are sent (to obtain access tokens)
* Terms of Service: https://developers.google.com/terms
* Privacy Policy: https://policies.google.com/privacy
Firebase Cloud Messaging API (fcm.googleapis.com)
* Purpose: Sending push notifications to Android mobile applications
* Data sent: Notification content (title, message, image URLs, links), target topics, FCM project ID
* When: When you send notifications through the plugin interface
* Terms of Service: https://firebase.google.com/terms
* Privacy Policy: https://policies.google.com/privacy
Privacy & Data
This plugin processes notification data locally on your WordPress installation. Notifications are sent directly to Google’s Firebase Cloud Messaging service.
No user data is collected or sent to services other than Google/Firebase for notification delivery. Your Firebase service account credentials are stored securely on your server.
Developers
The plugin includes hooks and filters for developers to extend functionality:
tbpn_before_send_notification– Filter notification data before sendingtbpn_after_send_notification– Action after notification is senttbpn_notification_response– Filter FCM response data- REST API endpoint for mobile apps to report engagement
Technical Details
System Requirements
- WordPress 5.0 or higher
- PHP 7.4 or higher
- MySQL 5.6 or MariaDB 10.0
- SSL certificate (recommended for production)
File Permissions
The plugin creates a secure upload directory for Firebase service account files. Ensure your WordPress uploads directory is writable.
Database Tables
The plugin creates two tables:
* wp_tbpn_notifications – Stores notification history and analytics
* wp_tbpn_engagements – Tracks user engagement with notifications
REST API Endpoints
POST /wp-json/mn/v1/engage– Report notification engagement (for mobile apps)
Hooks for Developers
Actions:
* tbpn_notification_sent – Triggered after notification is sent
* tbpn_notification_failed – Triggered when notification sending fails
* tbpn_engagement_recorded – Triggered when engagement is recorded
Filters:
* tbpn_notification_data – Filter notification data before sending
* tbpn_topics_list – Filter available topics
* tbpn_max_notifications_per_hour – Filter rate limiting
Security Features
- Nonce verification for all forms
- Capability checks for admin actions
- SQL injection prevention with prepared statements
- XSS prevention with proper output escaping
- Secure file upload handling
- Rate limiting for notification sending
Support
For support, feature requests, or bug reports, please use the WordPress.org support forums.
For documentation and updates, visit the plugin homepage.
Contributing
This plugin is open source. Contributions, bug reports, and feature requests are welcome on the plugin’s development repository.
Installation
Automatic Installation
- Go to Plugins > Add New in your WordPress admin
- Search for “Topic-Based Push Notifications”
- Click Install Now and then Activate
Manual Installation
- Download the plugin ZIP file
- Go to Plugins > Add New > Upload Plugin
- Choose the ZIP file and click Install Now
- Activate the plugin
Setup
-
Firebase Setup:
- Create a Firebase project at https://console.firebase.google.com
- Enable Cloud Messaging in your project
- Generate a service account key (JSON file)
-
Plugin Configuration:
- Go to Topic-Based Push Notifications > Settings
- Upload your service account JSON file
- Configure your topics (e.g., “students”, “teachers”, “news”)
- Set your Firebase Project ID
-
Test Your Setup:
- Go to Topic-Based Push Notifications > Dashboard
- Click “Send Test” to populate test data
- Send a test notification to verify everything works
-
Android App Integration:
- Configure your Android app to subscribe to topics
- Implement FCM token handling in your mobile app
- Test notification reception on your Android device
FAQ
-
Do I need a Firebase account?
-
Yes, you need a free Firebase account and project to use Firebase Cloud Messaging. The service is free for most use cases.
-
Can I send notifications to iOS devices?
-
This version focuses on Android FCM notifications. iOS support may be added in future versions.
-
How many notifications can I send?
-
Firebase FCM has generous free quotas. For high-volume usage, check Firebase pricing. The plugin includes rate limiting to prevent abuse.
-
Can I schedule notifications?
-
Currently, notifications are sent immediately. Scheduling features may be added in future versions.
-
How do I track if users opened notifications?
-
The plugin includes engagement tracking. Your Android app needs to call the provided REST API endpoint when notifications are opened.
-
Can I customize the notification appearance?
-
Notification appearance is controlled by your Android app’s implementation of FCM. This plugin handles the server-side sending.
-
Is this plugin secure?
-
Yes, the plugin follows WordPress security best practices including nonce verification, capability checks, and proper data sanitization.
-
Can I export notification history?
-
Yes, there’s an export feature in the History page to download notification data as CSV.
-
Does this work with Multisite?
-
The plugin is designed for single-site installations. Multisite support may be added based on user demand.
-
How do I troubleshoot delivery issues?
-
Check the notification details in the History page for FCM response data. Common issues include invalid service account files or incorrect topic names.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Topic-Based Push Notifications for Firebase” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Topic-Based Push Notifications for Firebase” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.0
- Initial release
- Topic-based FCM notification sending
- Rich notification support (images, links)
- Complete analytics and engagement tracking
- Modern responsive admin interface
- Export functionality for notification history
- REST API for mobile app integration
- Security enhancements and WordPress best practices