@grafana/faro-web-sdk
Version:
Faro instrumentations, metas, transports for web.
15 lines • 652 B
JavaScript
import { BaseInstrumentation, faro, VERSION } from '@grafana/faro-core';
import { getUserEventHandler } from './processUserActionEventHandler';
export class UserActionInstrumentation extends BaseInstrumentation {
constructor() {
super(...arguments);
this.name = '@grafana/faro-web-sdk:instrumentation-user-action';
this.version = VERSION;
}
initialize() {
const processUserEventHandler = getUserEventHandler(faro);
window.addEventListener('pointerdown', processUserEventHandler);
window.addEventListener('keydown', processUserEventHandler);
}
}
//# sourceMappingURL=instrumentation.js.map