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.