mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
feat: resume download, router v7/v8 migrations, spec restructure
- Add resume download button in Hero CTA and Contact section - Migrate react-router v6→v7 and v7→v8 - Restructure specs: UI specs to specs/ui/, v2 specs to specs/v2/ - Add profile-photo assets (jpg + webp) - Update AGENTS.md, spec-v2.md index
This commit is contained in:
1 parent
02bad6036d
commit
d827bf9b23
37 files changed
+770
-443
No files matched your search
@@ -0,0 +1,65 @@
|
||||
# Specification — v2 Analytics
|
||||
|
||||
> **Document:** `spec-v2-analytics.md`
|
||||
> **Version:** 0.1.0
|
||||
> **Parent:** `spec-v2.md`
|
||||
> **Priority:** P2
|
||||
> **Estimate:** ~30 minutes
|
||||
|
||||
---
|
||||
|
||||
## Requirement
|
||||
|
||||
Privacy-friendly analytics — không dùng Google Analytics.
|
||||
|
||||
---
|
||||
|
||||
## Options
|
||||
|
||||
**Option A: Plausible Analytics** (recommended)
|
||||
- Lightweight, privacy-first
|
||||
- No cookie banner needed
|
||||
- Simple script integration
|
||||
|
||||
**Option B: Umami**
|
||||
- Self-hosted option
|
||||
- Open source
|
||||
- Similar to Plausible
|
||||
|
||||
**Option C: Custom minimal tracking**
|
||||
- Track page views only
|
||||
- Store in localStorage
|
||||
- Batch send to endpoint (optional)
|
||||
|
||||
---
|
||||
|
||||
## Implementation (Plausible)
|
||||
|
||||
```tsx
|
||||
// main.tsx — add script tag
|
||||
<script
|
||||
defer
|
||||
data-domain="yourdomain.com"
|
||||
src="https://plausible.io/js/script.outbound-links.js"
|
||||
/>
|
||||
```
|
||||
|
||||
Hoặc dùng `react-use-plausible`:
|
||||
|
||||
```tsx
|
||||
import { usePlausible } from 'react-use-plausible'
|
||||
|
||||
const plausible = usePlausible()
|
||||
// Auto pageview tracking
|
||||
```
|
||||
|
||||
Configurable via env var: `ENABLE_ANALYTICS`
|
||||
|
||||
---
|
||||
|
||||
## Acceptance
|
||||
|
||||
- [ ] Page view tracking hoạt động
|
||||
- [ ] Không cookie banner
|
||||
- [ ] Không ảnh hưởng performance
|
||||
- [ ] Configurable via env var (ENABLE_ANALYTICS)
|
||||
Reference in new issue
Block a user