company logo

Help center

Go to Superfans.io
Developer DocsWebsite
All collectionsManaging IntegrationsFirebaseA/B testing for Push Notifications

A/B testing for Push Notifications

Complete guide to setting up and optimizing your A/B testing

Swetha K V·September 22, 2025

A/B Testing allows you to compare multiple versions of a push notification to determine which message drives the best results. By sending variants to separate user groups, you can measure engagement, retention, conversions, and other key metrics before rolling out the winning message to all users.

This guide focuses entirely on push notifications in Firebase.

Why Use A/B Testing for Notifications?

  • Identify the most effective messaging to increase app opens or in-app conversions.

  • Test variations in copy, timing, or targeting without impacting your entire user base.

  • Make data-driven decisions before sending notifications to all users.

How to A/B test?

1. Create a New Experiment

  1. Open the Firebase Console → Engage → A/B Testing → Create Experiment.

  2. Select Notifications as the experiment type.

  3. Ensure your Firebase project has Google Analytics enabled.

  4. Make sure your app SDK versions meet minimum requirements:

    Refer: Firebase Setup & SDK Documentation

2. Define Experiment Basics

  • Name: Give your experiment a short, descriptive name (e.g., “Welcome Message A/B Test”).

  • Description (Optional): Add context about the purpose of the test.

  • Target Users:

    • Select the app you want to test.

    • Narrow your audience by:

      • App version

      • Analytics audience

      • User properties

      • Country or region

      • Device language

      • First app open / last engagement

Note: Targeting users through Analytics audiences may take 24 - 48 hours to populate data.

Percentage of Users: Decide what portion of your app users will participate (0.01% -100%). Firebase randomly assigns users to baseline and variant groups. Click Next.

3. Configure Notification Variants

  • Baseline Message: Usually the current notification. Can be left blank if testing the effect of sending a notification versus no notification.

  • Variant A: Enter the new message you want to test.

  • Additional Variants: Click Add Variant to test more messages.

  • Distribution: By default, 50/50 between baseline and Variant A. Adjust percentages as needed.

  • Naming: Optionally rename variants from “Variant A/B” to something meaningful. Click Next.

4. Define Goals and Metrics

  • Primary Goal Metric: Firebase uses this to determine the winner. Examples:

    • Open app / First opens

    • Conversion events (e.g., completed purchase)

    • Retention rates

  • Additional Metrics: Track up to five additional metrics to better understand performance. Examples:

    • Estimated total revenue

    • Retention (1 day, 2-3 days, 4-7 days)

    • Notification receives / dismissals (Android only). Click Next.

5. Set Delivery Options

  • Send Now: Launch the experiment immediately.

  • Scheduled: Specify a future start time.

  • Advanced Options: Modify notification behavior (sound, image, deep link) for all variants if needed.

6. Validate on Test Devices

Before sending to your full audience:

  1. Retrieve the FCM registration token from a test device:

Messaging.messaging().token { token, error in
  if let error = error { print("Error: \\(error)") }
  else { print("FCM token: \\(token)") }
}

  1. Go to Firebase Console → A/B Testing → Draft → Manage Test Devices.

  2. Assign the token to a specific variant.

  3. Run the app to verify the correct variant is received.

7. Review and Launch

  • Review: Check your variants, targeting, and metrics.

  • Start Experiment: Click Start Experiment to begin sending variants.

8. Monitor Results

  • Access the A/B Testing dashboard to track:

    • % Difference from baseline

    • Probability to beat baseline

    • Observed cumulative metrics (e.g., conversions, retention)

  • Typical experiment duration:

    • FCM & In-App Messaging: ≥7 days

    • Remote Config: ≥14 days

  • Firebase identifies the leader variant when enough data is collected.

9. Roll Out Winning Variant

  • Once a winner is identified, roll out to 100% of targeted users:

    • Notifications composer: send the winning message to remaining users.

  • If no clear winner, you can still roll out any variant to all user

Refer to this A/B Testing article for more information.

10. Interpreting Results

  • Look at probability to beat baseline → higher means better performance

  • Observe retention vs conversions → one variant may boost engagement, another revenue

  • Use BigQuery export to slice data further and validate metrics independently.

Best Practices for A/B Testing:

  • Test one variable at a time (copy, timing, or audience)

  • Avoid small sample sizes → ensure statistical significance

  • Use message preview & rich notifications to evaluate effectiveness

  • Track predictive behaviors for smarter targeting

Did this answer your question?
😞
😐
😁