React Native
Table of Contents
Getting Started
Usage
How to Contribute
Getting Started
To get started with Nucleus, create an account at Nucleus and grab the App ID, then use the SDK to start tracking events.
Installation
This package has @react-native-async-storage/async-storage
and @react-native-community/netinfo
as peer dependencies. Install them first if you don't have them
then proceed to install nucleus-rn
As NPM package (recommended)
Usage
Replace 'YOUR_APP_ID'
with the unique ID of your app. You can get it here.
You can check examples with different frameworks here.
API
Nucleus supports passing the following options as second argument to the Nucleus.init()
method:
Tracking
Track events with optional custom data
Error Tracking
Track errors with a name and the Error object.
By default Nucleus registers a handler for ErrorUtils.setGlobalHandler
that sends 'GlobalError'
errors to the API. If you want to disable this behaviour, you can set disableErrorReports
to true
:
and catch errors manually using Nucleus.trackError('an error', errObject)
.
User Identification
Identify a user by a unique ID and optionally set custom properties.
Screen tracking
Track screen views with the screen name and optional parameters.
Disabling Tracking
To disable tracking
Enabling Tracking
To enable tracking
How to Contribute
We're always looking for contributions from the community. Here's how you can help:
Report Bugs: Create an issue report detailing the bug you've found.
Suggest Features: Have a great idea for Nucleus? Don't hesitate to put it forward by creating an issue.
Submit Pull Requests: Feel free to fix a bug or add a new feature and create a pull request. Make sure to follow the existing code style, and write clear commit messages explaining your changes.
Last updated