@convivainc/conviva-react-native-appanalytics 0.1.4 → 0.2.0
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/CHANGELOG.md +9 -0
- package/README.md +60 -7
- package/android/src/main/java/com/conviva/react/apptracker/RNConvivaTrackerModule.java +275 -159
- package/android/src/main/java/com/conviva/react/apptracker/util/TrackerVersion.java +1 -1
- package/conviva-react-native-appanalytics.d.ts +13 -0
- package/conviva-react-native-appanalytics.js +108 -2
- package/ios/RNConvivaAppAnalytics.m +78 -21
- package/ios/Util/RNTrackerVersion.m +1 -1
- package/package.json +1 -1
- package/android/.gradle/7.5/checksums/checksums.lock +0 -0
- package/android/.gradle/7.5/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/7.5/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/7.5/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.5/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.5/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.5/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.5/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.5/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.5/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/7.5/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/config.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/compiler.xml +0 -6
- package/android/.idea/gradle.xml +0 -19
- package/android/.idea/migrations.xml +0 -10
- package/android/.idea/misc.xml +0 -10
- package/android/.idea/vcs.xml +0 -6
- package/android/local.properties +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
|
|
2
2
|
# Changelog
|
|
3
3
|
|
|
4
|
+
## 0.2.0 (06/SEP/2024)
|
|
5
|
+
- Introduces API for setting the conviva identifier
|
|
6
|
+
- Internal enhancements for the Android Bridge
|
|
7
|
+
*This feature needs the Android App SDK version of [0.9.5](https://github.com/Conviva/conviva-android-appanalytics)*
|
|
8
|
+
*This feature needs the iOS App SDK version of [0.2.30](https://github.com/Conviva/conviva-ios-appanalytics)*
|
|
9
|
+
|
|
10
|
+
## 0.1.5 (07/JUN/2024)
|
|
11
|
+
- Supports trackCustomEvent with JSONObject argument for [iOS Bridge](https://github.com/Conviva/conviva-ios-appanalytics)
|
|
12
|
+
|
|
4
13
|
## 0.1.4 (05/JAN/2024)
|
|
5
14
|
- Supports the Auto Detection of ScreenView navigation if the application uses the [NavigationContainer](https://reactnavigation.org/docs/5.x/hello-react-navigation)(for react native version 5 and above) or [AppNavigator](https://reactnavigation.org/docs/4.x/hello-react-navigation)(for react native version below 5)<br>
|
|
6
15
|
*Note:Please refer to [ScreenView Auto-Detection](https://github.com/Conviva/conviva-react-native-appanalytics?tab=readme-ov-file#auto-detect-screenview-events-for-tracking-screen-navigation) for more details*
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ npm install @convivainc/conviva-react-native-appanalytics --save
|
|
|
10
10
|
npx pod-install
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
## Android
|
|
13
|
+
## Android Native Sensor dependencies
|
|
14
14
|
Add the following line to app's build.gradle file along with the dependencies:
|
|
15
15
|
```
|
|
16
16
|
dependencies {
|
|
@@ -18,6 +18,28 @@ dependencies {
|
|
|
18
18
|
implementation 'com.conviva.sdk:conviva-android-tracker:<version>'
|
|
19
19
|
}
|
|
20
20
|
```
|
|
21
|
+
Android Plugin should be used for the auto collection of **Button Click** and **OkHttp/Retrofit/HTTPSUrlConnection/HTTPUrlConnection** **NetworkRequest Tracking** features. The following example shows how to include the plugin:
|
|
22
|
+
```
|
|
23
|
+
// in the root or project-level build.gradle
|
|
24
|
+
dependencies {
|
|
25
|
+
...
|
|
26
|
+
// For Android Gradle Plugin version 8.0 and above, use
|
|
27
|
+
classpath 'com.conviva.sdk:android-plugin:0.3.x'
|
|
28
|
+
|
|
29
|
+
// For Android Gradle Plugin version below 8.0, use
|
|
30
|
+
classpath 'com.conviva.sdk:android-plugin:0.2.x'
|
|
31
|
+
...
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// in the app, build.gradle at the end of plugins add the
|
|
35
|
+
...
|
|
36
|
+
apply plugin: 'com.conviva.sdk.android-plugin'
|
|
37
|
+
|
|
38
|
+
// in the app, build.gradle.kts at the end of plugins add the
|
|
39
|
+
plugins {
|
|
40
|
+
id 'com.conviva.sdk.android-plugin'
|
|
41
|
+
}
|
|
42
|
+
```
|
|
21
43
|
|
|
22
44
|
## Initialize the tracker
|
|
23
45
|
```js
|
|
@@ -45,15 +67,31 @@ tracker.setSubjectData({userId: viewerId});
|
|
|
45
67
|
|
|
46
68
|
## Report PageView Events for tracking in-app page navigations.
|
|
47
69
|
```js
|
|
48
|
-
tracker.
|
|
70
|
+
tracker.trackPageView({pageUrl: string, pageTitle?: string, referrer?: string});
|
|
49
71
|
|
|
50
72
|
let pageViewEvent = {'pageUrl' : 'https://allpopulated.com',
|
|
51
73
|
'pageTitle' : 'some title',
|
|
52
74
|
'referrer' : 'http://refr.com'};
|
|
53
|
-
tracker.
|
|
75
|
+
tracker.trackPageView(pageViewEvent);
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Auto detect button clicks.
|
|
79
|
+
Even though the React Native components can be natively mapped in Android and iOS, for the Auto detection of button clicks for **Button**, **TouchableHighlight**, **TouchableOpacity**, **TouchableWithoutFeedback** and **TouchableNativeFeedback** Components, needs explicit addition of babel transfomation. Add below plugin code in your application .babel.rc or babel.config.js file:
|
|
80
|
+
|
|
81
|
+
```js
|
|
82
|
+
|
|
83
|
+
"plugins": ["./node_modules/@convivainc/conviva-react-native-appanalytics/instrumentation/index.js"]
|
|
84
|
+
|
|
54
85
|
```
|
|
55
86
|
|
|
56
87
|
## Auto detect ScreenView Events for tracking screen navigation.
|
|
88
|
+
To support Conviva to Auto Detect the Screen Name part of the ScreenView Events, add below plugin code in your application .babel.rc or babel.config.js file:
|
|
89
|
+
```js
|
|
90
|
+
|
|
91
|
+
"plugins": ["add-react-displayname"]
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
|
|
57
95
|
For React Navigation versions 5 and above, to autocapture screenviews, wrap withReactNavigationAutotrack(autocaptureNavigationTrack) around the NavigationContainer:
|
|
58
96
|
|
|
59
97
|
```js
|
|
@@ -101,7 +139,7 @@ eventName - Name of the custom event. (Mandatory)
|
|
|
101
139
|
|
|
102
140
|
eventData - Any JSON Object.
|
|
103
141
|
|
|
104
|
-
The following example shows the implementation of the
|
|
142
|
+
The following example shows the implementation of the application using these API's:
|
|
105
143
|
```js
|
|
106
144
|
tracker.trackCustomEvent(eventName: string, eventData?: any);
|
|
107
145
|
|
|
@@ -115,7 +153,7 @@ Use setCustomTags() API to set all kinds of tags (key value pairs). This API pro
|
|
|
115
153
|
|
|
116
154
|
data - Any JSON Object.
|
|
117
155
|
|
|
118
|
-
The following example shows the implementation of the
|
|
156
|
+
The following example shows the implementation of the application using this API:
|
|
119
157
|
|
|
120
158
|
```js
|
|
121
159
|
tracker.setCustomTags(customTagsToSet: any);
|
|
@@ -128,7 +166,7 @@ Use clearCustomTags() API to remove that are set prior. This API provides 1 argu
|
|
|
128
166
|
|
|
129
167
|
keys - Array of strings representing tag keys.
|
|
130
168
|
|
|
131
|
-
The following example shows the implementation of the
|
|
169
|
+
The following example shows the implementation of the application using this API:
|
|
132
170
|
```js
|
|
133
171
|
tracker.clearCustomTags(tagKeys: string[]);
|
|
134
172
|
|
|
@@ -138,7 +176,22 @@ tracker.clearCustomTags(customTagKeysToClear);
|
|
|
138
176
|
|
|
139
177
|
Use clearAllCustomTags() API to remove all the custom tags that are set prior.
|
|
140
178
|
|
|
141
|
-
The following example shows the implementation of the
|
|
179
|
+
The following example shows the implementation of the application using this API:
|
|
142
180
|
```js
|
|
143
181
|
tracker.clearAllCustomTags();
|
|
144
182
|
```
|
|
183
|
+
|
|
184
|
+
<details>
|
|
185
|
+
<summary><b>Auto-collected Events</b></summary>
|
|
186
|
+
|
|
187
|
+
##### Conviva provides a rich set of application performance metrics with the help of autocollected app events, such as _screen_view_ , _button_click_, and _network_request_.
|
|
188
|
+
|
|
189
|
+
Event | Occurrence |
|
|
190
|
+
------|------------ |
|
|
191
|
+
network_request | after receiving the network request response ; auto collected from the Native Sensors, Need android-plugin inclusion for Android|
|
|
192
|
+
screen_view | when the screen is interacted on either first launch or relaunch ; auto collected from the Native Sensors + React Native Screens; Need add-react-displayname plugin and wrapping of Navigation Components |
|
|
193
|
+
application_error | when an error occurrs in the application ; auto collected from the Native Sensors|
|
|
194
|
+
button_click | on the button click callback ; auto collected from the Native Sensors + React Native **Button**, **TouchableHighlight**, **TouchableOpacity**, **TouchableWithoutFeedback** and **TouchableNativeFeedback** Components; Need Conviva index.js from the node_modules folder|
|
|
195
|
+
application_background | when the application is taken to the background ; auto collected from the Native Sensors|
|
|
196
|
+
application_foreground | when the application is taken to the foreground ; auto collected from the Native Sensors|
|
|
197
|
+
application_install | when the application is launched for the first time after it's installed. (It's not the exact installed time.) |
|