Getting started

Getting started with Nucleus is very easy.

By following this short guide you will have the basic functionalities (analytics and bug reports) working in 5 minutes.

Sign up and create an app

Start by signing up on the platform.

Then, create your first app. Name it as you want, you can change it later.

If you already have a version or an icon, you can edit the app to set those.

Integrate

At your app root, run the following command to add the Nucleus module:

npm install electron-nucleus --save

Next, add the module to your app. Replace <Your App Id> with the ID from the app you previously created.

Put it first in the renderer process and if needed to the main process also.

const Nucleus = require("electron-nucleus")("<Your App Id>")

If you only have access to the main process use the onlyMainProcess parameter or tracking won't work:

const Nucleus = require("electron-nucleus")("<Your App Id>", { onlyMainProcess: true })

Be sure to replace <Your App Id> with the id from the app you previously created.

That's it :)

Open your app, and you should be able to see one user in your Nucleus dashboard.

Track users (optional)

If you have something to identify your users, you can let Nucleus know. It can be any kind of string (email address or else).

Nucleus.setUserId('mike@google.com')

Track actions (optional)

Want to know how many users opened the settings pane? Use the track method. You can even add custom data to add more details.

Nucleus.track('OPEN_SETTINGS', { reason: 'click' })

Need help integrating? Let us know hello@nucleus.sh - we're more than happy to help.