Firebase Dynamic Links: what it is, creating links and integration

Author: IT Sectr Published: 2026-04-29 Reading time: 9 min

Firebase Dynamic Links is a Google service for creating smart links that take users to the right place inside a mobile app or to a website, depending on whether the app is installed on the device. Dynamic Links preserve the transition context even on the first launch after installation from the app store. According to Firebase Documentation, 2026, dynamic links are processed in a single API that automatically determines the behavior: open the app, go to the website, or install the app. The service is indispensable for referral programs, onboarding scenarios, and marketing campaigns.

Key Takeaways

  • Dynamic Links — smart links that automatically determine whether to install the app or open an already installed one on the desired screen.
  • Deferred Deep Linking — preserving the transition context on the first launch after installation: the user sees the target screen, not the main one.
  • Link Domain — a custom domain like your-app.page.link that can be branded in the Firebase Console.
  • Client-Side Processing — links are processed through the Firebase Dynamic Links SDK for Android and iOS with arguments passed to intent or scene.
  • Analytics — Firebase automatically collects statistics on clicks, installs, and transitions through Dynamic Links.

Firebase Dynamic Links is a Google technology that creates a single link leading to the desired content in a mobile app or website, adapting behavior depending on the platform and installation status. The link checks whether the app is installed on the device: if yes — it opens the app with parameters passed, if not — it directs to Google Play or the App Store for installation, and after installation redirects to the target screen.

Key Feature: Deferred Deep Linking

The main advantage of Dynamic Links over regular deep links is support for deferred deep links. Deferred Deep Linking means that the transition context (link parameters) is preserved even if the app is not yet installed. When the user installs the app from the store, the Dynamic Links SDK reads the saved context and passes it to the desired screen. Without this technology, the user would simply land on the main screen after installation, losing the promo code, invitation, or link to a specific order.

Use Cases

Dynamic Links are used in referral programs to attract new users with attribution to the inviter's account. Marketing campaigns with transitions from email newsletters and social networks use Dynamic Links for precise conversion measurement. In onboarding scenarios, the link takes a new user to a welcome screen with personalized content. In e-commerce, product links preserve context and lead to the product card even on the first launch after installation.

The working mechanism of Dynamic Links consists of several stages, each of which can vary depending on the app state. When a user clicks a dynamic link, the browser sends a request to the Firebase server. Firebase checks whether the app is installed using intent-filter or universal link verification. If the app is installed, Firebase opens it with the deep link passed. If not — it redirects to the store page or web version.

Anatomy of a Dynamic Link

A standard Dynamic Link consists of a base URL, link parameters, and optional marketing tags. The base URL is a domain like your-app.page.link registered in the Firebase Console. Deep link parameters are set via query parameters: link (target URL inside the app), apn (Android Package Name), ibi (iOS Bundle ID), st and sd (title and description for social preview). Marketing tags utm_source, utm_medium, utm_campaign are passed to Google Analytics for tracking.

ParameterDescriptionExample
linkTarget deep linkhttps://yourapp.page.link/product/123
apnAndroid Package Namecom.example.myapp
ibiiOS Bundle IDcom.example.myapp.ios
stSocial titleSpecial offer
sdSocial description30% discount on your first order

Firebase Console provides a visual interface for creating Dynamic Links in the Engage > Dynamic Links section. In the console, you can set all link parameters, including the deep link, web behavior, social metadata, and UTM tags. After creating the link, the console provides a ready-to-use URL as well as statistics on clicks and transitions. For bulk link creation, the Firebase Dynamic Links REST API with OAuth 2.0 authentication is used.

Creating a Link via REST API

For programmatic creation of Dynamic Links, a POST request is made to the Firebase Dynamic Links API. The request body contains dynamicLinkInfo with deep link parameters, platform settings, and social metadata. The API returns a ready-to-use URL like https://your-app.page.link/abc123. For long-lived links, suffix.option = UNIQUE is used — short links with a unique suffix. For temporary links — SHORT, with possible collisions.

