/** * folk-analytics-view — Privacy-first analytics dashboard overview. * * Shows tracked apps, stats, and a link to the full Umami dashboard. */ class FolkAnalyticsView extends HTMLElement { private shadow: ShadowRoot; private space = "demo"; private stats: any = null; constructor() { super(); this.shadow = this.attachShadow({ mode: "open" }); } connectedCallback() { this.space = this.getAttribute("space") || "demo"; this.loadStats(); } private async loadStats() { try { const base = window.location.pathname.replace(/\/$/, ""); const resp = await fetch(`${base}/api/stats`); if (resp.ok) { this.stats = await resp.json(); } } catch { /* ignore */ } this.render(); } private render() { const stats = this.stats || { trackedApps: 17, cookiesSet: 0, scriptSize: "~2KB", selfHosted: true, apps: [], dashboardUrl: "https://analytics.rspace.online" }; this.shadow.innerHTML = `
Zero-knowledge, cookieless, self-hosted analytics for the r* ecosystem. Know how your tools are used without compromising anyone's privacy.
No cookies. No fingerprinting. No personal data. Each page view is anonymous. GDPR compliant by architecture.
Analytics data never leaves your infrastructure. No third-party servers, no cloud dependencies.
Full control over data retention, access, and lifecycle. Powered by Umami.