@rk911/tracker-sdk 1.7.12 → 1.7.13

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.
@@ -377,6 +377,27 @@ public class AndroidTracker implements Application.ActivityLifecycleCallbacks {
377
377
  });
378
378
  }
379
379
 
380
+ public void trackCustom(final String eventName, final String elementText, final JSONObject customProperties) {
381
+ postBgTask(new Runnable() {
382
+ @Override
383
+ public void run() {
384
+ try {
385
+ JSONObject event = createBaseEvent("custom", eventName);
386
+ if (!TextUtils.isEmpty(elementText)) {
387
+ event.put("elementText", elementText);
388
+ }
389
+ if (customProperties != null) {
390
+ event.put("extraData", customProperties.toString());
391
+ }
392
+ enqueueEvent(event);
393
+ flushAsync();
394
+ } catch (Exception e) {
395
+ Log.e(TAG, "===> [Native Tracker trackCustom Failed]", e);
396
+ }
397
+ }
398
+ });
399
+ }
400
+
380
401
  public void track(final String eventName, final JSONObject customProperties) {
381
402
  postBgTask(new Runnable() {
382
403
  @Override
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rk911/tracker-sdk",
3
- "version": "1.7.12",
3
+ "version": "1.7.13",
4
4
  "description": "人康多端埋点 SDK — 跨端自动化采集 + 手动埋点双写兼容",
5
5
  "main": "index.js",
6
6
  "module": "index.js",