July 2018
Intermediate to advanced
354 pages
8h 51m
English
A common question I am asked and see others asking in various forums is, "how can I use analytics services like Google Analytics with a service worker?"
What they are ultimately asking is how they can use an analytics package when the device is offline, but the service worker allows the user to continue using the application. How do user activities get logged to the analytics tool?
The good news is that you can track offline activity with a service worker, but it does require extra plumbing on your part to store all the activities in a custom queue and sync those to the analytics package when the device comes back online.
Sounds simple, right?
One area I did not spend any time on in this ...
Read now
Unlock full access