if (!trackerStarted) {
callbackContext.error("Tracker not started");
return;
}
Tracker tracker = GoogleAnalytics.getInstance(this.cordova.getActivity()).getDefaultTracker();
addCustomDimensionsToTracker(tracker);
if (null != id && id.length() > 0) {
tracker.send(MapBuilder
.createItem(id, name, sku, category, price, quantity, currencyCode)
.build()
);
callbackContext.success("Add Transaction Item: " + id);
} else {