Token导航 LogoToken导航TokenDH.com
前端设计操作浏览器github未标认证来源可访问clear审计通过

product-analytics-integratorproduct 分析 integrator

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

321

周安装

13

GitHub Stars

公开资料未说明

下载量

101
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:product-analytics-integrator(product 分析 integrator)
来源仓库:https://github.com/sitechfromgeorgia/georgian-distribution-system
仓库路径:skills/product-analytics-integrator
安装命令:
npx skills add https://github.com/sitechfromgeorgia/georgian-distribution-system --skill product-analytics-integrator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/sitechfromgeorgia/georgian-distribution-system --skill product-analytics-integrator

简介

用于辅助前端页面、组件与样式开发维护。product-analytics-integrator 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

  • 适合生成或审查 React、Vue、Tailwind CSS 等相关代码。
  • 使用时需结合项目现有设计系统和路由结构。
  • 涉及页面改动时应配合本地预览与构建检查确认效果。
  • 避免只输出孤立片段,需保持与整体工程一致。

SKILL.md

Product Analytics Integrator

Overview

This skill provides comprehensive guidance for implementing and optimizing product analytics infrastructure. It covers event tracking design, SDK integration, data governance, dashboard creation, and behavioral analysis using industry-leading tools like PostHog, Mixpanel, Google Analytics 4, and Amplitude.


Core Responsibilities

1. Event Tracking Design

  • Design semantic event models using Object-Action framework
  • Establish naming conventions and taxonomy standards
  • Define event properties and user attributes
  • Create tracking plans with clear documentation
  • Validate event instrumentation completeness

2. Analytics SDK Integration

  • Integrate PostHog, Mixpanel, GA4, or Amplitude SDKs
  • Configure autocapture vs custom event strategies
  • Implement privacy-compliant tracking
  • Set up cross-platform tracking (web, mobile, backend)
  • Validate data flow and event delivery

3. Dashboard & Reporting

  • Design KPI dashboards for product metrics
  • Create funnel analyses for conversion optimization
  • Build cohort retention analyses
  • Set up automated Slack/email reports
  • Implement real-time monitoring for critical events

4. Data Interpretation

  • Analyze user behavior patterns and trends
  • Identify drop-off points in user journeys
  • Measure feature adoption and engagement
  • Calculate retention curves and churn rates
  • Generate actionable insights from metrics

Event Naming Convention Standards

Object-Action Framework

Format: Object Action or Category: Object Action

Best Practice: Use Title Case for event names, snake_case for properties

Examples:

  • Button Clicked
  • Form Submitted
  • Product Added
  • app: Onboarding Completed
  • checkout: Payment Failed
  • button_clicked (wrong casing)
  • ClickedButton (wrong order)
  • User clicked the submit button (too verbose)

Category Prefixes

Add context for where events originate:

  • app: - Main application events
  • site: - Marketing website events
  • checkout: - Checkout flow events
  • onboarding: - User onboarding events
  • settings: - Account settings events

Examples:

app: Dashboard Viewed
site: Newsletter Subscribed
checkout: Payment Completed
onboarding: Step Completed
settings: Password Changed

Verb Tense Guidelines

Recommended: Past tense (event already happened)

Examples:

  • Product Added (clear: action completed)
  • User Signed Up
  • Page Viewed
  • Product Add (confusing: incomplete action?)
  • User Sign Up

Property Naming

Format: snake_case for all event properties

Best Practices:

  • Descriptive and clear names
  • Include units where relevant
  • Use consistent data types
  • Document expected values

Examples:

analytics.track('Product Added', {
  product_id: 'prod_123',
  product_name: 'Premium Subscription',
  product_category: 'subscriptions',
  price_usd: 29.99,
  currency: 'USD',
  quantity: 1,
  discount_applied: true,
  discount_code: 'SAVE20'
});

Standard Property Types

Common Property Patterns:

// Identifiers (suffix with _id)
user_id, session_id, product_id, order_id

// Names (suffix with _name)
product_name, feature_name, campaign_name

// Status/State (suffix with _status or _state)
payment_status, order_status, subscription_state

// Timestamps (suffix with _at)
created_at, completed_at, canceled_at

// Durations (suffix with _seconds or _ms)
session_duration_seconds, load_time_ms

// Counts (suffix with _count)
item_count, retry_count, view_count

// Booleans (prefix with is_ or has_)
is_premium, has_discount, is_mobile

// Categories/Types (suffix with _type or _category)
product_type, event_type, user_category

Platform-Specific Implementation

