so based on our comments my suggestion (it's somewhat what we've done our app):
you still have to have different separates links (one for Google Play and one for app, with their respective meta-datas), but with a little bit of hackery it works.
the browser gives the link: www.myapp.com/open
(with any extra parameter you might need) and one of the app activities you implement the intent filter
<intent-filter>
<data
android:host="www.myapp.com"
android:pathPrefix="/open"
android:scheme="http"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
this will open your app from the browser, where you can deep-link and/or pass any parameters necessary encoded in the URL. ps. for safety also add filters for m.myapp.com
, myapp.com
and https
or any other relevant variation
but, if the user does not have the app and the browser will actually try to load the URL www.myapp.com/open
then the response from this URL will redirect it to https://play.google.com/store/apps/details?id=com.myapp.awesomeness
(with any extra referrer meta-data you want to add to it.
it's a little bit hackery, but it works.
Hope it helps.