Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to shorten a Firebase Dynamic Link using my own domain name

I'm trying to implement Firebase Dynamic Links in an iOS app. The goal is to have a clean URL for marketing purposes so folks can share links on social media. The idea is folks will share the clean URL that starts with my domain name.

When the app is installed following a click on that link, we want to be able to track who referred the app install by looking at the payload delivered by Firebase. I think this goal is similar to Firebase's use case to convert web users to mobile app users.

An example link I would like to provide for sharing on social media is: http://example.com/my-payload-here

I've tried several cases but I'm not able to get the behavior I'm looking for in any case. Has anyone implemented this successfully before?

Here is my test procedure:

  1. Uninstall the app
  2. Send the link to be tested in an iMessage to myself
  3. Tap the link on my iOS device (not using a simulator)
  4. Install the app from the App Store
  5. Launch the app after download completes by tapping "Open" button in the App Store

Below are my findings:

  1. Short link generated from the Firebase Console (https://xyz.app.goo.gl/ABCD) - Link opens in App Store. I install the app. When I launch the app after installing, the payload is not delivered. If I quit out of the app, go back to the link in iMessage, and launch a second time, the payload is delivered.

  2. Long link identical to the "Long Dynamic Link" from the Firebase console for the link generated in #1 (https://xyz.app.goo.gl/?link=http://example.com/my-payload-here&isi=12345&ibi=com.example.MyApp) - behavior is identical to #1

  3. Short link using my domain (http://example.com/redirect/my-payload-here, configured to 301 redirect to URL in #2) - Opens in App Store. I install. When I launch the app after installing, the payload is not delivered. If I quit out of the app, go back to the link in iMessage, and launch a second time, the link still goes to the App Store.

Some questions I have:

  1. Why isn't the payload delivered on the first launch for cases 1 and 2?
  2. How can we make this launch the app and deliver the payload instead of going to the App Store?

I've also consulted the Firebase flowchart for the deep link in case 2.

like image 577
Zach Rattner Avatar asked Dec 23 '16 17:12

Zach Rattner


People also ask

How do I shorten URL in Firebase?

The links can be shortened in the Firebase console in the Dynamic Links tab. Tap on 'New Dynamic Link', which gives you an option to create a short link from an existing link.

How do I customize my URL on Firebase?

Open the Dynamic Links page of the Firebase console. If you haven't used Dynamic Links before, click Get Started. Otherwise, click Add URL prefix from the drop-down menu. Then, complete the setup wizard, specifying the domain and path prefix you want to use when prompted.


1 Answers

Google Firebase team added support for custom subdomains to Dynamic Links.

  • You can now specify up to five custom page.link subdomains for your Dynamic Links. Short links using these new custom subdomains look like the following example: https://example.page.link/abcXYZ

  • Firebase Dynamic Link domains assigned on projects couldn't be deleted at this time.( firebase team is working on it.)

  • You can now whitelist the URL patterns that can be used as a Dynamic Link's deep link (link) or fallback link (ifl, ipfl, afl, ofl). If you define a whitelist, Dynamic Links won't redirect to URLs that don't match a whitelisted pattern.

  • You can try both of these features in the Firebase console.

like image 64
3netra Avatar answered Oct 09 '22 08:10

3netra