PostHog Integration

Best For: Product-focused teams needing session replay, feature flags, and A/B testing

Key Features:

  • Autocapture with minimal setup
  • Built-in session replay
  • Feature flags and experiments
  • Self-hosted option for data privacy
  • SQL access for custom queries

Setup Example (JavaScript):

// Install: npm install posthog-js

import posthog from 'posthog-js'

posthog.init('<project_api_key>', {
  api_host: 'https://us.i.posthog.com',
  defaults: '2025-05-24', // Use latest defaults
  capture_pageview: 'history_change', // For SPAs
  autocapture: true, // Enable autocapture
  session_recording: {
    maskAllInputs: true, // Privacy-first
    maskTextSelector: '.sensitive'
  }
})

// Custom event tracking posthog.capture('Product Added', {product_id: 'prod_123', product_name: 'Premium Plan', price_usd: 29.99})

// Identify users posthog.identify('user_123', {email: 'user@example.com', plan: 'premium', signup_date: '2025-01-15'})

**Best Practices**:
- Use autocapture initially, then add custom events for critical actions
- Enable session replay for debugging user issues
- Set up feature flags for gradual rollouts
- Use reverse proxy to avoid ad blockers

### Mixpanel Integration

**Best For**: Deep behavioral analysis with advanced segmentation

**Key Features**:
- Event-driven architecture
- Powerful cohort analysis
- Real-time data updates
- Advanced funnel analysis
- A/B test result analysis
**Setup Example (JavaScript)**:

// Install: npm install mixpanel-browser

import mixpanel from 'mixpanel-browser'

mixpanel.init('<project_token>', { track_pageview: true, persistence: 'localStorage' })

// Track events mixpanel.track('Product Added', { product_id: 'prod_123', product_name: 'Premium Plan', product_category: 'subscriptions', price_usd: 29.99 })

// Identify users mixpanel.identify('user_123') mixpanel.people.set({ '$email': 'user@example.com', '$name': 'John Doe', 'plan': 'premium', 'signup_date': '2025-01-15' })

// Track revenue mixpanel.people.track_charge(29.99, { '$time': new Date().toISOString(), 'product_id': 'prod_123' })


**Best Practices**:

- Track user properties for detailed segmentation
- Use Mixpanel's people profiles for user-centric analysis
- Set up custom dashboards for key metrics
- Track revenue events for monetization analysis

### Google Analytics 4 Integration

**Best For**: Marketing-focused teams tracking acquisition and content

**Key Features**:

- Free tier with generous limits
- Deep Google Ads integration
- Predictive metrics (churn, purchase probability)
- Cross-platform tracking (web + app)
- BigQuery export

**Setup Example (JavaScript)**:

// Add to <head> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-XXXXXXXXXX'); </script>

// Custom event tracking gtag('event', 'product_added', { product_id: 'prod_123', product_name: 'Premium Plan', product_category: 'subscriptions', price: 29.99, currency: 'USD' });


**Best Practices**:

- Use Google Tag Manager for flexible tracking
- Set up enhanced ecommerce for online stores
- Configure custom dimensions/metrics for product-specific data
- Enable BigQuery export for advanced analysis

### Amplitude Integration

**Best For**: Enterprise teams needing advanced behavioral analytics

**Key Features**:

- Industry-leading cohort analysis
- Behavioral insights and predictions
- Multi-step funnel analysis
- User journey mapping
- Robust data governance tools

**Setup Example (JavaScript)**:

// Install: npm install @amplitude/analytics-browser import * as amplitude from '@amplitude/analytics-browser'

amplitude.init('<api_key>', { defaultTracking: { sessions: true, pageViews: true, formInteractions: true } })

// Track events amplitude.track('Product Added', { product_id: 'prod_123', product_name: 'Premium Plan', product_category: 'subscriptions', price_usd: 29.99 })

// Identify users amplitude.setUserId('user_123') amplitude.identify( new amplitude.Identify() .set('email', 'user@example.com') .set('plan', 'premium') .set('signup_date', '2025-01-15') )


**Best Practices**:

- Use Amplitude's taxonomy feature for data governance
- Set up retention cohorts to measure feature stickiness
- Create user journey maps for complex flows
- Use Amplitude Data for tracking plan management

---

## Event Tracking Strategy

### Autocapture vs Custom Events

**Autocapture (PostHog, Heap)**:

- ✅ Fast setup with zero code
- ✅ Retroactive event definition
- ✅ No missing interactions
- ❌ High data volume
- ❌ Noisy/unclear event names
- ❌ Difficult to filter signal from noise

