How to prompt a banner on mobile web to promote users to download the app instead?

1.6k Views Asked by At

The website is developed with React. When users open my website on an iPhone or an Android phone, how to show a banner to promote the user to download or use the IOS or Android app instead of the website on a browser?

Here is an example with reddit.com, when opening reddit.com on an iPhone or an Android phone, it shows a banner like these to promote the users to use the Reddit ios or android app.

2

There are 2 best solutions below

2
On

On the opening of the website on the mobile browser, you can detect the device using the JS library react-device-detect.

if it's Android or iPhone/iPad you can show the banner and with the click of that button, you can use the Deeplink URLs for the android and iOS app. You can also use dynamic links if you want to send users to AppStore or Play Store.

1
On

you can use on your website : https://www.npmjs.com/package/platform

You can show a popup according to the relevant situation and send it with a dynamic link.