Firebase Dynamic Links: What It Is, How It Works, and How to Use It in Development

Author: IT Sectr Published: 2026-05-14 Reading time: 8 min

Firebase Dynamic Links is a Google service for creating smart links that direct users to the right place in an app regardless of whether the app is installed or not. According to Firebase Documentation, Dynamic Links automatically redirect users to the App Store or Google Play if the app is not installed and restore the transition context after installation. Firebase Smart Links solve the URL Scheme problem, which does not work with uninstalled apps.

Key Takeaways

  • Firebase Dynamic Links — a Google service for creating universal links that work on iOS and Android with deferred deep link support.
  • Deferred — the main advantage: the link preserves the transition context even if the app is not installed and restores it after installation.
  • Analytics — Firebase automatically tracks Dynamic Link clicks and provides data in Firebase Analytics and Google Analytics.
  • Platforms — Dynamic Links work on iOS (via Universal Links) and Android (via App Links) with a single universal link for both platforms.
  • Creation — links are generated through Firebase Console, REST API, or client SDK with behavior configuration for each scenario.

Firebase Dynamic Links is a cloud service from Google that creates unified universal links for mobile apps on iOS and Android. A dynamic link contains a deep link to content inside the app but behaves like a regular HTTPS link: if the app is installed, it opens it directly; if not, it redirects to the app store.

Unlike regular URL Schemes, Dynamic Links can work with uninstalled apps thanks to deferred deep link technology. When a user installs the app after clicking the link, Firebase saves the transition parameters and passes them on the first launch. This opens up opportunities for referral programs, marketing campaigns, and invitations.

Difference from Regular URL Schemes

URL Schemes require the app to be installed and have no standard fallback mechanism. Firebase Dynamic Links solve this problem through an intermediate Firebase web service that determines the app installation status on the device and routes the user correctly. At the same time, one link works identically on both platforms.

Firebase Dynamic Link uses a domain like yourcode.page.link, which is registered in Firebase Console. When a user clicks such a link, Firebase determines the device type and app installation status. For iOS, the Universal Links mechanism is used; for Android, App Links with automatic verification via Digital Asset Links.

The processing flow includes several sequential stages: when the link is clicked, the browser sends a GET request to the Firebase server; the server determines the platform and checks for the app on the device. If the app is installed, a redirect is generated to a Universal Link or Intent with parameters to open the target screen. If the app is not installed, it redirects to the App Store or Google Play for download.

Dynamic Link Lifecycle

The app receives the link during Firebase SDK initialization. The getDynamicLink() method returns a PendingResult with transition data. After successful retrieval, the deep link parameters, UTM tags for analytics, and arbitrary data passed when creating the link are extracted.

Firebase Console provides a visual interface for creating Dynamic Links. The developer specifies the deep link URL, campaign name, settings for iOS and Android separately, and analytics parameters. After creation, Firebase generates a short link like https://yourcode.page.link/abc123, which can be used in advertising materials, email campaigns, and social networks.

For programmatic creation of Dynamic Links, the Firebase REST API or client SDK is used. The REST API allows bulk link generation for marketing campaigns with custom parameters, including social network links and asynchronous click analytics. When creating links via the API, it is important to correctly specify the socialMetaTagInfo parameters — they determine how the link appears when shared in messengers and social networks with a preview card.

Dynamic Link Parameters

ParameterPurposeRequired
Deep Link URLInternal link to app contentYes
iOS Bundle IDApp identifier in the App StoreFor iOS
Android Package NamePackage name in Google PlayFor Android
Fallback URLWeb page if the app is not installedNo
UTM TagsParameters for Google AnalyticsNo

To work with Firebase Dynamic Links on iOS, you need to integrate the Firebase SDK via CocoaPods or Swift Package Manager, configure Info.plist with GOOGLE_APP_ID, and register the Dynamic Links domain in the project’s Associated Domains. After that, the app automatically handles Universal Links generated by Firebase.

In Xcode, you need to add the Associated Domains capability with an entry like applinks:yourcode.page.link. The Firebase SDK uses the application(_:continue:restorationHandler:) method to handle Universal Links, so no additional integration with AppDelegate is required — Firebase automatically extracts Dynamic Link parameters from User Activity.

Configuration in Xcode

Example of Info.plist configuration for proper Firebase initialization and Dynamic Link handler registration. The FIROptions key should contain the project identifier from GoogleService-Info.plist.

xml
<key>FirebaseDynamicLinksCustomDomains</key>
<array>
    <string>https://yourcode.page.link</string>
</array>
<key>FirebaseAppDelegateProxyEnabled</key>
<false/>

