Implementing Push Notifications to Drive Engagement – Wimgo

Implementing Push Notifications to Drive Engagement

Push notifications allow mobile and web apps to send timely messages directly to users even when they aren’t actively using the app. Instead of having to remember to open the app, users can get notified the moment there is breaking news, a great promotion, or an important update tailored just for them. 

Implementing push notifications thoughtfully can drive significant increases in user engagement. Engaged users spend more time in your app, are more loyal to your brand, and are more likely to tell their friends. They generate more revenue through subscriptions, in-app purchases, and simply viewing more pages and ads. That’s why it’s critical to use push notifications strategically to bring users back again and again.

In this comprehensive guide, we’ll cover everything you need to know to implement an effective push notification strategy including common use cases, best practices, technical implementation, and optimization based on data. Let’s get started!

Common Uses for Push Notifications

Push notifications are incredibly versatile and can support a wide range of use cases. Here are some of the most popular ways apps are using them to engage users:

New Content Alerts

One of the most straightforward uses is notifying users when fresh content is published in your app. For example, a news app can alert readers whenever a breaking story goes live. A podcast app can let listeners know when the latest episode is available. E-learning platforms can notify students about new course lectures and materials.

The key is pushing new content notifications in a timely manner while the information is still highly relevant. Include enough context in the message (e.g. headline, topic, author name, or podcast episode title) so users understand the nature of the content without having to open the app.

Promotional Offers and Discounts

Apps commonly leverage push notifications to send exclusive promotional offers and discounts to drive purchases and conversions. For example, an e-commerce app might offer 10% off or free shipping if the user makes a purchase within the next 2 hours after receiving the notification. 

The fear of missing out on a limited-time deal creates a strong incentive for users to not just open but take action in your app. Sweetening the offer exclusively for app users and not those on your website or email list also adds to the sense of exclusivity.

Events and News Alerts

Keep users in the loop about upcoming events, new features, or important announcements relevant to them. An event management app can remind registered attendees about an upcoming conference. A retail app can notify shoppers when a new high-demand product is back in stock.

Segment notifications based on users’ interests and behaviors so they only receive communications that are highly relevant. Time these alerts strategically around the events themselves for maximum impact.

Polls and Feedback Prompts

Engage users by prompting them to respond to quick polls and feedback surveys directly within push notifications. This allows you to collect valuable user insights without disrupting their core app experience.

For example, you can ask about their preferences on new features, get quick ratings on recent app updates, or measure sentiment around your brand or products. Gamify participation by showing poll results and offering small rewards.

Abandoned Cart Reminders

Push notifications are extremely effective at recovering abandoned carts and checkouts. E-commerce apps can detect when a user has items sitting in their cart but has not completed the purchase, and prompt them to do so with a timely reminder notification. 

Sweeten the message by offering a small additional discount or free gift if they complete their purchase. The key is catching users while they are still in the purchase mindset versus days later when that intent has faded.

Re-Engagement Campaigns

Target push notifications to lapsed users who have not actively used your app in a while. Segment based on their last login date or activity levels and re-engage them with personalized messages. 

Offer promotions, highlight new features, share interesting content, or simply check in to remind them about your app. The goal is bringing inactive users back into the fold.

Appointment and Task Reminders

Help users remember important events and tasks by sending push reminders leading up to the scheduled date/time. Apps with scheduling, calendar, and to-do list features are natural fits for these reminders. 

The notifications can surface the appointment details, location, links to prep materials, and prompt users to confirm attendance. This ensures users show up prepared and don’t miss commitments made in your app.

Order Status Updates  

Keep users informed about the status of their orders and deliveries. E-commerce apps can send notifications when an order has shipped, is out for delivery, has been delivered, or if there are any delays or issues. 

Likewise, food delivery apps can set timed notifications based on the preparation status and estimated arrival time of the order. Providing order updates builds trust and also gets users excited to engage with your app.

Welfare Check-In Messages

Check in on users who have been inactive in your app for an extended period of time. Send a personalized push notification seeing how they’re doing and if they need any help re-engaging with your app. 

