Configuring Nucleus support is easy since all the required APIs are published as a single Node.js library. Follow these steps to install the library:
- In the root folder of your project, run the following command to install the electron-nucleus library from NPM:
npm i electron-nucleus
- To integrate the library, you need to have the tracking ID number that you retrieved from the Nucleus website earlier. All you need to do to get your tracking ID number is run the following code somewhere in the main.js file:
const Nucleus = require('electron-nucleus')('Your App ID', {
onlyMainProcess: true
});
You can also raise a custom tracking event, as follows:
Nucleus.track(<NAME>, <DATA>);
NAME is the name of your event and can be anything that gives you meaning when you're inspecting analytics. DATA is an optional...