npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

journey3-react-native-sdk

v1.3.0

Published

Journey3 React Native SDK

Downloads

54

Readme

React Native connector for Journey3 (Lightweight Anonymous Mobile Analytics)

Features

Use this connector in your React Native app to:

  • Track sessions, unique users and new users
  • Track application feature usage
  • Track user journey stage conversions
  • Track user retention

Getting started

  • Register and get an application key at https://journey3.net/
  • Initialize the connector to start tracking stats

Usage

Installing the connector

yarn add journey3-react-native-sdk

Additionally, you need to install @react-native-async-storage/async-storage as a peer dependency:

yarn add @react-native-async-storage/async-storage

Initializing the connector

import {useEffect} from 'react';
import {initialize} from 'journey3-react-native-sdk';

const version = '1.0'; // Your app version
const isRelease = production ? true : false; // Separate dev stats from production stats
useEffect(() => {
  initialize(
    '<accountId>',
    '<appId>',
    version,
    isRelease,
  );
}, []);

Report an event

Events are used to track feature usage:

import {reportEvent} from 'journey3-react-native-sdk';

useEffect(() => {
  reportEvent('click_play');
}, []);

Report an error

Errors are special types of events:

import {reportError} from 'journey3-react-native-sdk';

useEffect(() => {
  reportError('err_loading_catalog');
}, []);

Report a stage transition

Stage transitions are used to build user conversion funnels:

import {reportStageTransition} from 'journey3-react-native-sdk';

useEffect(() => {
  reportStageTransition(2, 'explore');
}, []);

It's up to you what stages you would like to use, we recommend to start with the following stages:

| stage | name | comment | | ------| ---- | ------- | | 1 | 'new user' | Is used as an initial stage by default for all sessions. You don't need to report this stage | | 2 | 'explore' | The user has used some basic features of the app. For example: the user has browsed through the catalog of music albums | | 3 | 'engage' | The user has used one of the main features of the app. For example: the user has started playing the album | | 4 | 'commit' | The user has bought the subscription service for your app |

You don't need to remember which stage you already reported. The plugin will remember the highest stage that you reported.

Maximum 10 stages are supported.

Flush events

Normally, the previous session is reported upon the app restart. In some cases you might want to report events before the session is terminated by forcefully calling flushEvents function.

This might help tracking events coming from users who use the app once and then immediately uninstall it.

import {flushEvents} from 'journey3-react-native-sdk';

flushEvents();

Flushing events introduces extra network traffic, so use it with caution. Do not flush session every time you report an event!

GDPR compliance

Journey3 is designed to be anonymous by default.

Most of the data is stored in the aggregated form (as counters), the session correlation is done on the device itself.

We store:

  • Number of session in the given period of time, by version;
  • Number of unique users in the given period of time, by version;
  • Number of new users in the given period of time, by version;
  • Number of events in the given period of time, by event name and version;
  • Number of sessions that triggered an event in the given period of time, by event name and version;
  • Number of sessions with errors in the given period of time, by version;
  • Number of sessions with crashes in the given period of time, by version;
  • Number of stage hits in the given period of time, by version;
  • Number of sessions bucketed by duration, in the given period of time, by version;
  • Number of sessions bucketed by retention, in the given period of time, by version.

In addition to counters, Journey3 stores sessions. A session includes the following data:

  • Version;
  • Duration;
  • Whether the session is from the first time user;
  • The sequences of events.

The retention period for the session is 15 days.

We don't store any device information or anything that can help identifying a user. These is no field that would allow to link sessions from the same user.

To preserve the anonymity, use event names that describe the feature used, and avoid adding any identifiable data.

Example, good: 'click_play', 'click_pause', 'add_to_favorites', 'search_by_artist'.

Example, bad: 'user_12345_bought_item_34556'

As we don't track any personally personally identifiable data, and make our best effort to render the stored data anonymous, we judge that the data collected by the connector does not fall within the scope of the GDPR.

That is, unless you abuse the API and use event or stage names that break the anonymity.

This assumption might also break due to some specific circumstances related to your app nature and purpose that we cannot predict.

This is why we encourage you to review the terms of GDPR law and make your own final decision whether to enable the connector with or without opt-in, and whether to mention the data collected in your privacy policy.