2.4.0 • Published 7 years ago

react-native-heap-analytics v2.4.0

Weekly downloads
19
License
MIT
Repository
github
Last release
7 years ago

react-native-heap-analytics

npm npm npm CircleCI branch

React Native wrapper for Heap Analytics.

Setup

# Yarn
yarn add react-native-heap-analytics

# NPM
npm install --save react-native-heap-analytics

iOS with Cocoapods

Add the following to your Podfile:

pod "react-native-heap-analytics", path: "../node_modules/react-native-heap-analytics"

Then run:

pod install

You're done! :tada:

Android

Run the following:

react-native link react-native-heap-analytics

TODO(mark): Add maven repository information.

Usage

// Import Heap.
import Heap from 'react-native-heap-analytics';

// Start Heap.
Heap.setAppId('my-app-id');

// Identify your user.
Heap.identify('123456');
Heap.addUserProperties({name: "John", age: 54});

// Add event properties (these persist across sessions).
Heap.addEventProperties({isLoggedIn: true});

// You can remove a specific property or clear everything.
Heap.removeEventProperty('isLoggedIn');
Heap.clearEventProperties();

// To track an event, use:
Heap.track('signed-up', {isPaid: true, amount: 20});

// Other methods exposed:
Heap.enableVisualizer();

// Amount of second Heap waits before flushing the events.
Heap.changeInterval(10);

If a method is missing from the official SDK, please send a PR!

2.4.0

7 years ago

2.3.2

7 years ago

2.3.1

7 years ago

2.3.0

7 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.3.0

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago