Set your button text, iOS hint and when the button should appear, and copy the snippet. It:
- catches
beforeinstallpromptand shows the button only when installation is possible; - shows a short "Share, then Add to Home Screen" hint on iPhone and iPad;
- hides itself when the app runs installed;
- reports
install_promptandapp_installedevents if you use Google Analytics.
The live preview uses this site's real install state: if your browser can install PWA.live, the preview button really installs it. Background in add your own install button.