@rk911/tracker-sdk 1.7.12 → 1.7.14
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
|