Firebase Dynamic Links Creation Guide

How to create dynamic links in Firebase.

Source Pixabay, By Skitterphoto

Firebase Dynamic Links help to control where a user lands depending on whether they have an app installed or not. Having such behaviour gives a richer user experience when interacting with marketing campaigns.

In this guide, we will go through different Firebase Dynamic Links components that you need to consider when creating a dynamic link. These help to ensure that users are directed to the desire landing page/app section and that marketing channels remain intact throughout the conversion.

Dynamic Link Components

There are four components of a dynamic link to keep in mind when creating a Firebase Dynamic Link:

  • What to do when a user already has the app installed?
  • What to do when a user clicks from Android without an app?
  • What to do when a user clicks from iPhone without an app?
  • Where to add UTM parameters to the URL of dynamic link?

Here is a typical flow of dynamic link:

Dynamic-link flow, by Muffaddal

What to do when a user already has the app installed?

Deep links are used in Firebase Dynamic Links when the user already has an application installed and they are targeted reactivation.

What are Deep Links?
Deep links are links that allow users to move to a specific section or piece of content of the app or website. For example, a deep link that when clicked takes the user directly to the product category section of the app.

The deep link contains all the information needed to point to a particular item.

Here is how to add deep links in Firebase Dynamic Links creation:

Deeplink URL in dynamic link creation, by Muffaddal

The above-entered deep link will trigger when users already have the app installed.

What to do when a user clicks from Android without an app?

In case of no Android app installed, a dynamic link allows to either open the Play Store app page or any custom URL.

Regardless of if the marketer wants to send the user to the website or the App Store, I will suggest going for a custom URL option. The reason for the custom URL is that we can add UTM parameters in the custom URL. Doing so lets us capture the UTMs in the native code of mobile application after the user has installed the app, which can be sent to any desire analytics platform such as Mixpanel, Amplitude, or Firebase Analytics. Read here for further details on how to capture the referral on the app install.

How to create a custom URL for Android?

This Play Store URL builder helps create a custom URL for android. Scroll to the bottom of the page to create the URL.

Here is an example Play Store URL builder values to add:

Play Store URL builder example values: by Muffaddal

Example custom URL generated by the Google Play URL Builder

Noticed the URL has a referrer parameter before UTMs? This parameter is what lets us capture the traffic info in the native code in Android.

Here is how it looks in Firebase:

Dynamic-link behaviour for Android, by Muffaddal

What to do when a user clicks from iPhone without an app?

Sending users to the App Store is similar to Android. The only change is that we don’t have to use a custom URL because as of writing this article App Store doesn’t have any API that would let us capture traffic sources within the native app similar to Android.

However, for iPhone, we add App Store campaign parameters. Doing so helps to see the campaign information directly in-app store analytics.

Dynamic link behavior for iPhone, by Muffaddal

See further details here

Where to add UTM parameters to the URL of dynamic link?

Although we added UTMs in the custom URL for Android, we also need to add UTM parameters in the final section of the dynamic link creation. The reason being is that when the user clicks the dynamic link with the app already installed, these are the values that we get in the native code to send to the analytics platform. Therefore, adding UTM here is a must as well.

This last section also has an option to add text and links for social media previews. Better to add relevant info there as well. See below image

UTM Parameters in the dynamic link, by Muffaddal

How to verify Dynamic Links?

Firebase provides a way to verify the behaviour of Firebase Dynamic Links. This allows seeing how the link would behave depending upon where the user clicks the link.

To verify the link paste it in the browser, and add ?d=1 at the end, and press enter. Doing so opens a chart showing how the user would move depending upon where they interact with the link.

Here’s an example image of what you will see:

dynamic link behaviour demonstration.

It depicts the behaviour of the dynamic link depending on the user’s platform. So for example from the top left, in the image, if the link is clicked from Android with the app installed then the dynamic link will get opened and if the app is not installed then the fallback URL gets triggered. The fallback URL in our case is the custom URL we entered.

How to View Dynamic Link Stats?

The first option is to view the stats, such as new and total clicks, directly in the Firebase console.

Firebase Dynamic Links creation report, by Muffaddal

The second option is to view it in Firebase analytics. Following are events that you will see in Firebase analytics.

firebase dynamic link click events in firebase analytics console

See here for details.


Firebase Dynamic Links provide a powerful way to control how users are sent to application depending upon their app install status. If properly created not only do dynamic links provide a better campaign experience but they also allow you to properly capture the marketing channel information in your analytics tools.

Read More on Firebase Analytics




Tutorials, deep-dives, and random musings from Firebase developers all around the world. Views expressed are those of the authors and don’t necessarily reflect those of Firebase or its parent companies.

Recommended from Medium

Beginning to code


Wireless Video Surveillance Robot using Raspberry Pi

How To Land Any Tech Internship Because You Can — Part II

Google’s Speech Recognition in 6 steps- Python

5 Lessons I learned as an Intern at a Startup

Ghost theme development using docker

Breaking captchas from scratch (almost)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
muffaddal qutbuddin

muffaddal qutbuddin

Muffaddal has around 5 years of experience working with web analytics and user behavior data.

More from Medium

Build personalized product notifications with conditional content blocks (examples included!)

Logic gates

How to use google analytics with Next.js

Mobile vs desktop app

App to the Future:

An image of three teenagers standing outdoors, slowly disappearing