A comprehensive WordPress plugin for implementing web push notifications with detailed analytics tracking. Perfect for promoting weekly articles, special offers, and product updates.
- ✅ Web Push Notifications (browser-based)
- ✅ Service Worker implementation
- ✅ VAPID authentication support
- ✅ Subscription management
- ✅ Notification templates
The plugin tracks all the key metrics you requested:
- Opt-In Presentations - How many users were shown the opt-in prompt
- Opt-In Acceptance - How many users subscribed (with conversion rate)
- Notifications Delivered - How many users received each notification
- Click-Through Tracking - How many users arrived at the website from notifications
- Beautiful admin dashboard with statistics
- Notification templates (Weekly Articles, Special Offers, Product Packs)
- Real-time preview of notifications
- Top performing notifications report
- Insights and recommendations based on performance
- Responsive design for mobile and desktop
- Privacy-friendly (no email required)
- Upload the
tls-web-pushfolder to/wp-content/plugins/ - Activate the plugin through the 'Plugins' menu in WordPress
- Go to Web Push > Settings to configure VAPID keys
VAPID keys are required for web push notifications. You have two options:
- Visit Web Push Code Lab
- Click "Generate Keys"
- Copy both keys
npm install -g web-push
web-push generate-vapid-keys- Go to Web Push > Settings in your WordPress admin
- Paste your VAPID Public Key
- Paste your VAPID Private Key
- Click "Save Settings"
- Visit your website's frontend
- You'll see an opt-in prompt after 10 seconds (or immediately for testing)
- Click "Allow Notifications"
- You're now subscribed!
- Go to Web Push > Send Notification
- Fill in:
- Title: "Test Notification"
- Message: "This is a test from TLS Web Push"
- URL: Your article or page URL
- Click "Send to All Subscribers"
- Go to Web Push > Analytics
- View key metrics:
- Opt-in presentation count
- Opt-in conversion rate
- Total notifications sent
- Click-through rate
- Top performing notifications
- Go to Web Push > Send Notification
- Fill in the notification details
- Preview how it will look
- Send to all subscribers
The plugin includes quick templates for:
- New Weekly Article - Perfect for Thursday releases
- Special Offer - For limited-time promotions
- New Product Pack - For new product announcements
Click "Use Template" to auto-fill the form with template content.
The analytics page provides:
-
Key Metrics Overview
- Total opt-in presentations
- Subscription conversion rate
- Notifications delivered
- Click-through rate
-
Top Performing Notifications
- See which notifications got the most clicks
- Compare CTR across campaigns
- Identify what content resonates
-
Insights & Recommendations
- Automatic suggestions based on performance
- Best practices for notification timing
- Content optimization tips
-
Timing
- Send notifications when your articles publish (Thursdays)
- Avoid sending too frequently (1-2 per week max)
- Consider user timezone
-
Content
- Keep titles under 50 characters
- Make messages compelling and actionable
- Always include a clear call-to-action
- Use high-quality icons (192x192px recommended)
-
Targeting
- Start with broad notifications to all subscribers
- Monitor which content performs best
- Adjust your strategy based on analytics
- WordPress 5.0 or higher
- PHP 7.2 or higher
- HTTPS (required for web push, except on localhost)
- Modern browser with push notification support
- ✅ Chrome 50+
- ✅ Firefox 44+
- ✅ Edge 17+
- ✅ Safari 16+ (macOS 13+)
- ✅ Opera 37+
- ❌ iOS Safari (limited support)
For production use, you'll need to install the web-push PHP library:
cd wp-content/plugins/tls-web-push
composer require minishlink/web-pushThe current version includes a simplified sender for testing. For actual notification delivery, the library is required.
Web Push notifications require HTTPS. Your Local by Flywheel setup should work fine for testing, but ensure your production site has a valid SSL certificate.
The plugin automatically registers a service worker at:
/wp-content/plugins/tls-web-push/service-worker.js
This handles the actual notification display and click tracking.
Based on your requirements, the plugin tracks:
- ✅ Users presented with opt-in prompt
- ✅ Users who accepted (subscribed)
- ✅ Conversion rate calculation
- ✅ Total notifications sent
- ✅ Failed delivery tracking
- ✅ Per-notification statistics
- ✅ Users who clicked notifications
- ✅ Click-through rate
- ✅ Traffic attribution
Title: "New Article: [Your Article Title]"
Message: "This week's article is now live! Click to read more."
URL: https://yoursite.com/article-url
Title: "Limited Time Offer - Save 30%!"
Message: "Exclusive discount for our subscribers. Don't miss out!"
URL: https://yoursite.com/offers
Title: "New Product Pack Available!"
Message: "Check out our latest bundle with exclusive content."
URL: https://yoursite.com/products/new-pack
- Check if VAPID keys are configured
- Ensure you're using HTTPS (or localhost)
- Check browser console for errors
- Verify browser supports push notifications
- Adjust timing of the opt-in prompt
- Improve prompt messaging
- Consider timing (show after user engagement)
- Make titles more compelling
- Ensure content is relevant to subscribers
- Test different notification formats
- Check timing of notifications
The plugin is fully customizable. Key files:
tls-web-push.php- Main plugin fileincludes/class-notification-sender.php- Notification logicincludes/class-analytics.php- Analytics trackingassets/js/frontend.js- Frontend subscription handlingtemplates/admin-*.php- Admin pages
Potential future enhancements:
- Scheduled notifications
- User segmentation
- A/B testing
- Advanced targeting rules
- Integration with post publishing
- Automatic Thursday article notifications
GPL v2 or later
Varun Kumar
Ready to boost your site traffic with web push notifications! 🚀