React Native Ensighten Module
$ npm install react-native-ensighten --save
$ cd ios$ pod install
Special Note: Due to a current issue with Xcode where swift support is not enabled when adding a React Native library using swift code you may need to take the following steps if your build fails (Ignore if you've already added any native swift code to your project):
- Open the
.xcworkspacefile in your project's "ios" directory
- Go to
File > New > File...
- Select "Swift File" and give it any name
- When prompted select "Add bridging header"
- Rebuild project
$ cd android$ ./gradlew build
;// In the entry point of your appEnsighten;
Tracking Page Views
<Buttontitle="Add to Cart"onPress= Ensighten ;/>
<Buttontitle="Add Promotion to Cart"onPress= Ensighten ;/>