If the AppDelegate proxy is disabled, you must manually call the handleUniversalLink(_:) method and pass the User Activity from the continue NSUserActivity. The Firebase SDK automatically extracts the link parameters and returns a DynamicLink via the completion handler.

On Android, Firebase Dynamic Links integration starts with adding dependencies to build.gradle and the google-services.json file from Firebase Console. The Dynamic Links domain is registered in Firebase Console, after which all links with this domain are automatically recognized by the Android app via an Intent Filter with action VIEW. For proper operation, you also need to add the Google Services plugin to the root and module build.gradle and perform Gradle synchronization.

To correctly handle links on Android, you need to add an Intent Filter for the Dynamic Links domain in the Activity that should receive incoming links. The filter must include the https scheme, your Dynamic Links domain host, and the default path.

Intent Filter for Dynamic Links

Example of Intent Filter in AndroidManifest.xml for receiving Dynamic Links on the yourcode.page.link domain.

xml
<activity android:name=".MainActivity"
    android:launchMode="singleTask">
    <intent-filter
        android:autoVerify="true">
        <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="yourcode.page.link" />
    </intent-filter>
</activity>

It is important to set launchMode to singleTask for the Activity that receives Dynamic Links. This prevents creating a new instance of the Activity on repeated link clicks and allows handling all incoming deep links in a single instance.

The Firebase SDK for Android provides the FirebaseDynamicLinks.getInstance().getDynamicLink(intent) method, which returns a PendingTask object with link data. The deep URI, UTM parameters, and transition timestamp are extracted from the DynamicLink object. It is recommended to handle this in the onCreate() and onNewIntent() methods of the Activity.

When handling, it is important to consider that a Dynamic Link can be received both when launching the app from a cold start and when transitioning from another app to an already running app. For the second case, you need to override onNewIntent() and re-call the Dynamic Link check.

Handling in Kotlin Code

Example of receiving and handling a Firebase Dynamic Link in MainActivity. The code handles both cold start and transition from another app.

kotlin
class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        checkDynamicLink(intent)
    }
    override fun onNewIntent(intent: Intent) {
        super.onNewIntent(intent)
        checkDynamicLink(intent)
    }
    private fun checkDynamicLink(intent: Intent) {
        FirebaseDynamicLinks.getInstance()
            .getDynamicLink(intent)
            .addOnSuccessListener link ->
                val deepLink = link?.link.toString()
                handleDeepLink(deepLink)
            }
    }
}

The addOnSuccessListener method returns a DynamicLink, from which the target link is extracted via link?.link. If the listener returns null, it means the Intent does not contain a Dynamic Link — this is a normal app launch without an incoming link. UTM tags for click analytics are also available, including campaign, medium, source, and content, which can be passed to Google Analytics for detailed evaluation of each marketing channel’s effectiveness.

Frequently Asked Questions

How is Firebase Dynamic Links different from a regular deep link?

Firebase Dynamic Links supports deferred deep link — the link preserves the context even if the app is not installed. After installation, the app receives all the transition parameters, which is impossible with regular URL Schemes or Universal Links.

Do I need to pay for Firebase Dynamic Links?

Firebase Dynamic Links are included in the free Firebase Spark pricing plan. There are no limits on the number of links you can create. However, since 2024 Google has announced a transition to a new infrastructure, so the terms may change.

Can Dynamic Links be used in a web app?

Dynamic Links are designed for mobile apps. When clicking the link from a desktop web browser, it will open the fallback URL. For web apps, use regular links or your own redirect logic.

How to test Dynamic Links during development?

Firebase Console provides a Test Dynamic Link button for previewing behavior. You can also use the Android emulator or iOS simulator with the Firebase SDK installed for local testing of all transition scenarios.

How many characters can a Dynamic Link contain?

A short Firebase Dynamic Link consists of the page.link domain and a random suffix about 7 characters long. The total length is approximately 30 characters. The deep link inside can be any length, but it is recommended to keep it under 2 KB for compatibility.

Summary

  • Firebase Dynamic Links — unified universal links from Google for iOS and Android with deferred deep link support.
  • How it works — the link goes through the Firebase server, which determines the device and app installation status for correct routing.
  • Deferred — key advantage: transition parameters are saved and restored after app installation from the store.
  • Creation — links are generated through Firebase Console, REST API, or client SDK with parameter configuration for each platform.
  • iOS Integration — requires Associated Domains in Xcode and Firebase SDK; handling via Universal Links and the continue UserActivity method.
  • Android Integration — requires Intent Filter in the manifest with action VIEW and the Dynamic Links domain, plus Firebase SDK in build.gradle.
  • Analytics — Firebase automatically tracks Dynamic Link clicks with UTM tag support for Google Analytics.

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