mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-21 07:16:15 -04:00
12 lines
294 B
TypeScript
12 lines
294 B
TypeScript
![]() |
import type Plausible from 'plausible-tracker';
|
||
|
|
||
|
export { createTrackerService };
|
||
|
|
||
|
function createTrackerService({ plausible }: { plausible: ReturnType<typeof Plausible> }) {
|
||
|
return {
|
||
|
trackEvent({ eventName }: { eventName: string }) {
|
||
|
plausible.trackEvent(eventName);
|
||
|
},
|
||
|
};
|
||
|
}
|