Title: Topic-Based Push Notifications for Firebase
Author: Rizwan Abbasi
Published: <strong>23. september, 2025</strong>
Last modified: 23. september, 2025

---

Søg plugins

![](https://s.w.org/plugins/geopattern-icon/topic-based-push-notifications-for-firebase.
svg)

# Topic-Based Push Notifications for Firebase

 Af [Rizwan Abbasi](https://profiles.wordpress.org/rizwanabbasi/)

[Download](https://downloads.wordpress.org/plugin/topic-based-push-notifications-for-firebase.1.0.0.zip)

 * [Detaljer](https://da.wordpress.org/plugins/topic-based-push-notifications-for-firebase/#description)
 * [Vurderinger](https://da.wordpress.org/plugins/topic-based-push-notifications-for-firebase/#reviews)
 *  [Installation](https://da.wordpress.org/plugins/topic-based-push-notifications-for-firebase/#installation)
 * [Udvikling](https://da.wordpress.org/plugins/topic-based-push-notifications-for-firebase/#developers)

 [Support](https://wordpress.org/support/plugin/topic-based-push-notifications-for-firebase/)

## Beskrivelse

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

 1. **Setup**: Upload your Firebase service account JSON file and configure topics
 2. **Create**: Compose notifications with title, message, optional image, and link
 3. **Target**: Select which topics (user groups) should receive the notification
 4. **Send**: Deliver notifications instantly to all subscribed Android devices
 5. **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 sending
 * `tbpn_after_send_notification` – Action after notification is sent
 * `tbpn_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

 1. Go to Plugins > Add New in your WordPress admin
 2. Search for “Topic-Based Push Notifications”
 3. Click Install Now and then Activate

### Manual Installation

 1. Download the plugin ZIP file
 2. Go to Plugins > Add New > Upload Plugin
 3. Choose the ZIP file and click Install Now
 4. Activate the plugin

### Setup

 1. **Firebase Setup**:
 2.  * Create a Firebase project at https://console.firebase.google.com
     * Enable Cloud Messaging in your project
     * Generate a service account key (JSON file)
 3. **Plugin Configuration**:
 4.  * 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
 5. **Test Your Setup**:
 6.  * Go to Topic-Based Push Notifications > Dashboard
     * Click “Send Test” to populate test data
     * Send a test notification to verify everything works
 7. **Android App Integration**:
 8.  * 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.

## Anmeldelser

Der er ingen anmeldelser for denne widget.

## Bidragsydere & udviklere

“Topic-Based Push Notifications for Firebase” er open source-software. Følgende 
personer har bidraget til dette plugin.

Bidragsydere

 *   [ Rizwan Abbasi ](https://profiles.wordpress.org/rizwanabbasi/)

[Oversæt “Topic-Based Push Notifications for Firebase” til dit eget sprog.](https://translate.wordpress.org/projects/wp-plugins/topic-based-push-notifications-for-firebase)

### Interesseret i udvikling?

[Gennemse koden](https://plugins.trac.wordpress.org/browser/topic-based-push-notifications-for-firebase/),
tjek [SVN repository](https://plugins.svn.wordpress.org/topic-based-push-notifications-for-firebase/),
eller abonner på [udviklerloggen](https://plugins.trac.wordpress.org/log/topic-based-push-notifications-for-firebase/)
via [RSS](https://plugins.trac.wordpress.org/log/topic-based-push-notifications-for-firebase/?limit=100&mode=stop_on_copy&format=rss).

## Ændringslog

#### 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

## Meta

 *  Version **1.0.0**
 *  Senest opdateret **7 måneder siden**
 *  Aktive installationer **10+**
 *  WordPress-version ** 5.0 eller højere **
 *  Testet op til **6.8.5**
 *  PHP-version ** 7.4 eller højere **
 *  Sprog
 * [English (US)](https://wordpress.org/plugins/topic-based-push-notifications-for-firebase/)
 * Tags
 * [android](https://da.wordpress.org/plugins/tags/android/)[FCM](https://da.wordpress.org/plugins/tags/fcm/)
   [firebase](https://da.wordpress.org/plugins/tags/firebase/)[mobile](https://da.wordpress.org/plugins/tags/mobile/)
   [push notifications](https://da.wordpress.org/plugins/tags/push-notifications/)
 *  [Avanceret visning](https://da.wordpress.org/plugins/topic-based-push-notifications-for-firebase/advanced/)

## Bedømmelser

Der er endnu ikke indsendt nogen anmeldelser.

[Your review](https://wordpress.org/support/plugin/topic-based-push-notifications-for-firebase/reviews/#new-post)

[Se alle anmeldelser.](https://wordpress.org/support/plugin/topic-based-push-notifications-for-firebase/reviews/)

## Bidragsydere

 *   [ Rizwan Abbasi ](https://profiles.wordpress.org/rizwanabbasi/)

## Support

Har du noget at sige? Har du brug for hjælp?

 [Vis supportforum](https://wordpress.org/support/plugin/topic-based-push-notifications-for-firebase/)