Example proposal: cookieless analytics with native MCP integration for AI agents
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- nextjs, typescript
调研方向
首先阅读相关的 solutions/script-component-strategies 和 solutions/script-component-ad 示例,以及 framework-boilerplates/xmcp。在开始之前,确认该示例应当与品牌无关、使用品牌,还是添加到现有 solution 中。完成的标准是:一个已达成共识的示例展示 app/layout.tsx tracker、MCP 设置和查询,以及一个用于自定义事件的 Vercel 函数。
由索引模型根据 Issue 内容生成。
描述
Proposal
A solutions/ example showing how to integrate cookieless web analytics into a Next.js app, with native MCP so coding agents (Cursor, Claude, Codex, Windsurf) can install + query analytics in one prompt. Would slot in next to script-component-strategies and script-component-ad, which cover related <Script> patterns.
The framework already has framework-boilerplates/xmcp showing how to build an MCP server. This proposal is the complementary case: how to consume an MCP-aware analytics service from a Next.js app, end to end.
What the example would demonstrate
- Cookieless tracker installation — one
<Script>inapp/layout.tsx, gated onNEXT_PUBLIC_GIZMO_KEY. No cookie banner needed under CNIL/EDPB.afterInteractivestrategy so the tracker doesn't compete with LCP. - MCP server integration — the AI coding agent connects via the hosted MCP endpoint, OAuth onboarding via dynamic client registration (RFC 7591), and can run setup operations (
setup_analytics_for_site,verify_install), workflow operations (summarize_all_sites,explain_traffic_change), and query primitives (filterable breakdowns, time series). - Custom event tracking via Vercel functions — a small API route showing how to fire server-side events alongside the client tracker.
Why this is useful here
- Vercel's audience increasingly uses AI coding agents — this is the only end-to-end example showing the "talk to your analytics from your editor" workflow.
- Cookieless analytics is the de-facto choice for any EU-facing Next.js site that doesn't want a consent banner. There's no example covering that pattern today.
- Builds naturally on
script-component-strategies(script loading), which is the closest existing example.
Why I'm raising it as an issue first
I'd build this against Gizmo Analytics since that's the MCP-first analytics service I'm familiar with (free tier, MIT-licensed MCP server, hosted endpoint with full OAuth, official MCP Registry listed). But I don't want to assume a brand-specific example is what you want — wanted to check first.
Three paths I can take, ordered by preference:
- Brand-agnostic —
solutions/cookieless-analytics-mcpusing Gizmo as the concrete provider, with the README explicitly noting it's swappable for any MCP-aware analytics provider that follows the same<Script>+gizmoanalytics.io/mcp-style remote endpoint pattern. - Branded —
solutions/gizmo-analyticssimilar to howsolutions/platforms-slate-supabaseis brand-specific. - Built into an existing example — fold the integration into one of the existing
solutions/examples (e.g., a blog template) as an opt-in analytics layer.
Happy to build whichever fits your conventions, or skip if it's not a fit. Just looking for a thumbs-up + direction before I spend the time.
- 主要语言
- TypeScript
- 星标
- 5.2k
- 派生
- 1.9k
- 平均合并
- 1 小时 4 分钟
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
vercel/examples 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
[next-chat] Typing indicator gets stuck when a socket disconnects mid-typing可能已有人在做 @officialasishkumar 于 12 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 55/100
维护者通常 1 天内回复
-
CARGO-TAXI未关闭
难度 5/5 一周以上 新手友好度 10/100
维护者通常 1 天内回复
-
Better Choicez未关闭
难度 5/5 一周以上 新手友好度 15/100
vercel/examples#1584 · 2 个 reaction ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 32/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
AykutSarac/jsoncrack.com#616 ·
-
nip27: long hashtag swallows the rest of the content, lone # gives an empty hashtag可能已有人在做 @bardrop 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
nbd-wtf/nostr-tools#578 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
backnotprop/plannotator#3427 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
microsoft/Power-CAT-Copilot-Studio-Kit#942 ·
维护者通常 1 天内回复
-
[BUG]: Duplicate preposition in heading and unformatted feedback text on Strengthen Argument page未关闭bug
难度 2/5 1-3 小时 新手友好度 72/100
AOSSIE-Org/DebateAI#801 · 1 条评论 ·
维护者通常 1 天内回复