js
const axios = require("axios")

const apiUrl = "https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=API_KEY"

const data = {
    dynamicLinkInfo: {
        domainUriPrefix: "https://yourapp.page.link",
        link: "https://yourapp.com/promo/summer",
        androidInfo: { androidPackageName: "com.example.myapp" },
        iosInfo: { iosBundleId: "com.example.myapp.ios" },
        socialMetaTagInfo: {
            socialTitle: "Summer promotion",
            socialDescription: "Up to 50% off until the end of the month"
        }
    },
    suffix: { option: "UNIQUE" }
}

axios.post(apiUrl, data)
    .then(res => console.log(res.data.shortLink))
    .catch(err => console.error(err))

Short Links and UTM Tags

Dynamic Links automatically generate short URLs with 6–8 characters after the domain, making them suitable for use in SMS and social networks. UTM parameters are added via the utmParameters field or directly in the link parameter. Firebase automatically links clicks on Dynamic Links with Google Analytics for Firebase, allowing you to track referral traffic and campaign attribution.

Integrating Dynamic Links in Android

Setting up Dynamic Links in Android includes adding the Firebase SDK, configuring the intent-filter for the activity that receives deep links, and processing links through the Firebase Dynamic Links SDK. After installing the SDK and adding google-services.json, you need to register the activity in AndroidManifest.xml with an intent-filter for processing links from your app's domain.

Setting up intent-filter in AndroidManifest

The activity that processes Dynamic Links must have an intent-filter for the VIEW action and the DEFAULT and BROWSABLE categories. AndroidManifest.xml includes a data tag with android:scheme, android:host, and android:pathPrefix corresponding to your deep link. For processing links from the page.link domain, an intent-filter with the https scheme and your Dynamic Links domain host is also added.

xml
<!-- AndroidManifest.xml -->
<activity android:name=".MainActivity">
    <intent-filter>
        <action android:name=
            "android.intent.action.VIEW" />
        <category android:name=
            "android.intent.category.DEFAULT" />
        <category android:name=
            "android.intent.category.BROWSABLE" />
        <data android:scheme="https"
            android:host="yourapp.com"
            android:pathPrefix="/promo" />
    </intent-filter>
</activity>

Processing the Link in Code

After setting up the intent-filter, you need to process the incoming Dynamic Link in the Activity code. FirebaseDynamicLinks API receives the link from the intent and returns a PendingDynamicLinkData object with extracted parameters. The getLink method returns the target deep link, which can be parsed and used for navigation. It is important to handle the link both on cold start (via getIntent in onCreate) and on warm start (via onNewIntent).

Integrating Dynamic Links in iOS

Setting up Dynamic Links in iOS requires configuration both on the Firebase side and in the Xcode project. You need to upload an APNs key to the Firebase Console, add the Firebase SDK via Swift Package Manager or CocoaPods, and configure the App Delegate to handle Universal Links. Dynamic Links in iOS use Universal Links for seamless transition between the browser and the app without an intermediate page.

Setting up Universal Links

Universal Links is an Apple technology that connects your domain with a mobile app. The apple-app-site-association (AASA) file is uploaded to the server at https://your-app.page.link/apple-app-site-association. Firebase automatically creates and maintains this file for your Dynamic Links domain. In Xcode, you need to enable Associated Domains and specify applinks:your-app.page.link in the project Capabilities.

Processing the Link via Firebase SDK

For iOS, Dynamic Links processing is done through the Firebase SDK in the App Delegate or Scene Delegate. The application:continueUserActivity: method intercepts the incoming Universal Link and passes it to the Firebase Dynamic Links API, which extracts the target link and parameters. Firebase SDK automatically handles Deferred Deep Links by requesting installation data through the Firebase Installation API short-term storage.

swift
import FirebaseDynamicLinks

class AppDelegate: UIApplicationDelegate {

