react-native-gainsight-px v1.5.2
React Native GainsightPX
- Release versions
- Installation React Native
- iOS
- Android
- Usage in React-Native import Configurations Initialisation Screen Event Custom Event Identify User Account
1.3.0
Editor Product Mapper preview.
Release Notes:
- Remove
isReadyinGainsightPXbridge file.
- Remove
1.2.2
- Release Notes:
- Remove
isReadyinGainsightPXbridge file.
- Remove
1.2.1
- Release Notes:
- Fix for tracking back button taps in iOS SDK.
1.2.0
- Release Notes:
- Introducing
Editorto support preview engagements and map UI elements to features from mobile. - Scan QRCode from dashboard to preview engagements or create mapper feature.
- Deprecated
sharedInstance. - Supporting
Bartype dialog engagements. - Fix for video in engagement by changing window level.
- Fix for window access after completing engagement preview from editor.
- Fix to block all the events when user is in editing mode.
- Introducing
0.1.8
- Release Notes:
- Added proxy to Configurations
- Removed
recordScreenViewsfrom Configurations
Installation React Native
Download
react-native-gainsight-px-1.0.0.tgzAdd dependencies to you project
"dependencies": {
...,
...,
"react-native-gainsight-px": "file:/<path-to>/react-native-gainsight-px-1.0.0.tgz"
}And
$ npm installOr
In React-native project folder do
$ npm install <path-to-react-native-gainsight-px-1.0.0.tgz>
Installation iOS
Download
GainsightPX.frameworkfrom url:<gainsight-framework-url>In Xcode Make sure that you select
targetAdd theframeworkto theEmbedded BinariesIn terminal
$ cd <project-folder>
$ react-native run-iosInstallation Android
TODO:
Usage in React-Native
####Import
import { GainsightPX, Configurations, PXAccount, PXUser } from "react-native-gainsight-px";####Configurations
TODO:
Initilisation
let c = new Configurations("<#API KEY#>");
c.enableLogs = true;
GainsightPX.getInstance().initialize(c);Screen Event
Custom Screen
GainsightPX.getInstance().screenEvent("<#screen-name#>", "<#screen-class#>");Only Screen Name
GainsightPX.getInstance().screen("<#screen-name#>", "<#map#>");Custom Event
GainsightPX.getInstance().track("<#event-name#>", "<#map#>");Internal
react-native-gainsight-px
publishing to Nexus
In package Root make sure you have
.npmrcfile
npm run releaselocal-linking
In package Root
npm run buildIn Sample Application after npm install install the
react-native-gainsight-px-1.0.0.tgzfileTo install this file
react-native-gainsight-px-1.0.0.tgz
$ cd RealSample
npm install ../react-native-gainsight-px-1.0.0.tgzThis command will add the path to the package.json in the Application
Getting started
Make sure you have
.npmrcfile
$ npm install react-native-gainsight-px --save
Mostly automatic installation
$ react-native link react-native-gainsight-px
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜react-native-gainsight-pxand addRNGainsightPx.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNGainsightPx.ato your project'sBuild Phases➜Link Binary With Libraries - Run your project (
Cmd+R)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNGainsightPxPackage;to the imports at the top of the file - Add
new RNGainsightPxPackage()to the list returned by thegetPackages()method
- Append the following lines to
android/settings.gradle:include ':react-native-gainsight-px' project(':react-native-gainsight-px').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gainsight-px/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:compile project(':react-native-gainsight-px')
Usage
import RNGainsightPx from "react-native-gainsight-px";
// TODO: What to do with the module?
RNGainsightPx;4 years ago