mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-24 16:56:14 -04:00
feat(tracker): added actions monitoring
This commit is contained in:
parent
40872859a5
commit
bfc2e24bbf
7 changed files with 26 additions and 1 deletions
11
src/modules/tracker/tracker.services.ts
Normal file
11
src/modules/tracker/tracker.services.ts
Normal 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);
|
||||
},
|
||||
};
|
||||
}
|
3
src/modules/tracker/tracker.types.ts
Normal file
3
src/modules/tracker/tracker.types.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
import type { createTrackerService } from './tracker.services';
|
||||
|
||||
export type TrackerService = ReturnType<typeof createTrackerService>;
|
Loading…
Add table
Add a link
Reference in a new issue