@segment/analytics-next
Version:
Analytics Next (aka Analytics 2.0) is the latest version of Segment’s JavaScript SDK - enabling you to send your data to any tool without having to learn, test, or use a new API every time.
23 lines • 966 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Stats = void 0;
var tslib_1 = require("tslib");
var analytics_core_1 = require("@segment/analytics-core");
var remote_metrics_1 = require("./remote-metrics");
var remoteMetrics;
var Stats = /** @class */ (function (_super) {
tslib_1.__extends(Stats, _super);
function Stats() {
return _super !== null && _super.apply(this, arguments) || this;
}
Stats.initRemoteMetrics = function (options) {
remoteMetrics = new remote_metrics_1.RemoteMetrics(options);
};
Stats.prototype.increment = function (metric, by, tags) {
_super.prototype.increment.call(this, metric, by, tags);
remoteMetrics === null || remoteMetrics === void 0 ? void 0 : remoteMetrics.increment(metric, tags !== null && tags !== void 0 ? tags : []);
};
return Stats;
}(analytics_core_1.CoreStats));
exports.Stats = Stats;
//# sourceMappingURL=index.js.map