Paul Kinlan, developer advocate for Chrome and the open web at Google writes:
window.onappinstalledevent. It's triggered when a user installs a progressive web app via the Add to Homescreen API or now more importantly via the manual method of Add to Homescreen.
This is a very useful addition because it allows you to see engagement on the prompt vs people who use the system banners or menu buttons to install a progressive web app.
Now you can track your PWA's install engagement based on the method of install — via the prompt or manually via a custom prompt. Read the docs for more details.
Also, make sure you subscribe to JS Party to hear discussions about PWAs and the web platform.