Developer ToolsGoogleTechnical

Is Branch a Replacement for Firebase Dynamic Links?

By December 27, 2016 6 Comments

If you have ever tried to build anything more than a very basic mobile app, you probably ran into the need for a backend. You likely then discovered that designing and maintaining one of these is no simple task. Enter BaaS (Backend as a Service) platforms like Firebase and Parse — game-changers for developers who want to focus on building an app.

Google snapped up Firebase in 2014, and it has since evolved from a simple BaaS provider into a full “App as a Service” platform, with a suite of new tools for building and growing an app. For developers, this is fantastic news: it’s now easier than ever to get an MVP up and running. Since many of us on the Branch team are mobile engineers ourselves, we find the potential of the Firebase toolkit very exciting and we highly recommend giving it a look as a way to jumpstart work on new projects.

Of course, there is a downside too: these new tools are competing in service verticals that have already seen more than four years of innovation and product advancement. We believe Google bit off more than even they can chew by trying to launch almost a dozen at the same time. The result is that many of these new components are classic cases of “a mile wide and an inch deep.” It can be hard to know when you have grown enough to need something more powerful, and shortcomings may not be obvious until too late, after you’ve already built a core part of your app on top of the platform.

At Branch, solving the app discovery problem through better linking has been our focus for the last three years, which means we deal with more app deep links than anyone else on the planet (300 million per day, as of December, 2016). With this in mind, let’s take a closer look at the Firebase Dynamic Links module and see how it compares to the Branch linking platform. We will also show how easy it is to implement Branch instead of Dynamic Links if you need more power, while still using the rest of the Firebase toolkit.

Firebase Dynamic Links

The Firebase team wrote an introductory blog post for Dynamic Links that outlines the core issue they are attempting to solve: linking to content inside apps is hard. The post goes on to identify some key requirements that apply to any link system for mobile apps:

  • Launch app if installed and take users directly to content
  • Route to App/Play Store if not installed and take users to content after download
  • Capture analytics and tracking data

Dynamic Links fulfills these basic requirements. At least, enough of them to give you a taste of the potential of deep linking. However, this is one of the newest and least developed Firebase components, and you will quickly run out of juice if you want to do anything more advanced.

Dynamic Links != Branch Hosted Links

The requirements above are the same ones we identified when we began building Branch back in 2014. They are the core of a successful deep link service, and the foundation for everything Branch has built as we’ve become the linking infrastructure for the world’s best apps. But the devil is in the details. As an app developer, what can you actually do with these links?

 

Dynamic Links Branch
Generate links inside the app X X
Generate links using online dashboard X X
Non-spammy link URLs X
Flexible, custom data parameters per link   X* X
Route to specific content, even when app is not installed X X
Standardized link data response in JSON format X
First-time install attribution X
Guarantee match accuracy during first-time install X
Identify unique users (for referrals, etc.) X
Industry-leading, SLA-backed technical support X
Comprehensive edge case handling (including Facebook and email) X


* Must be manually encoded as part of link URL

A Practical Example

That looks good as a table, but what if we want to implement equivalent deep link functionality in a simple iOS app, like our office Branch Room Maps appLet’s compare the code directly.

First we need to start a session and handle incoming links. Here’s what that looks like using Firebase:

And the same thing, implemented with Branch:

As you can see, fairly similar so far. Most things are slightly simpler on the Branch side, but nothing a good programmer couldn’t handle.

Next, let’s create some links. Firebase first:

Now with Branch:

Again, a bit more manual work in the code for Firebase, though the real difference is the link URLs themselves (branded links really do matter).

But most importantly, what can you actually do with these links when they are used? Here is the data you get from those dump statements back in the AppDelegate:

Firebase:

url: https://branch.io/room?roomID=PineCone

Branch:

+click_timestamp: 1482541476
+clicked_branch_link: 1
+is_first_session: 0
+match_guaranteed: 1
+referrer: https://www.google.com/
+phone_number: //only returned when link is SMSed from desktop to mobile
~creation_source: 3
~referring_link: https://branchmaps.app.link/D1PpymBZlz
~feature: sharing
~channel: Pasteboard
~id: 341010052121261919
$one_time_use: 0
$og_title: Pine Cone
$identity_id: 339834809826614244
$canonical_identifier: room/PineCone
$publicly_indexable: 1
$exp_date: 0
room_name: Pine Cone

Here, the two platforms are not even close. Branch gives you a whole list of useful contextual parameters, including install detection (+is_first_session) and matching accuracy (+match_guaranteed). Install detection is critical for building experiences like customized onboarding, and matching accuracy allows deep linking to personalized content with the confidence that you have the correct user, which Branch does better than anyone else in the ecosystem.

In fact some of our customers trust our accuracy so much that they use Branch links to automatically log users into an app the first time they open it.

Firebase returns a simple raw URL.

And this is where Dynamic Links end. They’ll send your users where you want them (most of the time…if you don’t run into too many edge cases) and track link clicks, but not much else. On the other hand Branch is only just getting started. For us, a solid deep linking system is just the framework on which to build everything else:

  • Journeys Smart Banners: the most powerful and flexible app smart banner available.
  • Deepviews: increase conversion by giving users a preview of content inside your app prior to download.
  • Deep Linked Email: automatically add deep links to your marketing emails.
  • Referrals: track referrals and give credits to your users.
  • Data Integrations: automatically send your link analytics data to external tools.
  • Text Me The App: let desktop visitors send themselves a download link via SMS.
  • Comprehensive Analytics: track your link clicks, installs, best-performing content, most valuable users, and more.

Plus since we are app developers and programmers ourselves, we understand how important it is to get help when you need it. We monitor every question on StackOverflow with the Branch.io tag, and our Integrations team offers free unlimited support for ALL partners.

How To Get the Best of Both Worlds

Here’s the best part: you don’t have to choose. Firebase is implemented as a series of independent, modular SDKs. You have to add another SDK to implement Dynamic Links anyway, so it’s just as easy to use Branch instead. In fact, it’s probably easier! You can have all the benefits of the Firebase platform AaaS platform, and the flexibility and power of the world’s most advanced mobile deep linking system.

  • Cédric Soubrié

    Hello,
    Thanks for this useful article.

    What do you mean by “Guarantee match accuracy during first-time install”. Firebase has having making matches in some cases ?
    Do you know which one ?

    • Alex Bauer

      Hi Cédric,

      Great question! The answer is no, Firebase is never able to completely guarantee the accuracy of first time installs. Because of the fingerprint-based approach Firebase uses for matching, there is always a slight chance two devices could end up with the same fingerprint. In that situation, it’s pure chance whether you will get the right link data or not. If you’re deep linking to something public (like a restaurant listing or a radio station), this is not a major problem. If it’s anything more private (flight reservations, or a customized onboarding using personal data), you definitely want 100% guaranteed matching.

      You can read more about the importance of matching accuracy in this blog post, and find out how Branch does it in our documentation.

      Note that this only matters if the app is not yet installed. Once installed, all matches will be guaranteed on both Branch and Firebase.

      • Cédric Soubrié

        Thanks for the quick answer. Are you aware of this limitation for Firebase : http://stackoverflow.com/questions/43491846/how-to-handle-lifetime-in-firebase-dynamic-links-ios ? I’m experiencing the same problem but it seems to be a bit odd to me if Firebase really have this limitation.

        • Alex Bauer

          Wow, no we hadn’t heard about that one! We knew Firebase had been working to implement a different approach to matching, so this could be a relatively recent change. Thanks for letting us know about it.

          Since the Firebase support team has confirmed this is the intended behavior, it sounds like there is no workaround at this time (if using Dynamic Links is a requirement for you). You couldn’t definitely give Branch a try though — it’s a fairly easy drop-in alternative.

          • Cédric Soubrié

            They changed the delay to one hour now. That’s way better.

          • Alex Bauer

            That’s good news. Unfortunate that there is still no guaranteed match or option to configure this time window yourself, but 60 minutes is definitely more sensible than 5.

            Thanks for the update!