Skip to content

Push Notification Strategy

This document covers the push notification strategy for the MMP mobile app: the current Firebase setup, the admin portal for ad hoc notifications, and the programmatic notification rules that need to be defined with the team.

The mobile app already has Firebase Cloud Messaging (FCM) fully integrated:

ComponentStatusDetails
Firebase CoreIntegratedProject: my-marketing-pro-b13ed
FCM Token HandlingWorkingToken retrieved on app init, logged for debugging
Topic SubscriptionWorkingAuto-subscribes to all_users topic
Foreground NotificationsWorkingLocal notification shown when app is active
Background NotificationsWorkingSystem notification displayed
Notification Tap HandlingStubbedonMessageOpenedApp listener ready, deep link routing to be implemented
Permission HandlingWorkingRequested during onboarding (final slide)

Firebase Config:

  • Sender ID: 713572660880
  • Android config: google-services.json (managed via CI/CD secrets)
  • iOS config: GoogleService-Info.plist (managed via CI/CD secrets)
  • Android notification channel: high_importance_channel (high priority)
  • iOS: Alert, badge, and sound enabled

What’s Missing:

  1. No admin-friendly interface for sending notifications (currently requires Firebase console)
  2. No programmatic/automated notifications defined
  3. Notification tap → deep link routing not yet connected (stubbed in code)

The R&D Lead and other non-developer admin users need to send push notifications without accessing the Firebase console. The portal must be intuitive enough that someone without technical knowledge can compose, target, and send a notification in under 2 minutes.

Compose:

  • Notification title (max 65 characters for display)
  • Notification body (max 240 characters for full display)
  • Optional: deep link URL (opens specific page when tapped)
  • Optional: image URL (rich notification)
  • Preview: show how the notification will appear on iOS and Android

Target Audience:

  • All users — Send to the all_users FCM topic
  • User segments — Send to groups based on criteria:
    • Plan type (free, basic, premium, enterprise)
    • Signup date range (e.g., users who joined in the last 30 days)
    • Activity level (active, inactive for X days)
    • Platform (iOS only, Android only, both)
  • Individual users — Look up by email or user ID, send to their specific FCM token

Send Options:

  • Send immediately
  • Schedule for a specific date/time (nice-to-have for v1, can be added later)

History & Metrics:

  • Log of all sent notifications with: sender, timestamp, audience, content
  • Delivery count (from FCM response)
  • Open rate (if trackable via FCM analytics)

Decision needed from R&D Lead.

Add a “Push Notifications” section to the MMP web app admin area.

AspectDetails
ProsNo new infrastructure; users already logged into admin; shared auth system; faster to build
ConsIf the main app goes down, push notification portal goes down too; adds complexity to the existing codebase
Effort~2-3 weeks (frontend UI + backend API to FCM)
InfrastructureNone additional — runs on existing servers

Separate lightweight web app on independent infrastructure.

AspectDetails
ProsIndependent uptime (per tooling resilience plan); clean separation of concerns; can be reused across products
ConsSeparate auth needed; more infrastructure to manage; slightly longer to build
Effort~3-4 weeks (standalone app + auth + deployment)
InfrastructureRequires separate server/container (coordinate with DevOps)

Start with Option A for launch speed. The push notification portal is primarily used during business hours for planned communications — if the main app is down, sending marketing notifications is not the top priority anyway. Option B can be revisited post-launch if reliability becomes a concern.


These are automated notifications triggered by backend events. They need to be defined during the Phase 0 planning workshop with Product Lead, Dev Lead, and R&D Lead.

For each rule, the team should decide: trigger, delay, content, audience, and frequency cap.

RuleTriggerSuggested DelayAudienceStatus
Welcome notificationNew account createdImmediateNew userTo define
Complete your profileAccount created, profile incomplete24 hoursUsers with incomplete profilesTo define
First campaign promptAccount created, no campaign sent3 daysNew users who haven’t sent a campaignTo define
RuleTriggerSuggested DelayAudienceStatus
Inactivity reminderNo app open for X daysAfter X days (define threshold)Inactive usersTo define
Win-back notificationNo app open for 30+ days30 daysLapsed usersTo define
Weekly digestScheduled (every Monday)N/AAll active usersTo define
RuleTriggerSuggested DelayAudienceStatus
New feature announcementFeature releasedImmediate or scheduledAll users or segmentTo define
Campaign performance updateCampaign sent, results availableWhen results ready (e.g., 24 hours after send)Campaign senderTo define
Action requiredPending item needs attentionImmediateAffected userTo define
RuleTriggerSuggested DelayAudienceStatus
Scheduled maintenancePlanned downtime24 hours beforeAll usersTo define
Incident resolvedAfter outage recoveryImmediateAll usersTo define

Use this template during the Phase 0 notification rules workshop:

## Notification Rule: [Name]
**Trigger Event**: [What backend event causes this notification?]
**Delay**: [Send immediately? After X hours/days?]
**Target Audience**: [All users? Specific segment? Individual?]
**Frequency Cap**: [Max once per day? Once per week? Once ever?]
**Notification Content:**
- Title: [Max 65 characters]
- Body: [Max 240 characters]
- Deep Link: [URL to open when tapped, or none]
**Priority**: [Must-have for launch | Nice-to-have | Post-launch]
**Opt-Out**: [Can users disable this specific notification type?]
  • Backend sends notifications via FCM Admin SDK (server-side)
  • Each rule implemented as a triggered function or cron job
  • Frequency caps stored per-user to prevent notification fatigue
  • Deep link routing needs to be connected in the mobile app (onMessageOpenedApp handler is stubbed)
  • Consider a notification preferences screen in the app (future enhancement, not required for launch)

Start with the minimum viable set of programmatic notifications for launch. Add more post-launch based on engagement data:

Must-have for launch:

  1. Welcome notification (account creation)
  2. Inactivity reminder (define threshold with team)
  3. New feature announcement (ad hoc via portal, not automated)

Nice-to-have for launch: 4. Complete your profile 5. Campaign performance update

Post-launch: 6. Weekly digest 7. Win-back notification 8. Scheduled maintenance alerts


When a user taps a notification, the app should navigate to the relevant page. The mobile app already handles deep links via the app_links package and the mmp.app:// scheme.

The onMessageOpenedApp listener in push_service.dart is stubbed. It needs to:

  1. Extract the url or route from the notification’s data payload
  2. Navigate the WebView to that URL
  3. Handle cases where the app is cold-started from a notification (check getInitialMessage)

Notifications should include a data field with the target URL:

{
"notification": {
"title": "New Campaign Results",
"body": "Your email campaign has results. Tap to view."
},
"data": {
"url": "https://app.mymarketingpro.com/platform/campaigns/results.php?id=123",
"type": "campaign_results"
}
}

Last Updated: February 2026 Owner: Product Lead + Dev Lead Review Cadence: Weekly during active development