Our site uses PWA so that the visitor can choose to Add to Home Screen (A2HS). However, from Google Analytics data, the Dismiss rate is too high compared to Acceptance rate.
We plan to make the UX more intuitive and clearer to improve the acceptance rate. However, we also want to revive those visitors already dismissed the A2HS dialog.
How to do so? To the extend of my knowledge, we only can add beforeinstallprompt
listener but there is no openinstallprompt
method.
Open the menu next to the URL bar. Depending on whether you're using Chrome or Android you'll see a menu option "Install" or "Install App". This is the "Add to Home screen" option displayed for any site that has the necessary features in place.
The BeforeInstallPromptEvent is the interface of the beforeinstallprompt event fired at the Window object before a user is prompted to "install" a website to a home screen on mobile.
In Dev mode,
Try this in devtools(tried in chrome) console to trigger the event:
event = new Event('beforeinstallprompt')
window.dispatchEvent(event)
Caution: We won't be able to open the in-browser modal by calling prompt
on the event.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With