关于这个模板
这个分析工作区让小型出版物无需接入追踪服务就能分析读者数据。它打开时显示一份填充了数据的报告,包含访客趋势、上一周期和文章排名。第二组序列展示页面浏览量。在图表上移动鼠标可以查看每个点背后的具体数值。选择一篇文章后,所有报告都会限定为该文章的流量,再选择国家或推荐来源可以进一步缩小同一受众范围。
90 天的匿名样本活动数据支撑着摘要、营销活动表格以及设备和浏览器细分数据。数据源适配器与展示组件相互独立,因此发布方可以用现有服务中的聚合流量替换样本数据。时间范围选择器支持预设和自定义窗口。零结果的筛选组合会让筛选器保持可用,并给读者一个直接返回的入口。
编辑可以围绕文章或操作定义目标,组装通往目标的步骤,并查看有多少会话从一个步骤进入下一个步骤。分享控件会打开当前报告的只读版本,保留其时间范围和筛选条件。总览支持浅色和深色模式。在窄屏幕上,图表、当前筛选和最多阅读文章会排在详细表格之前。更改出版物、其栏目和域名,就能把同样的分析工作流用于另一个编辑团队。
模板提示词
在线演示就是用这份提示词原样做出来的,没有额外补充。 提示词保持英文原版,国内常用的 AI 编程工具都能直接理解;下面附中文参考译文。
# Website Analytics Dashboard Build this website exactly as described below. Replace the [VARIABLES] with your own values; keep everything else. ## Brief Build a privacy-friendly traffic report for [PUBLICATION], a fictional publication at [DOMAIN]. [BRAND] is its analytics workspace. - Audience: Independent editors and audience teams. - Goal: Identify which article, referrer, region and campaign contribute to a change in readership. - Tone: Calm, analytical, crisp typographic hierarchy with practical editorial language. ## Stack - Framework: React 19 + Vite - Styling: Vanilla CSS - Libraries: none - Build: `npm run build` → static files in `dist/`. No backend, no server code, no external APIs. - Setup: - Use a relative Vite base './'. Bundle fonts and scripts locally, minify, and disable source maps. - Keep all editable labels, sample content and product names in one content module. Put simulated services in one adapter file. - Create a deterministic 90-day fixture through one replaceable data adapter. Derive all metrics, chart points and ordered funnels from its events. ## Variables - [BRAND] — Analytics workspace (default: "Index Lantern") - [PUBLICATION] — Publication (default: "Fieldwork Dispatch") - [DOMAIN] — Publication domain (default: "fieldwork.example") - [CREDIT] — keep a small "Template by VibeFather" link to https://vibefather.ai/t/website-analytics-dashboard in the footer (default: yes; delete this line to remove it) The copy under Pages & Sections is written for the default values. If your values differ, rewrite every headline, paragraph, label and image for them — same length, tone and structure. Layout, colors, type and motion stay as described. Keep all copy, image paths and links in one content file (for example `src/content.ts`), keyed by section, so the content can be swapped later without touching components. ## Design ### Colors - Paper `#FFFFFF` — Light report canvas - Slate `#0F172A` — Text, dark mode surfaces and navigation - Indigo `#4F46E5` — Primary series, active links and focus - Soft amber `#F59E0B` — Previous period dashed curve, comparison key and markers with dark labels ### Typography - Navigation and report titles: Instrument Sans (OFL), weights 400/500/600/700 - Numbers and chart labels: IBM Plex Mono (OFL), weights 400/500 ### Layout & motion - Spacing: 208px navigation, 28px content gutter and 20px internal chart padding. Align all figures on consistent baselines. Collapse the rail into a menu on mobile. - Radius: 5px controls, 10px panels and 1px separators. - Motion: Draw the trend immediately and interpolate subsequent changes in under 180ms. Allow keyboard/touch point inspection. - Motion: Keep real-time counter updates subtle and suppress motion when requested. - Imagery: Original two-series SVG trend with fine guides, distinct line patterns and a soft indigo fill. Show a genuinely recognizable vector world map with selectable regions, tooltip and adjacent labeled country ranking. Draw small trend lines from actual aggregates. ## Pages & Sections ### Audience overview (`index.html`) 1. **Workspace and time window** — Show [BRAND], the selected publication [PUBLICATION] with [DOMAIN], Overview, Campaigns, Goals & funnels, and Share report. Default to the last 30 of 90 sample days. Choose 7, 30, 90 or a valid custom interval and compare to the preceding equal-length window with an explicit indication when history is incomplete. Save filters, range, goals and theme locally. Use period-relative axis labels such as D1. Layout: Use a narrow navigation rail with an original indigo symbol, clear active state and the publication switchboard information. Place the report title, range picker, theme toggle and share action above a compact metric row. 2. **Traffic over time** — Calculate unique visitors, pageviews, views per visit and a live visitor count from seeded anonymous visits. Visitors and Pageviews switch the primary measure, a comparison toggle controls the amber dashed series, a tooltip exposes point values. Simulate realtime visits in the adapter. Layout: Give Traffic overview a wide legible plot, labeled axes and a two-part legend. Place the live indicator with the corresponding metric. 3. **Content and audience reports** — Rank pages, referrers, countries, devices and browsers by the selected measure. Derive every block and the country map from the same filtered records. Clicking any row or active country adds a filter chip; adding another dimension intersects the selection. Individual chips and Clear all update all counts and charts. Make empty results reversible. Layout: Under the chart place Top pages beside Top referrers, then Countries with a drawn clickable map and ranking, Devices and Browsers. Display meaningful titles and restrained meter bars with exact counts; maintain touch targets. 4. **Privacy** — Use deterministic synthetic sessions with anonymous visit keys, ordered events, relative day slots, country, referrer, device, browser and campaign. Include repeat sessions so visitor and pageview counts differ. No tracker, consent dialogs or client identifiers. Layout: A small privacy note belongs with the source information. ### Campaigns (`#/campaigns`) 1. **Campaign report** — Group traffic by UTM campaign, source and medium and show visits, pageviews and goal conversions. Click a row to filter all reports. Keep the active range and chips across navigation. Layout: Provide an actionable table with the strongest source first and allow narrow screens to inspect each row. ### Goals & funnels (`#/goals`) 1. **Goal editor** — Seed two working goals including newsletter signup. Add, rename and delete goals with event or path conditions, and calculate completions for the current selection. Layout: Pair a named goal list and concise form with live results. 2. **Funnel builder** — Seed a three-step reading funnel. Let the user add, remove, reorder and choose event steps, name and save the funnel. Count sessions that reached each step in order within the same session, and show drop-off and conversion. Recompute under stacked filters. Layout: Use scaled horizontal bars on a shared baseline and real counts. Put editing controls alongside each step. ### Public report (`#/share`) 1. **Share view** — Copy a working link encoding the range, all filters and any custom goal/funnel definitions required to reproduce the view on another device. Open in read-only mode without edit controls or access to personal local settings. Direct visits with no parameters show the seeded report. Layout: Keep the report title, trend and breakdown tables, with a compact publication header and a Read-only label. ## Assets - font: Self-host Latin WOFF2 files from @fontsource/instrument-sans and @fontsource/ibm-plex-mono (SIL OFL). - icon: Draw the publication mark, charts, simplified geographic map and functional glyphs in code. Document geography sources if used. ## Don'ts - Do not show invented fixed KPI totals, nonfunctional navigation, a labeled empty map or fake share links. Keep the sample entirely local. - Use only the variable defaults for the default build. No real products, platforms, brands or logos. English copy throughout. No decorative dates or time stamps. - No backend, auth, external API, CDN or remote font. Use relative local asset URLs and hash routes or HTML files, serve direct links from a subdirectory. Keep the built site under 20 MB with no source maps or source tree. - Document all fonts, third-party files and code-drawn assets in ASSETS.md. Honor reduced motion, keyboard focus and contrast at AA. At 390px all controls must remain accessible without page overflow. Avoid empty first frames, disabled mock controls and interactions that only change a label. --- — Prompt by VibeFather · https://vibefather.ai/t/website-analytics-dashboard · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
中文参考译文(帮助理解,复制给 AI 时请用上面的英文原版)
# 网站分析仪表盘 完全按照以下描述构建此网站。将 [VARIABLES] 替换为你自己的值;其余内容保持不变。 ## 简介 为 [PUBLICATION] 构建一份隐私友好的流量报告,[PUBLICATION] 是位于 [DOMAIN] 的虚构出版物。[BRAND] 是其分析工作区。 - 受众:独立编辑和受众团队。 - 目标:识别哪些文章、引荐来源、地区和广告系列对读者数量的变化有贡献。 - 语气:平静、分析性、清晰的排版层级,使用实用的编辑语言。 ## 技术栈 - 框架:React 19 + Vite - 样式:原生 CSS(Vanilla CSS) - 库:无 - 构建:`npm run build` → 静态文件输出到 `dist/`。无后端、无服务端代码、无外部 API。 - 配置: - 使用相对 Vite base './'。在本地打包字体和脚本,压缩,并禁用 source map。 - 将所有可编辑标签、示例内容和产品名称放在一个内容模块中。将模拟服务放在一个适配器文件中。 - 通过一个可替换的数据适配器创建确定性的 90 天 fixture。从它的事件中推导所有指标、图表数据点和有序漏斗。 ## 变量 - [BRAND] — 分析工作区(默认:“Index Lantern”) - [PUBLICATION] — 出版物(默认:“Fieldwork Dispatch”) - [DOMAIN] — 出版物域名(默认:“fieldwork.example”) - [CREDIT] — 在页脚保留一个小型“Template by VibeFather”链接,指向 https://vibefather.ai/t/website-analytics-dashboard(默认:是;删除此行即可移除) “页面与区块”下的文案是按默认值撰写的。如果你的取值不同,请为它们重写每一个标题、段落、标签和图片——保持相同的长度、语气和结构。布局、颜色、字体和动效保持所述不变。 将所有文案、图片路径和链接放在一个内容文件中(例如 `src/content.ts`),按区块作为键,以便日后无需改动组件即可替换内容。 ## 设计 ### 颜色 - 纸白(Paper)`#FFFFFF` — 浅色报告画布 - 石板灰(Slate)`#0F172A` — 文本、深色模式表面和导航 - 靛蓝(Indigo)`#4F46E5` — 主序列、活动链接和焦点 - 柔和琥珀(Soft amber)`#F59E0B` — 上一周期虚线曲线、对比图例和带深色标签的标记 ### 排版 - 导航和报告标题:Instrument Sans(OFL),字重 400/500/600/700 - 数字和图表标签:IBM Plex Mono(OFL),字重 400/500 ### 布局与动效 - 间距:208px 导航、28px 内容边距和 20px 图表内部内边距。将所有图形对齐到一致的基线。在移动端将侧边栏折叠为菜单。 - 圆角:5px 控件、10px 面板和 1px 分隔线。 - 动效:立即绘制趋势,并在 180ms 内插值后续变化。允许键盘/触摸点检查。 - 动效:保持实时计数器更新微妙,并在有请求时抑制动效。 - 图像:原创双序列 SVG 趋势图,带有精细参考线、独特的线型和柔和的靛蓝填充。展示一个真正可识别的矢量世界地图,带有可选区域、工具提示和相邻的带标签国家排名。从实际聚合数据绘制小型趋势线。 ## 页面与区块 ### 受众概览(`index.html`) 1. **工作区与时间窗口** — 显示 [BRAND]、所选出版物 [PUBLICATION] 及其 [DOMAIN]、Overview、Campaigns、Goals & funnels 和 Share report。默认显示 90 个样本日中的最近 30 天。可选择 7、30、90 天或有效的自定义区间,并与前一个等长窗口对比,当历史数据不完整时给出明确提示。将筛选条件、区间、目标和主题保存在本地。使用相对于周期的轴标签,例如 D1。 布局:使用带有原创靛蓝色符号的窄导航栏,清晰的激活状态和出版物切换信息。将报告标题、区间选择器、主题切换和分享操作置于紧凑的指标行上方。 2. **流量随时间变化** — 从预置的匿名访问中计算独立访客、页面浏览量、每次访问浏览量和实时访客数。Visitors 和 Pageviews 切换主要度量,对比开关控制琥珀色虚线系列,工具提示显示数据点值。在适配器中模拟实时访问。 布局:为 Traffic overview 提供宽大清晰的图表、带标签的坐标轴和两部分图例。将实时指示器与对应指标放在一起。 3. **内容与受众报告** — 按所选度量对页面、引荐来源、国家/地区、设备和浏览器进行排名。每个区块和国家/地区地图都从相同的筛选记录中派生。点击任意行或活跃国家/地区会添加筛选标签;添加另一个维度会与当前选择取交集。单个标签和 Clear all 会更新所有计数和图表。使空结果可恢复。 布局:在图表下方,将 Top pages 放在 Top referrers 旁边,然后是带可点击绘制地图和排名的 Countries、Devices 和 Browsers。显示有意义的标题和带精确计数的克制仪表条;保持触摸目标。 4. **隐私** — 使用确定性合成会话,包含匿名访问键、有序事件、相对日槽、国家/地区、引荐来源、设备、浏览器和广告系列。包含重复会话,使访客数和页面浏览量不同。无跟踪器、同意对话框或客户端标识符。 布局:小型隐私说明应放在来源信息旁边。 ### 广告系列(`#/campaigns`) 1. **广告系列报告** — 按 UTM campaign、source 和 medium 对流量分组,并显示访问、页面浏览量和目标转化。点击一行可筛选所有报告。在导航过程中保持活跃区间和标签。 布局:提供可操作表格,最强的来源排在最前,并允许窄屏逐行查看。 ### 目标与漏斗(`#/goals`) 1. **目标编辑器** — 预置两个可用目标,包括 newsletter signup。添加、重命名和删除带事件或路径条件的目标,并计算当前选择的完成数。 布局:将命名目标列表和简洁表单与实时结果配对。 2. **漏斗构建器** — 预置一个三步阅读漏斗。允许用户添加、移除、重新排序和选择事件步骤,命名并保存漏斗。统计在同一会话中按顺序到达每个步骤的会话数,并显示流失和转化。在叠加筛选条件下重新计算。 布局:在共享基线上使用缩放的水平条和真实计数。将编辑控件放在每个步骤旁边。 ### 公开报告(`#/share`) 1. **分享视图** — 复制一个可用链接,编码区间、所有筛选条件以及在任何其他设备上重现该视图所需的任何自定义目标/漏斗定义。以只读模式打开,无编辑控件或对个人本地设置的访问权限。无参数的直接访问显示预置报告。 布局:保留报告标题、趋势和细分表格,带有紧凑的出版物标题和 Read-only 标签。 ## 资源 - 字体:从 @fontsource/instrument-sans 和 @fontsource/ibm-plex-mono 自托管拉丁 WOFF2 文件(SIL OFL)。 - 图标:用代码绘制出版物标志、图表、简化地理地图和功能性字形。如使用地理数据,请注明来源。 ## 不要做 - 不要展示虚构的固定 KPI 总计、无功能的导航、标注为空的空地图或虚假的分享链接。保持示例完全在本地运行。 - 默认构建仅使用变量默认值。不要使用真实产品、平台、品牌或徽标。全程使用英文文案。不要装饰性日期或时间戳。 - 不要后端、认证、外部 API、CDN 或远程字体。使用相对本地资源 URL 和哈希路由或 HTML 文件,从子目录提供直接链接。保持构建后的站点在 20 MB 以下,不包含 source map 或源码树。 - 在 ASSETS.md 中记录所有字体、第三方文件和代码绘制的资源。遵循减少动态效果、键盘焦点和 AA 级对比度。在 390px 宽度下,所有控件必须保持可访问且页面不溢出。避免空的首帧、禁用的模拟控件以及仅改变标签的交互。 --- — Prompt by VibeFather · https://vibefather.ai/t/website-analytics-dashboard · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
个人项目可免费使用(CC BY-NC 4.0)。 商业用途需要 Pro.
DESIGN.md
单独的设计规范:配色、字体、间距和动效。可以把这套视觉用到你已有的项目上。
---
name: "Website Analytics Dashboard"
colors:
paper: "#FFFFFF"
slate: "#0F172A"
indigo: "#4F46E5"
soft_amber: "#F59E0B"
typography:
navigation_and_report_titles: { family: "Instrument Sans", weights: [400, 500, 600, 700] }
numbers_and_chart_labels: { family: "IBM Plex Mono", weights: [400, 500] }
spacing: "208px navigation, 28px content gutter and 20px internal chart padding. Align all figures on consistent baselines. Collapse the rail into a menu on mobile."
radius: "5px controls, 10px panels and 1px separators."
---
# Website Analytics Dashboard — Design System
Apply this design system to an existing project. It describes the look and feel only; for the full site, use prompt.md.
## Colors
- **Paper** `#FFFFFF` — Light report canvas
- **Slate** `#0F172A` — Text, dark mode surfaces and navigation
- **Indigo** `#4F46E5` — Primary series, active links and focus
- **Soft amber** `#F59E0B` — Previous period dashed curve, comparison key and markers with dark labels
## Typography
- **Navigation and report titles** — Instrument Sans (OFL), weights 400/500/600/700. Self-host the font files.
- **Numbers and chart labels** — IBM Plex Mono (OFL), weights 400/500. Self-host the font files.
## Spacing & shape
- Spacing: 208px navigation, 28px content gutter and 20px internal chart padding. Align all figures on consistent baselines. Collapse the rail into a menu on mobile.
- Radius: 5px controls, 10px panels and 1px separators.
## Motion
- Draw the trend immediately and interpolate subsequent changes in under 180ms. Allow keyboard/touch point inspection.
- Keep real-time counter updates subtle and suppress motion when requested.
## Imagery
Original two-series SVG trend with fine guides, distinct line patterns and a soft indigo fill. Show a genuinely recognizable vector world map with selectable regions, tooltip and adjacent labeled country ranking. Draw small trend lines from actual aggregates.
## Tone
Calm, analytical, crisp typographic hierarchy with practical editorial language.
---
— Prompt by VibeFather · https://vibefather.ai/t/website-analytics-dashboard · CC BY-NC 4.0 (non-commercial; commercial use needs a VibeFather Pro license) · Request removal: https://vibefather.ai/takedown
改成你自己的
- 独立新闻通讯:将 PUBLICATION 和 DOMAIN 设置为你的标题,然后用你自己的发送和注册数据替换样本文章和营销活动名称。
- 本地新闻编辑部:将国家地图和热门页面指向你所在城市的栏目,并构建从首页访问到文章阅读再到新闻通讯注册的漏斗。
- 会员制出版方:围绕订阅结账添加一个目标,然后每周与编辑团队分享只读报告链接。
- 运营博客的创作者:保留访客和页面浏览量图表,将推荐来源表格替换为社交平台,并将 BRAND 设置为你自己的工作区名称。
网站分析仪表盘:常见问题
如何将网站分析仪表盘连接到我的真实流量数据?
网站分析仪表盘模板自带一个确定性的 90 天样本数据文件,位于独立的数据源适配器之后,因此你可以替换该适配器来接入自己的聚合流量,而无需修改展示组件。从现有服务导出每日访客、页面浏览量、推荐来源、国家、设备、浏览器和营销活动总计,然后按样本使用的相同结构传入即可。不需要追踪器或同意对话框,因为模板只读取聚合数据。
怎么用 AI 做一个网站分析仪表盘?
复制本页的提示词,或者运行 npx vibefather add website-analytics-dashboard,把 [BRAND]、[DOMAIN]、[PUBLICATION] 换成你自己的内容,再粘贴到 Claude Code、Codex、Cursor 等 AI 编程工具里。在线演示就是用这份提示词原样做出来的。