About this project
Idiomatic Vue 3 wrapper for Takt privacy‑friendly analytics. It provides a Takt component that boots analytics after mount and supplies the instance to the component tree. The useTakt composable returns the live instance anywhere, falling back to a no‑op before mount or during SSR. The v‑takt‑event directive enables declarative click tracking that reacts to its binding. The TaktPlugin registers the directive and widget components globally and can bootstrap a single instance via app.use. A framework‑agnostic custom element named takt-analytics is also available for non‑Vue pages, bundling the core without requiring Vue runtime. The wrapper re‑exports createStats from the core for reading public stats. All features are SSR‑safe: the component defers browser work to onMounted, the composable returns a no‑op on the server, and the custom element registers only in the browser. Privacy defaults honor Do Not Track, exclude localhost, strip query strings and hashes, and never alter the core’s wire payload.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.