By default, the Nucleus library expects your users to have an internet connection to send tracking events. However, you may be wondering what happens if users run your application when they're offline, for example, during a flight or when they're on the tube.
The good news is that you can turn on offline support for Nucleus-enabled Electron applications. This allows us to store the application events locally, cached to disk, and send them to the analytics server once the application is back online.
Use the persist property to enable or disable caching for events:
const Nucleus = require("electron-nucleus")("<App Id>", {
persist: true
});
As you can see, enabling offline mode support for your application's analytics is not difficult with the Nucleus library.
Next, let's learn how to handle application updates...