Sometimes life just gets busy and users forget to return. A friendly nudge could be the prompt they need to reactivate their interest in your product. This demonstrates you care about your users as people rather than just numbers.

As you can see, the variety of use cases is endless. Nearly any app can benefit from thoughtfully crafted push notification campaigns timed to engage users. Next let’s look at some best practices to ensure your notifications are well received.

Best Practices for Push Notifications

Crafting high quality, valuable notifications that users look forward to is both an art and a science. Here are some best practices to stick to:

Segment Your Audience

Avoid the temptation to spam all users with the same blanket notifications. Instead, segment your audience and tailor notifications to their specific interests and behaviors. 

For example, target new content alerts based on topics users have engaged with previously. Or send promotional offers for products they have added to their wishlist but not yet purchased. Personalized notifications drive open and click-through rates.

Keep Language Clear and Concise

Because of the smaller screen space, push notifications need to get to the point quickly using clear, concise language. Remove unnecessary words and get to the core reason the user should care about this notification. 

Address the user directly by name when possible to add a human touch. Give them just enough information to pique their interest. You can provide more details if they click-through to the app.

Limit the Frequency 

Avoid bombarding users with too many notifications, which will quickly cause notification fatigue. Enable users to control notification frequency and honor those settings.

For marketing campaigns, limit to just a few highly targeted notifications per week. Transactional notifications like shipping updates can be more frequent based on events. Gauge frequency based on user feedback over time.

Provide Value in Each Notification

Do not make every notification an advertisement. While promotions are fine in moderation, also provide truly useful notifications that serve the user’s needs. 

For example, a shopping app could mix product recommendations (“New styles added to your Favorites category”) with order updates (“Your order has shipped”) and user tips (“Complete your profile to get personalized recommendations”). 

Use Timely Triggers

The timing of when you send notifications is just as important as the content itself. Identify the best timings to align with user behaviors.

For example, abandoned cart reminders work best within a few hours of items being added, not weeks later. Appointment reminders should hit 24-48 hours beforehand and again right before the event.

Give Users Notification Controls

Allow users to opt into (or out of) specific notification categories to ensure they only receive relevant messages. Settings can include on/off toggles for:

– Promotional offers

– Content recommendations 

– Order updates

– Appointment reminders

– Surveys and polls

– And more…

Also allow users to control frequency and time-of-day preferences for notifications.

A/B Test Notification Content and Timing

There is no one “right” way to craft notification content, calls-to-action, timing, frequency, and segmentation. Leverage A/B testing to determine what resonates best with your audience. 

Try variations in language, emojis vs. plain text, promotional copy vs. neutral copy, image vs. text-only, and test across different segments. Let data guide your optimization.

Analyze Engagement Metrics

Pay close attention to engagement metrics for each notification campaign. Gauge success based on send-to rates, delivery rates, open rates, click-through-rates, conversion rates, and opt-out rates.

Continuously refine notifications to drive desired behaviors. If a campaign sees high opt-outs or low click-throughs, go back to the drawing board. Let data guide your iterations.

Now that we’ve covered best practices, let’s look at how to technically implement push notifications in your apps.

Technical Implementation 

The first step is integrating a push notification delivery service into your app. There are a few major providers:

– Firebase Cloud Messaging: Popular free service for Android, iOS, and web. Owned by Google.

– Apple Push Notification Service: Required for native iOS apps. Free via Xcode and the Apple Developer account.    

– Amazon SNS: Service for push notifications across Android, iOS, and Fire OS. Free tier available.

– Microsoft Push Notifications: For Windows Phone, Windows 10, Xbox One. Free access with a Microsoft developer account.

For cross-platform support, Firebase Cloud Messaging is a great choice since it covers Android, iOS, and web. For this guide, we’ll focus on implementation using Firebase.

Requesting User Permissions

The first step is requesting user permission to send notifications upon app install or first load. Here is sample code for both iOS and Android:

