Google Analytics for PWAs: Tracking offline behaviour and more - Builtvisible
PWAs bring a host of exciting new capabilities to the web, including push notifications, background sync, and offline usage. How can we capture data about these events in Google Analytics?
The old challenge: Single Page App JavaScript frameworks We'll get this out the way first. Pageview tracking with an SPA JavaScript framework is a well-known and well-documented challenge, and for many typical PWAs it's the most immediately obvious adaptation which is required. In short, if your PWA uses a framework like React or Angular to handle navigation events, then standard pageview tracking will not function. In contrast to traditional websites which do a round-trip to the server every time a page is loaded, SPAs load content and manipulate the URL with the History API . In other words,
saved by
related reading
- 5 Ways to Use Google Analytics to Measure User Engagementmbbagency.com
- 為什麼你會需要 PWA 應用程式,原生不好嗎?noob.tw
- Google Mobile UX Marathon 雙週心得(三)medium.com
- A service worker's life | Workbox | Chrome for Developersdeveloper.chrome.com
- Service worker overview | Workbox | Chrome for Developersdeveloper.chrome.com
- 7 Principles of Rich Web Applicationsrauchg.com
- PWA Made Easy | Progressierprogressier.com
- The Web Animation Performance Tier List | Motion Magazinemotion.dev
- The service worker lifecycle | Articles | web.devweb.dev
- The new wave of Javascript web frameworksfrontendmastery.com
- Event Tracking for Mobile Apps - GoPracticegopractice.io
- Making Sense of React Server Components • Josh W. Comeaujoshwcomeau.com