**Custom Events (Mixpanel, Amplitude)**:

- ✅ Clean, intentional data
- ✅ Clear event semantics
- ✅ Lower data volume
- ✅ Business-focused tracking
- ❌ Requires developer implementation
- ❌ Can miss unexpected behaviors
- ❌ Not retroactive

**Recommended Hybrid Approach**:

1. Start with autocapture for quick insights
2. Identify critical user actions
3. Implement custom events for these actions
4. Keep autocapture for exploratory analysis
5. Gradually refine based on insights

### Critical Events to Track

**User Lifecycle**:

- User Signed Up
- Onboarding Completed
- First Action Completed
- Feature Discovered
- Subscription Started
- Subscription Canceled
- Account Deleted

**Product Engagement**:

- Page Viewed
- Feature Used
- Search Performed
- Filter Applied
- Content Created
- Content Shared
- Help Accessed

**Conversion Funnel**:

- Product Viewed
- Product Added to Cart
- Checkout Started
- Payment Information Entered
- Order Completed
- Order Failed

**Feature Adoption**:

- Feature Viewed
- Feature Interaction Started
- Feature Action Completed
- Feature Shared
- Feedback Provided

---

## Dashboard Design Patterns

### 1. Product Health Dashboard

**Metrics**:

- Daily/Weekly/Monthly Active Users (DAU/WAU/MAU)
- User retention curves (D1, D7, D30)
- Feature adoption rates
- Session duration averages
- Crash/error rates

**Recommended Visualizations**:

- Line charts for DAU/WAU/MAU trends
- Retention curves (cohort retention)
- Feature usage heatmap
- Top features by engagement

### 2. Conversion Funnel Dashboard

**Metrics**:

- Funnel conversion rates by stage
- Drop-off points identification
- Time between funnel steps
- Conversion by user segment
- Revenue per conversion

**Recommended Visualizations**:

- Funnel chart with drop-off rates
- Cohort conversion over time
- Segment comparison (A/B testing)

### 3. Engagement Dashboard

**Metrics**:

- Feature engagement frequency
- Power user identification
- Engagement distribution
- Content interaction rates
- Session depth metrics

**Recommended Visualizations**:

- Feature usage matrix
- User engagement distribution
- Session flow diagrams

### 4. Retention Dashboard

**Metrics**:

- N-day retention rates
- Churn prediction
- Feature stickiness
- Activation correlation
- Resurrection rates

**Recommended Visualizations**:

- Retention curves by cohort
- Churn risk segments
- Feature impact on retention

---

## Cohort Analysis Patterns

### Cohort Types

**1. Time-Based Cohorts**:

- Sign-up week/month cohorts
- Feature launch cohorts
- Campaign cohorts
- Seasonal cohorts

**2. Behavioral Cohorts**:

- Power users (>X actions/week)
- Trial users
- Paying customers
- Churned users
- At-risk users

**3. Demographic Cohorts**:

- Geographic segments
- Plan type segments
- Company size segments
- Industry segments

### Cohort Analysis Examples

**Example 1: Feature Adoption by Cohort**

Question: Do users who sign up in Q1 2025 adopt Feature X faster than Q4 2024 users?

Setup:

  1. Create cohorts by signup quarter
  2. Track "Feature X Used" event
  3. Measure time-to-feature-adoption
  4. Compare adoption curves

**Example 2: Retention by Acquisition Channel**

Question: Which marketing channel brings the most retained users?

Setup:

  1. Create cohorts by utm_source
  2. Measure D7, D30, D90 retention
  3. Calculate retention curves
  4. Identify highest-quality channels

**Example 3: Feature Impact on Retention**

Question: Does using Feature Y improve 30-day retention?

Setup:

  1. Create cohort: Users who used Feature Y in first week
  2. Create cohort: Users who did NOT use Feature Y
  3. Compare 30-day retention rates
  4. Calculate retention lift

---

## Data Validation & Quality

### Validation Checklist

**Before Launch**:

- Events fire on correct user actions
- Event properties include all required fields
- Property data types match specification
- Events fire exactly once (no duplicates)
- User identification works correctly
- Cross-platform tracking links properly
- Privacy compliance (PII masking) verified
- QA environment tracking separated from production

**Post-Launch Monitoring**:

- Event volume matches expectations
- No unexpected spikes/drops in event counts
- Property value distributions are reasonable
- No null/undefined values where unexpected
- Event timestamps are accurate
- User counts align with known metrics

### Common Data Quality Issues