“`swift

// iOS 

let center  = UNUserNotificationCenter.current()

center.requestAuthorization(options: [.sound, .badge]) { granted, error in

  if granted {

    print(“Notification permissions granted”)

  } else {

    print(“Permissions denied”)

  }

}

“`

“`kotlin

// Android

val request = NotificationManagerCompat.from(this@MainActivity)

.requestPermissions(

    NotificationPermissions.DEFAULT

)

if (request == NotificationManagerCompat.PERMISSION_GRANTED) {

  // permissions granted

} else {

  // permissions denied

}   

“`

Calling this upon app launch will trigger the native OS permission prompt. If the user grants access, their device token can be registered for sending notifications.

Integrating the SDK

Next integrate the Firebase Cloud Messaging SDK into your app. Follow the installation instructions for [iOS](https://firebase.google.com/docs/cloud-messaging/ios/client) and [Android](https://firebase.google.com/docs/cloud-messaging/android/client). 

Register your app instance and get your Firebase project configuration files. Then add the SDK to your code:

“`swift

// iOS – AppDelegate.swift

import Firebase

@UIApplicationMain

class AppDelegate: UIResponder, UIApplicationDelegate {

  // …

  func application(_ application: UIApplication,

                   didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

    FirebaseApp.configure()

    // …

  }

}

“`

“`kotlin

// Android – ApplicationClass.kt 

class ApplicationClass : Application() {

  // ..

  override fun onCreate() {

    super.onCreate()

    FirebaseApp.initializeApp(/*context=*/this)

    FirebaseMessaging.getInstance().token

  } 

}

“`

This initializes Firebase and gets a registration token for the device that push notifications can target.

Sending Test Notifications

With the SDK set up, you can start sending test notifications. Firebase provides a [console](https://console.firebase.google.com/) for sending sample notifications to registered devices. 

You can also call the API directly:

“`js

// Send simple notification payload

const message = {

  notification: {

    title: ‘New Post!’,

    body: ‘Check out the latest article’

  },

  tokens: [

    ‘DEVICE_REGISTRATION_TOKEN_1’, 

    ‘DEVICE_REGISTRATION_TOKEN_2’

  ]

}

fetch(‘https://fcm.googleapis.com/fcm/send’, {

  method: ‘POST’,

  headers: {

    ‘Authorization’: ‘key=SERVER_KEY’,

    ‘Content-Type’: ‘application/json’

  },

  body: JSON.stringify(message)

});

“`

The `tokens` array contains the device registration tokens you want to target. The `notification` payload becomes the push notification content.

Queuing Offline Messages

If the user’s device is offline, make sure to properly queue notifications until a connection is reestablished.

Firebase provides a [Cloud Functions](https://firebase.google.com/docs/functions) service that can monitor failed deliveries and retry later:

“`js

exports.sendNotification = functions.firestore

  .document(‘/notifications/{notificationId}’)

  .onCreate(async snapshot => {

    const notification = snapshot.data();

    const message = {

      notification: { /* … */ },

      tokens: [ /* … */ ]

    };

    try {

      await admin.messaging().sendMulticast(message);

    } catch (error) {

      console.error(error);

      const delay = backoff.exponential({ /* retry config */ });

      setTimeout(() => {

        return sendNotification(snapshot);

      }, delay); 

    }

  });

“`

This automatically retries failed notifications with exponential backoff delays.

Scheduling Campaigns

You can also schedule notification campaigns ahead of time using services like Firebase Cloud Scheduler.

For example, this schedules sending a promotion notification at 9am PST on July 4th:

“`yaml

– description: ‘July 4th promotion’

  schedule: every day 09:00

  timeZone: America/Los_Angeles

  target: 

    uri: https://us-central1-myproject.cloudfunctions.net/sendPromotionNotification

    httpMethod: POST

  retryConfig:

    retryCount: 1

“`   

Refer to the documentation for [Cloud Scheduler](https://firebase.google.com/docs/functions/schedule-functions) and [Cloud Tasks](https://firebase.google