Communitygithub.com

YepAPI/技能包

Web 分析集成 — 事件跟踪、自定义仪表板、隐私优先。

技能包 是什么?

该技能专注于帮助开发者和 AI 代理以隐私优先的方式集成 Web 分析。它推荐使用 Plausible、Fathom、Umami 等符合 GDPR 的工具,或自托管 PostHog,并强制要求服务器端跟踪(如 Next.js 中间件或 API 路由)以避免广告拦截器导致 20-40% 的数据丢失。技能定义了清晰的自定义事件命名规范(snake_case 的 verb_noun 格式)、UTM 参数解析(utm_source/utm_medium/utm_campaign)以及内部流量过滤(基于 IP 或身份验证管理员)方法。此外,它还指导如何构建内部分析仪表板、遵守欧盟同意横幅要求,并严格禁止在未获得 Cookie 同意的情况下使用 Google Analytics、无差别地跟踪所有事件或发送个人身份信息(PII)。该技能适用于需要在 Claude Code、Cursor、Codex 等 AI 编码工具中快速实现合规且准确的分析仓库的项目。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/YepAPI/skills/tree/HEAD/skills/analytics

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Web 分析

规则

  • 隐私优先:使用 Plausible、Fathom 或 Umami 以符合 GDPR — 或自托管 PostHog
  • 服务器端跟踪以确保准确性:Next.js 中间件或 API 路由 — 而非仅客户端跟踪
  • 自定义事件:跟踪有意义的操作(注册、购买、feature_used)— 而不仅仅是页面浏览量
  • UTM 参数:从 URL 解析 utm_source、utm_medium、utm_campaign — 与转化事件一起存储
  • 事件命名规范:snake_case 形式,verb_noun 格式:click_cta、submit_form、view_pricing
  • 仪表板:使用 YepAPI 领域数据 + 您自己的事件数据构建内部分析页面
  • 同意横幅:在欧盟地区必需 — 仅在获得同意后加载跟踪
  • 排除内部流量:按 IP 或已认证的管理员用户过滤

避免

  • 没有 Cookie 同意的 Google Analytics — 违反 GDPR
  • 跟踪所有内容 — 重点关注可操作的指标,而非虚荣的页面浏览量
  • 仅客户端跟踪 — 广告拦截器会移除 20-40% 的数据
  • 向分析工具发送 PII(电子邮件、姓名)— 使用匿名 ID

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

YepAPI/skills

WCAG 2.1 AA — semantic HTML, keyboard navigation, screen readers.

YepAPI/skills

Experiment setup, variant splitting, statistical significance, and feature flag integration.

YepAPI/skills

CRUD generators, data tables, user management, role-based access, and bulk operations.

YepAPI/skills

Monitor what ChatGPT and Gemini say about your brand using YepAPI.

YepAPI/skills

Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

YepAPI/skills

Commander.js, interactive prompts with Clack, spinners, colors, config files, exit codes, and npm publishing.

YepAPI/skills

cmdk integration, Cmd+K trigger, fuzzy search, grouped actions, keyboard navigation, and dynamic action registration.

YepAPI/skills

Content planning with trend and sentiment data from YepAPI.

YepAPI/skills

Content calendar, keyword-driven planning, and content briefs.

YepAPI/skills

Theme switching with CSS variables, system preference detection, next-themes, and persistence.

YepAPI/skills

Threaded comments, @mentions, reactions, moderation queue, optimistic UI, and cursor pagination.

YepAPI/skills

Competitive analysis between domains using YepAPI.

YepAPI/skills

Layout grids, KPI cards, data tables with sorting/filtering, sidebar navigation, and responsive breakpoints.

YepAPI/skills

Data encryption — TLS everywhere, AES-256-GCM for PII, bcrypt passwords, encrypted backups.

YepAPI/skills

Chart patterns with Recharts/Nivo/D3, responsive containers, color scales, and accessibility.

YepAPI/skills

Drizzle schema definition, push vs migrate, type-safe queries, relations, transactions, and prepared statements.

YepAPI/skills

Upload handling, resize/compress, CDN delivery, blur placeholders, and next/image patterns.

YepAPI/skills

Local business and Google Maps research using YepAPI.

YepAPI/skills

Cursor-based pagination, IntersectionObserver, virtualized lists with @tanstack/react-virtual, and scroll position restoration.

YepAPI/skills

Chat UI components, streaming responses with AI SDK, context window management, and RAG patterns.

相关技能