UNPKG

@clipboardhealth/capacitor-app-analytics

Version:
43 lines 1.79 kB
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; import { registerWebPlugin, WebPlugin } from '@capacitor/core'; export class CapacitorAppAnalyticsWeb extends WebPlugin { constructor() { super({ name: 'CapacitorAppAnalytics', platforms: ['web'], }); } startWithKey() { return __awaiter(this, void 0, void 0, function* () { console.debug('Not supported for Full Story'); return; }); } setUserProperty(options) { return __awaiter(this, void 0, void 0, function* () { FS.identify(options.userId, Object.assign({ displayName: options.name }, options.userInfo)); }); } stopSession() { return __awaiter(this, void 0, void 0, function* () { FS.identify(false); }); } tagScreenName() { return __awaiter(this, void 0, void 0, function* () { console.debug('Not supported for Full Story'); }); } } const CapacitorAppAnalytics = new CapacitorAppAnalyticsWeb(); export { CapacitorAppAnalytics }; registerWebPlugin(CapacitorAppAnalytics); //# sourceMappingURL=web.js.map