Register for this year’s #ChromeDevSummit happening on Nov. 11-12 in San Francisco to learn about the latest features and tools coming to the Web. Request an invite on the Chrome Dev Summit 2019 website

Enable Offline Google Analytics

Offline analytics is a module that will use background sync to ensure that requests to Google Analytics are made regardless of the current network condition. This is especially useful if you've built an app that works offline.

Enabling offline analytics can be as simple as:

importScripts('https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js');

workbox.googleAnalytics.initialize();

There are more options that enable you to detect a retried request as well as track how long a request has been queued before being sent to Google Analytics. Learn more here.