    func application(
        _ application: UIApplication,
        continue userActivity: NSUserActivity,
        restorationHandler: @escaping
            ([UIUserActivityRestoring]?) -> Void
    ) -> Bool {
        return DynamicLinks.dynamicLinks()
            .handleUniversalLink(userActivity.webpageURL!) {
                dynamicLink, error in
                if let link = dynamicLink?.url {
                    self.handleDeepLink(link)
                }
            }
    }
}

Implementation Example in Kotlin

Let's look at a complete example of processing a Dynamic Link in an Android app using Kotlin. MainActivity reads the incoming Dynamic Link on both cold and warm start of the app. The link is parsed into parameters that are used for navigation to the desired screen with arguments passed. The example shows processing a link to a promotion page with a promo campaign identifier.

kotlin
class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        handleDynamicLink(intent)
    }

    override fun onNewIntent(intent: Intent) {
        super.onNewIntent(intent)
        handleDynamicLink(intent)
    }

    private fun handleDynamicLink(intent: Intent) {
        FirebaseDynamicLinks.getInstance()
            .getDynamicLink(intent)
            .addOnSuccessListener { data ->
                val deepLink = data?.link ?: return@addOnSuccessListener
                val promoId = deepLink
                    .getQueryParameter("promoId") ?: ""
                if (promoId.isNotEmpty()) {
                    navigateToPromoScreen(promoId)
                }
            }
            .addOnFailureListener { e ->
                Log.e("DL", "Link processing error", e)
            }
    }
}

Testing Dynamic Links

For testing Dynamic Links, the Firebase Console is used, where you can create a test link and send it to a device via messenger or email. Firebase Dynamic Links Debugger is available at https://your-app.page.link/?d=1 and displays detailed information about the link behavior. When testing Deferred Deep Links, you need to ensure the app is uninstalled, and after installation the link leads to the correct screen with the passed parameters.

Frequently Asked Questions

What is the difference between Dynamic Links and regular deep links?

Regular deep links work only when the app is installed and do not preserve context after installation. Dynamic Links support Deferred Deep Linking — the user installs the app and immediately lands on the target screen with the preserved link parameters.

Do I need a server for Dynamic Links to work?

No server is required for creating and processing links — all operations are performed through the Firebase Console, REST API, or Firebase SDK on the client side. For bulk link generation, the REST API is recommended, but the console is suitable for manual creation.

How long does a Dynamic Link live?

Dynamic Links have no expiration — they are stored in Firebase forever unless manually deleted. Short links with the UNIQUE suffix exist indefinitely. It is recommended to create unique links for each campaign for accurate attribution.

Do Dynamic Links work without internet?

Processing a Dynamic Link requires an internet connection at the click stage because the Firebase server checks the app installation status. After the link is processed, the data is passed to the app via intent or Universal Link and becomes available even offline.

How much do Firebase Dynamic Links cost?

Firebase Dynamic Links are free under the Spark plan. In the Blaze plan, there is a limit of 50K clicks per day per project at no additional charge. Exceeding the limit blocks the creation of new links until the next day.

Summary

  • Firebase Dynamic Links — smart links that take users to the app or website, and when the app is missing — to the store with context preserved after installation.
  • Deferred Deep Linking — the key advantage that allows passing context (promo code, invitation, product link) on the first launch after installation.
  • Link structure includes a base domain (your-app.page.link), deep link parameters, platform settings, and social metadata for preview.
  • Link creation is done through the Firebase Console, REST API, or Firebase SDK with support for UTM tags for integration with Google Analytics.
  • Integration in Android requires setting up an intent-filter in AndroidManifest and processing through the FirebaseDynamicLinks API with support for cold and warm start.
  • Integration in iOS uses Universal Links with an AASA file, Associated Domains, and processing through the DynamicLinks SDK in AppDelegate or SceneDelegate.
  • Free up to 50K clicks per day, no link expiration, with the ability to create a custom domain for link branding.

We will develop a mobile application turnkey

IT Sectr creates iOS and Android applications for startups and businesses since 2017. We will advise you and propose the best solution.

Discuss the project

Read also