**Issue 1: Duplicate Events**

Symptom: Same event fires multiple times for single action Root Cause: Multiple SDK initializations, button double-clicks Fix: Debounce event tracking, ensure single SDK init


**Issue 2: Missing Properties**

Symptom: Events missing critical properties Root Cause: Async data loading, undefined variables Fix: Validate properties exist before tracking, use defaults


**Issue 3: Inconsistent Naming**

Symptom: Same event with multiple names Root Cause: No naming convention enforcement Fix: Implement validation layer, use TypeScript types


**Issue 4: PII Leakage**

Symptom: Email, phone, or sensitive data in events Root Cause: Autocapture capturing form inputs Fix: Mask sensitive fields, use data governance rules


### Testing Strategy

**Manual Testing**:

1. Open browser developer tools
2. Trigger user actions
3. Verify events in network tab or analytics debugger
4. Check event properties match specification
5. Test across devices and browsers

**Automated Testing** (Example with Jest):

import { render, fireEvent } from '@testing-library/react' import { trackEvent } from './analytics'

jest.mock('./analytics')

test('tracks Product Added event on button click', () => { const { getByText } = render(<AddToCartButton product={mockProduct} />)

fireEvent.click(getByText('Add to Cart'))

expect(trackEvent).toHaveBeenCalledWith('Product Added', { product_id: 'prod_123', product_name: 'Premium Plan', price_usd: 29.99 }) })


---

## Quick Reference: Event Examples

### Authentication Events

// Sign Up track('User Signed Up', { signup_method: 'email', // 'google', 'github' referral_source: 'organic', utm_campaign: 'spring_promo' })

// Login track('User Logged In', { login_method: 'email', is_new_device: true, session_id: 'sess_abc123' })

// Logout track('User Logged Out', { session_duration_seconds: 1847, pages_viewed: 12 })


### Ecommerce Events

// Product View track('Product Viewed', { product_id: 'prod_123', product_name: 'Premium Subscription', product_category: 'subscriptions', price_usd: 29.99, referrer: 'search_results' })

// Add to Cart track('Product Added', { product_id: 'prod_123', product_name: 'Premium Subscription', price_usd: 29.99, quantity: 1, cart_value_usd: 29.99, cart_item_count: 1 })

// Purchase track('Order Completed', { order_id: 'order_789', revenue_usd: 29.99, tax_usd: 2.40, shipping_usd: 0, total_usd: 32.39, items: [ { product_id: 'prod_123', quantity: 1, price_usd: 29.99 } ], payment_method: 'stripe', coupon_code: 'SAVE20' })


### Feature Usage Events

// Feature Discovery track('Feature Discovered', { feature_name: 'advanced_filters', discovery_method: 'tooltip', days_since_signup: 3 })

// Feature Used track('Feature Used', { feature_name: 'advanced_filters', usage_count: 1, session_id: 'sess_abc123' })

// Feature Shared track('Feature Shared', { feature_name: 'report_builder', share_method: 'email', recipient_count: 3 })


---

## Resources

### Analytics Platform Documentation

- PostHog: [https://posthog.com/docs](https://posthog.com/docs)
- Mixpanel: [https://docs.mixpanel.com](https://docs.mixpanel.com)
- Google Analytics 4: [https://support.google.com/analytics](https://support.google.com/analytics)
- Amplitude: [https://amplitude.com/docs](https://amplitude.com/docs)

### Best Practices Guides

- Segment Data Collection: [https://segment.com/academy/collecting-data/](https://segment.com/academy/collecting-data/)
- Amplitude Data Taxonomy: [https://amplitude.com/docs/data/data-planning-playbook](https://amplitude.com/docs/data/data-planning-playbook)
- PostHog Event Tracking: [https://posthog.com/tutorials/event-tracking-guide](https://posthog.com/tutorials/event-tracking-guide)

---

## Conclusion

Effective product analytics requires:

1. **Clear event taxonomy** with consistent naming
2. **Strategic instrumentation** focused on critical user actions
3. **Robust data validation** to ensure quality
4. **Meaningful dashboards** that drive decisions
5. **Continuous iteration** based on insights

Follow this skill's guidelines to build analytics infrastructure that scales with your product and provides reliable insights for data-driven decisions.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

30.51%
按下载量换算31

windsurf

24.3%
按下载量换算25

OpenCode

18.11%
按下载量换算18

github-copilot

12.1%
按下载量换算12

Gemini CLI

8.22%
按下载量换算8

Cursor

3.41%
按下载量换算3

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills