Snowplow React Native Tracker 0.1.0 released


We are pleased to announce the first production-ready release of the Snowplow React Native Tracker, version 0.1.0. The React Native tracker imports the native Snowplow iOS and Android trackers to React Native, as Native Modules. Much of the functionality of the native versions of the tracker is available.
Read on below for:
- Key features
- Quickstart guide
- Feedback and next steps
- Changes since the alpha release
- Documentation
- Getting help
1. Key features
This first production-ready release of the Snowplow React Native tracker has the following key features, closely in line with the existing functionality of our iOS and Android trackers:
-
Automatic tracking: The tracker includes automatic tracking of the mobile context, screen context and session context, as well as installs and lifecycle events. All are configurable on tracker initialisation.
-
Standard events: Screen View, Page View, and Structured events are available.
-
Custom tracking: Custom Self-Describing events and contexts are available.
-
Setting subject data: The subject can be set using the
setSubjectData()
method.
2. Quickstart guide
To install the tracker:
npm install @snowplow/react-native-tracker
To initialize the tracker and track a screen view:
import Tracker from '@snowplow/react-native-tracker';
initialize({
endpoint: 'my-endpoint.com',
namespace: 'namespace',
appId: 'my-app-id'
});
trackScreenViewEvent({screenName: 'myScreenName'})
For a full list of all the tracker initialization options, including automatic sessionization and lifecycle events, please see the Snowplow React Native Tracker documentation.
3. Feedback and next steps
As this is an early release tracker, we welcome feedback and of course contributions! Please feel free to open topics with ideas in our Discourse forum, and add issues and bug reports to the repository.
For contributions, check out our guidelines here. Our next release will likely focus on additional testing capabilities over new features, however important contributions, especially bugfixes, will be prioritised. If in doubt, open an issue or a discourse post to ask about your contribution.
4. Changes since the alpha release
We released an initial alpha version of this tracker back in August 2019, and with the help from our customers and community (providing their feedback, issues and contributions) have not only improved the alpha since then, but have now been able to release this production-ready version. We look forward to continued customer and community engagement on this tracker, see the previous section on feedback and next steps for more information on how to get involved!
Version 0.1.0 contains some breaking changes compared to the alpha release, specifically:
-
All track methods now take only two arguments: a JSON of key-value pairs, and an optional array of context SD-JSONs.
-
Several parameters of the
initialize()
method have been renamed to avoid the prefix‘set’
. This is an established convention in the native trackers and normally indicates a standalone method rather than a configuration option. -
The defaults for
initialize()
parameters have changed to reflect the minimal recommended configuration. -
The
autoScreenView
option has been removed from theinitialize()
method. This feature was experimental and does not behave consistently. We are keen to scope out how to instrument this kind of feature in a way that is more React Native friendly. Ideas are welcome – feel free to open a discourse topic on the subject. -
Parameters have been removed from the
trackScreenView()
method. Specifically, the option to manually set the screen ID and previous screen information have been removed. These are automatically managed internally by the tracker, and manually setting them can lead to inconsistent behaviour.
5. Documentation
As always, information about how to use the tracker can be found in the React Native Tracker documentation.
You can find the full CHANGELOG on GitHub as Snowplow React Native Tracker CHANGELOG.
6. Getting help
If you have any questions or run into any problems, please visit our Discourse forum. Please raise any bugs in the React Native Tracker’s issues on GitHub.