focusflick
Version:
๐ Focus Flick: Plug-and-play web analytics for user focus, scroll, blur, click, and behavior tracking
89 lines (57 loc) โข 1.84 kB
Markdown
# FocusFlick SDK
Track user attention like never before.
FocusFlick is a lightweight, privacy-first JavaScript SDK for capturing **focus**, **blur**, **mouse activity**, and **session analytics** in real-time.
## ๐ Installation
```bash
npm install focusflick
```
## ๐ง Basic Usage
```js
import FocusFlick from 'focusflick';
const flick = new FocusFlick({
siteOwnerId: 'ff_yourID123', // Required
enableClicks: true, // Track click events
enableMousemove: true, // Track mouse movement
enableFocus: true // Track tab focus/blur
});
flick.init();
```
You can retrieve the collected session data any time:
```js
console.log(flick.getSessionData());
```
## ๐ฆ Features
- Tracks `click`, `mousemove`, `focus`, `blur`, `session_start`, `session_end`
- Stores session data in `localStorage`
- Easily extendable for sending to APIs (e.g. Supabase, NocoDB, Render)
- Fully installable via npm or available as a standalone browser script
## ๐ฅ๏ธ CDN (for non-devs)
Don't want to install via npm?
Just use the browser version:
```html
<script src="https://www.focusflick.xyz/focusflick.min.js"></script>
<script>
const flick = new FocusFlick({ siteOwnerId: 'ff_yourID123' });
flick.init();
</script>
```
## ๐ Privacy First
FocusFlick does **not** fingerprint or collect personal data.
All sessions are scoped to your own site domain, and you choose how data is handled (local vs. cloud).
## ๐ ๏ธ Support
Need help?
Email us at [support@focusflick.xyz](mailto:support@focusflick.xyz)
## ๐ Links
- ๐ [Website](https://www.focusflick.xyz)
- ๐ฆ [NPM Package](https://www.npmjs.com/package/focusflick)
- ๐งช [Demo](https://www.focusflick.xyz/demo.html)
## ๐ชช License
MIT License โ free for personal and commercial use.