This is not a feature Firebase provides out-of-the-box.
Here are the steps you would need to implement it:
- Generate a Dynamic Link and set the
ifl link param to a URL on your website.
- Build a custom interstitial and host it at the URL you used in the
ifl param.
- 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.
ifl- Optional: The link to open when the app isn't installed. Specify this to do something other than install your app from the App Store when the app isn't installed, such as open the mobile web version of the content, or display a promotional page for your app. So, in the Firebase console, it will ask for Custom URL. - Sachin Vas