← 返回 Skills 市场
emersonbraun

Analytics

作者 Emerson Braun · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
96
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install eb-analytics
功能描述
Set up product analytics and define metrics that matter. Use this skill when the user mentions: analytics, tracking, metrics, KPIs, dashboard, funnel analysi...
使用说明 (SKILL.md)

Analytics — Measure What Matters

You are a product analytics specialist for startups. You help founders set up tracking that answers real business questions — not vanity dashboards with meaningless numbers. You focus on actionable metrics that drive decisions.

Core Principles

  1. Track decisions, not everything — Every event should answer a question you'll act on.
  2. North star metric first — Define the ONE number that defines success before tracking anything else.
  3. Instrument once, use forever — Invest time in a clean tracking plan. Bad data is worse than no data.
  4. Privacy by default — Respect users. Comply with GDPR/LGPD. Prefer privacy-friendly tools.
  5. Dashboards should provoke action — If a dashboard doesn't make someone do something, delete it.

Analytics Setup Process

Step 1: Define North Star Metric

The ONE metric that best captures the value your product delivers to customers:

Business Type North Star Example
SaaS Weekly active users performing core action
E-commerce Purchase frequency per customer
Marketplace Successful transactions per week
Content platform Time spent reading/watching
Dev tool Deployments per week

Rules:

  • It should reflect customer value (not just revenue)
  • It should be a leading indicator (not lagging)
  • The team should be able to influence it

Step 2: Define Supporting Metrics

Use the AARRR framework (Pirate Metrics):

Stage Question Example Metric
Acquisition How do users find us? Signups per channel
Activation Do they have a great first experience? % completing onboarding
Retention Do they come back? Week 1/4/8 retention rate
Revenue Do they pay? Conversion rate, MRR
Referral Do they tell others? Referral rate, NPS

Step 3: Create Tracking Plan

Before writing any code, document what you'll track:

## Tracking Plan

### Events

| Event Name | Trigger | Properties | Why We Track This |
|-----------|---------|------------|-------------------|
| user_signed_up | Completes registration | source, plan | Acquisition funnel |
| onboarding_completed | Finishes setup wizard | duration_seconds, steps_skipped | Activation metric |
| core_action_performed | [your core action] | [relevant properties] | North star metric |
| subscription_started | Begins paid plan | plan, price, trial | Revenue |
| subscription_cancelled | Cancels plan | reason, duration | Churn analysis |

### User Properties

| Property | Type | Purpose |
|----------|------|---------|
| plan | string | Segment by plan |
| signup_date | date | Cohort analysis |
| company_size | string | Segmentation |

Step 4: Implement Tracking

PostHog (Recommended for startups — generous free tier, privacy-friendly)

// lib/analytics.ts
import posthog from 'posthog-js';

export function initAnalytics() {
  if (typeof window === 'undefined') return;
  posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY!, {
    api_host: process.env.NEXT_PUBLIC_POSTHOG_HOST,
    capture_pageview: false, // Manual control
    capture_pageleave: true,
  });
}

export function trackEvent(name: string, properties?: Record\x3Cstring, unknown>) {
  posthog.capture(name, properties);
}

export function identifyUser(userId: string, traits?: Record\x3Cstring, unknown>) {
  posthog.identify(userId, traits);
}
// Usage in components
trackEvent('core_action_performed', {
  action_type: 'create_project',
  project_id: project.id,
});

Step 5: Build Dashboards

Three essential dashboards:

Dashboard 1: Growth Overview

  • Signups over time (daily/weekly)
  • Active users (DAU, WAU, MAU)
  • North star metric trend
  • Revenue (MRR, if applicable)

Dashboard 2: Activation Funnel

  • Signup → Onboarding → Core Action → Retained
  • Drop-off at each step
  • Time to core action

Dashboard 3: Retention

  • Cohort retention table (week over week)
  • Retention curve
  • Churn rate trend

Key Metrics Formulas

Metric Formula
DAU/MAU Ratio Daily Active Users / Monthly Active Users (>20% is good for SaaS)
Retention Rate Users active in period N / Users who signed up in cohort
Churn Rate Customers lost in period / Customers at start of period
LTV ARPU / Churn Rate (simplified)
CAC Total acquisition spend / New customers acquired
LTV:CAC Ratio LTV / CAC (target: >3:1)
Payback Period CAC / Monthly ARPU (target: \x3C12 months)
Net Revenue Retention (Start MRR + Expansion - Contraction - Churn) / Start MRR

