← 返回
数据分析 中文

Umami

Deploy Umami analytics avoiding data loss, tracking failures, and integration issues.
部署 Umami 分析工具,避免数据丢失、追踪失败和集成问题。
ivangdavila
数据分析 clawhub v1.0.0 1 版本 99840.1 Key: 无需
★ 2
Stars
📥 1,209
下载
💾 19
安装
1
版本
#latest

概述

Critical Configuration

  • HASH_SALT must never change — changing it invalidates all existing data, essentially a reset
  • SQLite is not supported — despite being Node.js, Umami requires PostgreSQL or MySQL
  • Database contains everything — all tracking data, config, users; backup only this

Tracking Script Traps

  • data-website-id must match Umami config exactly — wrong ID = zero data, no error shown
  • Script blocked by ad blockers — self-host on same domain as site to avoid blocking
  • Single Page Apps don't auto-track navigation — must call umami.track() on route changes
  • Script in not — late loading misses initial pageview

SPA Integration

  • React: call umami.track('pageview') in router effect or navigation handler
  • Next.js: use @umami/next package — handles app router and pages router
  • Vue/Nuxt: router afterEach hook with umami.track()
  • Check window.umami exists before calling — script may load after component mounts

Custom Events

  • Event names appear verbatim in dashboard — use consistent naming scheme
  • Properties only searchable via API — not visible in default dashboard
  • umami.track('event', { key: 'value' }) for properties

Self-Hosting Considerations

  • Low resources needed — 256MB RAM handles most sites
  • PostgreSQL needs more resources than Umami itself — plan accordingly
  • Reverse proxy required for HTTPS — Umami runs HTTP on port 3000
  • Backup strategy = database backup — no filesystem state to worry about

Multi-Site Setup

  • One Umami instance handles many sites — add in Dashboard > Settings > Websites
  • Each site needs unique tracking script — get from Websites settings
  • Share button available per site — generates public dashboard URL

Troubleshooting

  • Zero pageviews — check browser Network tab, verify script loads without error
  • Script 404 — verify CORS headers if cross-domain, or self-host on same domain
  • Events not appearing — check browser console for umami errors
  • Dashboard slow — check database performance, PostgreSQL query times

Common Mistakes

  • Using same website ID for dev and prod — pollutes analytics with test data
  • Not testing script after deploy — CDN caching or minification can break it
  • Expecting real-time updates — dashboard has slight delay, not instant

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 00:29 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Stock Analysis

udiedrichsen
{"answer":"基于雅虎财经数据,分析股票与加密货币。支持投资组合管理、自选股预警、股息分析、8维评分、热门趋势扫描及传闻/早期信号探测。适用于股票分析、持仓追踪、财报异动、加密监控、热门股追踪或提前发掘非主流传闻。"}
★ 270 📥 56,974
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 438 📥 147,662
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,358 📥 318,373