react-native-heap-analytics
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! 🎉
Android
Run the following:
react-native link react-native-heap-analytics
TODO(mark): Add maven repository information.
Usage
// Import Heap.; // Start Heap.Heap; // Identify your user.Heap;Heap; // Add event properties (these persist across sessions).Heap; // You can remove a specific property or clear everything.Heap;Heap; // To track an event, use:Heap; // Other methods exposed:Heap; // Amount of second Heap waits before flushing the events.Heap;
If a method is missing from the official SDK, please send a PR!