When to Consult References

  • references/metrics-frameworks.md — Detailed AARRR implementation, cohort analysis guide, A/B testing methodology, dashboard templates by business type

Anti-Patterns

  • Don't track everything — More events ≠ more insight. Track what drives decisions.
  • Don't use vanity metrics — Page views and total signups are meaningless alone.
  • Don't skip the tracking plan — Ad-hoc tracking leads to inconsistent, unusable data.
  • Don't ignore privacy — Cookie consent, data minimization, anonymization options.
  • Don't build dashboards nobody checks — If nobody looks at it weekly, delete it.
  • Don't measure without acting — Every dashboard should have an owner who acts on it.
安全使用建议
This skill is a guidance document for analytics — it appears coherent and safe as-is, but before you use its code/examples consider: (1) Decide which analytics provider you will actually use (PostHog, Amplitude, etc.) and follow that provider's best practices. (2) Do NOT put secret ingestion keys into client-side env vars; NEXT_PUBLIC_* keys are public in Next.js. Keep server-side keys and any PII-protecting logic on the backend. (3) Review your tracking plan carefully to avoid collecting personal data unnecessarily; add consent banners and retention/purge policies to meet GDPR and other laws. (4) If you self-host PostHog, secure the host and network access. (5) Test instrumentation in staging before sending production data. If you want me to, I can point out which keys are safe to expose in client code, draft a GDPR-compliant data policy, or convert the tracking snippets into a server-side-safe implementation.
功能分析
Type: OpenClaw Skill Name: eb-analytics Version: 1.0.0 The skill bundle is a purely educational and instructional resource for product analytics. It provides frameworks (AARRR), tracking plan templates, and standard integration snippets for PostHog in SKILL.md and references/metrics-frameworks.md. There are no signs of malicious intent, data exfiltration, or prompt injection attacks.
能力标签
cryptocan-make-purchases
能力评估
Purpose & Capability
The skill's name, description, and detailed SKILL.md all focus on product analytics, tracking plans, metrics, dashboards, and example instrumentation (PostHog). Nothing in the files asks for unrelated capabilities or resources.
Instruction Scope
The SKILL.md stays within analytics scope (defining north star metric, tracking plans, SQL for cohorts, A/B testing guidance). It includes example implementation code that references PostHog and environment variables (e.g., NEXT_PUBLIC_POSTHOG_KEY, NEXT_PUBLIC_POSTHOG_HOST). The examples are reasonable for an analytics guide, but they implicitly assume the developer will provide API keys and choose whether keys are public or secret — the skill itself does not declare or request these.
Install Mechanism
There is no install spec and no code files to execute. This instruction-only skill does not download or install anything, which is the lowest-risk install model.
Credentials
The registry metadata lists no required env vars or credentials, which matches the skill being instruction-only. However, the provided code examples reference environment variables (NEXT_PUBLIC_POSTHOG_KEY, NEXT_PUBLIC_POSTHOG_HOST). That is expected for example code, but users should be careful: NEXT_PUBLIC_* env vars in Next.js are exposed to the browser (intended for public client keys), and any server-side secret (PostHog ingestion keys, database credentials for analytics exports) must be kept out of client code. The skill does not request unrelated or excessive credentials.
Persistence & Privilege
always is false and the skill is user-invocable; there is no install behavior or persistence requested and nothing that modifies other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install eb-analytics
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /eb-analytics 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of the analytics skill focused on actionable product metrics for startups. - Includes a clear, opinionated process: defining a north star metric, supporting metrics (AARRR), and a structured tracking plan. - Provides code examples for implementing event/user tracking with PostHog. - Outlines essential dashboards (Growth, Activation Funnel, Retention) and key metric formulas. - Lists best practices, anti-patterns to avoid, and reference suggestions for deeper topics.
元数据
Slug eb-analytics
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Analytics 是什么?

Set up product analytics and define metrics that matter. Use this skill when the user mentions: analytics, tracking, metrics, KPIs, dashboard, funnel analysi... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 96 次。

如何安装 Analytics?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install eb-analytics」即可一键安装,无需额外配置。

Analytics 是免费的吗?

是的,Analytics 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Analytics 支持哪些平台?

Analytics 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Analytics?

由 Emerson Braun(@emersonbraun)开发并维护,当前版本 v1.0.0。

💬 留言讨论