@survicate/react-native-survicate 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -3
- package/android/build.gradle +1 -1
- package/package.json +1 -1
- package/react-native-survicate.podspec +1 -1
package/README.md
CHANGED
|
@@ -47,14 +47,19 @@ allprojects {
|
|
|
47
47
|
|
|
48
48
|
## Usage
|
|
49
49
|
```javascript
|
|
50
|
-
import Survicate from '@survicate/react-native-survicate';
|
|
50
|
+
import Survicate, {UserTrait} from '@survicate/react-native-survicate';
|
|
51
51
|
|
|
52
52
|
Survicate.initialize();
|
|
53
53
|
Survicate.invokeEvent("eventName");
|
|
54
54
|
Survicate.enterScreen("screenName");
|
|
55
55
|
Survicate.leaveScreen("screenName");
|
|
56
|
-
|
|
57
|
-
Survicate.setUserTrait(
|
|
56
|
+
const userIdTrait = new UserTrait('user_id', 'id');
|
|
57
|
+
Survicate.setUserTrait(userIdTrait);
|
|
58
|
+
const textTrait = new UserTrait('name', 'John');
|
|
59
|
+
const numberTrait = new UserTrait('age', 25);
|
|
60
|
+
const booleanTrait = new UserTrait('isPremium', true);
|
|
61
|
+
const dateTrait = new UserTrait('lastLogin', new Date());
|
|
62
|
+
const timeIntervalTrait = new UserTrait('timeOfPurchase', new Date());
|
|
58
63
|
Survicate.reset();
|
|
59
64
|
```
|
|
60
65
|
|
package/android/build.gradle
CHANGED
|
@@ -99,7 +99,7 @@ repositories {
|
|
|
99
99
|
dependencies {
|
|
100
100
|
//noinspection GradleDynamicVersion
|
|
101
101
|
implementation 'com.facebook.react:react-native:+' // From node_modules
|
|
102
|
-
implementation ('com.survicate:survicate-sdk:4.0.
|
|
102
|
+
implementation ('com.survicate:survicate-sdk:4.0.2') {
|
|
103
103
|
exclude group: 'io.coil-kt', module: 'coil-base'
|
|
104
104
|
exclude group: 'io.coil-kt', module: 'coil-gif'
|
|
105
105
|
exclude group: 'io.coil-kt', module: 'coil-svg'
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@survicate/react-native-survicate",
|
|
3
3
|
"title": "React Native Survicate Bindings",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.1",
|
|
5
5
|
"description": "React Native bindings for Survicate Mobile SDK",
|
|
6
6
|
"main": "lib/commonjs/index.js",
|
|
7
7
|
"module": "lib/module/index.js",
|