Add to homescreen Event On Amp Analytics

372 Views Asked by At

I use PWA with AMP. I want to track users that clicked to Add To Homescreen button, but AMP doesnt allow custom javascripts. I use amp-analytics component. How can i trigger on PWA's "beforeinstallprompt" event on AMP ?

1

There are 1 best solutions below

0
On

I'm not sure if this is possible at all. As you are well aware, AMP doesn’t allow custom JavaScript.

I've read about The Washington Post using PWA and AMP-HTML together at a certain extent using amp-install-serviceworker but not entirely sure if this is your use case.