Didn't make the #ChromeDevSummit this year? Catch all the content (and more!) in the Chrome Dev Summit 2019 playlist on our Chrome Developers YouTube Channel.

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.