Can’t make the #ChromeDevSummit this year? Catch all the content (and more!) on the livestream, or join your peers for a CDS Extended event at a hosted location nearby. To learn more, check out 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.