My site is a progressive web app (single page / SPA) that works offline.
I'd like to use Google Analytics but aren't sure how to report events in this case, especially since the device may be offline.
Is there a good way to do this?
One strategy is to record analytics events, store them locally, and replay them when online: Service Workers in Production has detailed discussion on that and some source code - search for Offline Google Analytics section.
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