Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
type PlausibleTracker = (
event: string,
options?: { props?: Record<string, string> }
) => void
export function trackEvent(
event: string,
props?: Record<string, string>
): void {
const plausible = (window as unknown as { plausible?: PlausibleTracker })
.plausible
if (typeof plausible === 'function') {
plausible(event, props ? { props } : undefined)
}
}