Create a Custom Onboarding Experience

With Firebase Invites and Firebase Dynamic Links, you can implement a scalable, tailored onboarding experience for referred users, like the one Fabulous doubled their retention rate with.

Before you start, connect your Android or iOS app to a Firebase project. Follow the steps in Get started for Android or Get started for iOS.

Implementation overview

  1. Set up Dynamic Links to programmatically generate custom links from your app. You can set up Dynamic Links in the Firebase Console, then use the iOS and Android SDKs to generate new links with custom parameters from your app when users click the invite link.
  2. Add Invites to your app and make it easy for your users to share Dynamic Links. When users invite their friends to your app, the app creates a Dynamic Link with a payload, and the user shares the Dynamic Link through the familiar, native, system dialog.
  3. Send invited users to the right place by reading data from the incoming Dynamic Link. When an invited user comes to your app for the first time through a Dynamic Link, get its info packet and launch a custom onboarding experience that delights your new user.

Set up Dynamic Links

Use the iOS and Android Builder APIs to create a short link with the parameters you need. We're exploring the user-to-user implementation here, but you can explore other implementations in the Dynamic Links documentation.

What to do in the Firebase console

  1. Go to Settings.
  2. Select your project and make note of the Web API Key.
  3. Next, go to Dynamic Links and click Get Started.
  4. The Firebase console has a guided flow for creating a Dynamic Link, but we're not going to use this right now, so click Cancel.
  5. To programmatically create Dynamic Links in your app, you need the short link specific to your project. That URL is in the top-left corner of the Dynamic Links window. When you click it, it's automatically copied to your clipboard.

What to do in your app

  1. Create a Dynamic Link programmatically using the iOS Builder API or the Android Builer API.
  2. Add parameters to your Dynamic Link so you can route your new user to their tailored onboarding experience. For example, the date, a user ID, or region.

Add Invites to your app

Let's assume one of your happy users wants to share your app. To make it as easy as possible for your users to invite their friends, follow these two best practices:

  • Put the invite link in an easily discoverable place.
  • Suggest inviting friends when users accomplish something in the app. For example, when they win a level, finish a task, share a post, or receive positive interaction from others.

What to do in your app

Once you've generated the Dynamic Link, open the system share dialog from your app. In Android, add code similar to the following examples:

Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, "Try this amazing app: " + dl.shortLink);
startActivity(Intent.createChooser(intent, "Share using"));

This way, your users can share the app using their preferred messaging app or social network.

Onboard invited users

When users follow an invite link to your app, you can get the info packet from the Dynamic Links they followed (for example, with the inviter’s nickname, username, etc). You can use that information to delight your new user.

For example, if your game has clans, you might prompt the new player to join the inviting player’s guild after the tutorial. Or, if you have a photo-sharing app, you might prompt your new user to follow the inviting user during the onboarding flow.

What to do in your app

To read data from the Dynamic Link, follow the steps to receive Dynamic Links on Android or iOS.

Once you've extracted the data from the Dynamic Link, create a custom onboarding experience for your new, referred users.

Test that it works

Send yourself an invite from your app and make sure your new, custom onboarding experience works the way you intend it to. Note: When you send an invite from an unsigned app (for example, from your development environment), you might see a warning when you click the link.

Send feedback about...

Need help? Visit our support page.