react-native-quicktracking-analytics-module 1.0.0-beta.2 → 1.0.0-beta.3

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.
@@ -28,7 +28,7 @@ import com.quick.qt.spm.SpmAgent;
28
28
  @ReactModule(name = QuicktrackingAnalyticsModuleModule.NAME)
29
29
  public class QuicktrackingAnalyticsModuleModule extends ReactContextBaseJavaModule {
30
30
  public static final String NAME = "QuicktrackingAnalyticsModule";
31
- public static final String TAG = "GlobalProperty";
31
+ public static final String TAG = "QuickTracking == ";
32
32
  private ReactApplicationContext context;
33
33
 
34
34
  public QuicktrackingAnalyticsModuleModule(ReactApplicationContext reactContext) {
@@ -77,8 +77,13 @@ public class QuicktrackingAnalyticsModuleModule extends ReactContextBaseJavaModu
77
77
  }
78
78
 
79
79
  @ReactMethod
80
- public void onEventForH5(String params) {
81
- SpmAgent.CALL(params);
80
+ public void onEventForH5(String content) {
81
+ try {
82
+ // android.util.Log.e(TAG, " " + content);
83
+ SpmAgent.CALL(content);
84
+ } catch (Exception e) {
85
+ android.util.Log.e(TAG, "桥接事件发送失败!", e);
86
+ }
82
87
  }
83
88
 
84
89
  @ReactMethod
@@ -58,13 +58,15 @@ class QT {
58
58
  QuicktrackingAnalyticsModule.onEventForH5(JSON.stringify({
59
59
  params: json,
60
60
  methodName: 'sendPV',
61
- sid: `${Date.now()}`
61
+ sid: `${Date.now()}`,
62
+ className: 'Umeng4Aplus'
62
63
  }));
63
64
  } else {
64
65
  QuicktrackingAnalyticsModule.onEventForH5(JSON.stringify({
65
66
  params: json,
66
67
  methodName: 'sendEvent',
67
- sid: `${Date.now()}`
68
+ sid: `${Date.now()}`,
69
+ className: 'Umeng4Aplus'
68
70
  }));
69
71
  }
70
72
  }
@@ -52,13 +52,15 @@ export class QT {
52
52
  QuicktrackingAnalyticsModule.onEventForH5(JSON.stringify({
53
53
  params: json,
54
54
  methodName: 'sendPV',
55
- sid: `${Date.now()}`
55
+ sid: `${Date.now()}`,
56
+ className: 'Umeng4Aplus'
56
57
  }));
57
58
  } else {
58
59
  QuicktrackingAnalyticsModule.onEventForH5(JSON.stringify({
59
60
  params: json,
60
61
  methodName: 'sendEvent',
61
- sid: `${Date.now()}`
62
+ sid: `${Date.now()}`,
63
+ className: 'Umeng4Aplus'
62
64
  }));
63
65
  }
64
66
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-quicktracking-analytics-module",
3
- "version": "1.0.0-beta.2",
3
+ "version": "1.0.0-beta.3",
4
4
  "description": "QuickTracking ReactNative SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
package/src/index.tsx CHANGED
@@ -54,6 +54,7 @@ export class QT {
54
54
  params: json,
55
55
  methodName: 'sendPV',
56
56
  sid: `${Date.now()}`,
57
+ className: 'Umeng4Aplus',
57
58
  })
58
59
  );
59
60
  } else {
@@ -62,6 +63,7 @@ export class QT {
62
63
  params: json,
63
64
  methodName: 'sendEvent',
64
65
  sid: `${Date.now()}`,
66
+ className: 'Umeng4Aplus',
65
67
  })
66
68
  );
67
69
  }