feat(tracker): added actions monitoring

This commit is contained in:
Corentin Thomasset 2022-12-21 00:03:31 +01:00
parent 40872859a5
commit bfc2e24bbf
No known key found for this signature in database
GPG key ID: DBD997E935996158
7 changed files with 26 additions and 1 deletions

View file

@ -0,0 +1,11 @@
import type Plausible from 'plausible-tracker';
export { createTrackerService };
function createTrackerService({ plausible }: { plausible: ReturnType<typeof Plausible> }) {
return {
trackEvent({ eventName }: { eventName: string }) {
plausible.trackEvent(eventName);
},
};
}

View file

@ -0,0 +1,3 @@
import type { createTrackerService } from './tracker.services';
export type TrackerService = ReturnType<typeof createTrackerService>;