UNPKG

@openpass/openpass-js-sdk

Version:
19 lines 797 B
function initializeGamera() { window.gamera = window.gamera || {}; window.gamera.cmd = window.gamera.cmd || []; } export function reportAnalyticsEvent(eventName, customProperties = {}) { initializeGamera(); window.gamera.cmd.push(() => { var _a, _b; (_b = (_a = window.gamera) === null || _a === void 0 ? void 0 : _a.event) === null || _b === void 0 ? void 0 : _b.call(_a, eventName, customProperties); }); } export function addAnalyticsDimension(dimension, value) { initializeGamera(); window.gamera.cmd.push(() => { var _a, _b; (_b = (_a = window.gamera) === null || _a === void 0 ? void 0 : _a.addDimensions) === null || _b === void 0 ? void 0 : _b.call(_a, { [dimension]: value }); }); } //# sourceMappingURL=userAnalytics.js.map