简体   繁体   中英

Showing an interstitial with Firebase Dynamic Links

On the official page for Firebase Dynamic links ( https://firebase.google.com/docs/dynamic-links/ ) there is a mention of showing an interstitial if the app is not installed: https://youtu.be/LvY1JMcrPF8?list=PLl-K7zZEsYLmOF_07IayrTntevxtbUxDL&t=87

Dynamic Links work seamlessly across iOS, Android, and desktop and mobile web. Dynamic Links can be configured to provide the best possible user experience, whether that's a personalized app launch, a fast interstitial, or opening your mobile website.

How can you do that?

This is not a feature Firebase provides out-of-the-box.

Here are the steps you would need to implement it:

  1. Generate a Dynamic Link and set the ifl link param to a URL on your website.
  2. Build a custom interstitial and host it at the URL you used in the ifl param.
  3. Within that interstitial, insert a second Dynamic Link with an ifl param pointed to the App Store
    • This step should not be necessary because the Firebase docs state that users without the app should be automatically forwarded to the App Store by default, but I have never seen this actually happen — users without the app are always taken to the URL in the link param in my testing).
    • If you set a link param on this second link, it will overwrite the value from the initial link. You need to either leave link blank, or pass it through.

Alternative

If you don't want to deal with this, you should check out Branch.io (full disclosure: I'm on the Branch team). The Branch Journeys feature does exactly this for your own website, and the Deepviews feature provides the same thing if you don't have a website and don't want to set one up.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM