mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-12-15 11:12:52 +00: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);
|
|
},
|
|
};
|
|
}
|