Se agrega el código de Plausible en el <head></head>
<script
defer
data-domain="yourdomain.com"
src="https://plausible.io/js/script.js"
></script>
Luego tenemos la carpeta de types
types->plausible->index.d.ts
type Options = {
callback?: () => void;
props?: Record<string, string | number | undefined>;
};
interface Window {
plausible: (event: "add_fox" | "remove_fox", options?: Options) => void;
}
¿Quieres ver más aportes, preguntas y respuestas de la comunidad?
o inicia sesión.