log-posthog-issues
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/log-posthog-issues
/log-posthog-issues
Run , then create GitHub issues for all findings.
/check-posthog运行,然后为所有检测结果创建GitHub Issue。
/check-posthogWhat This Does
功能说明
- Run to identify issues
/check-posthog - Create one GitHub issue per finding
- Label and prioritize appropriately
- Link related issues together
- 运行/check-posthog以识别问题
- 为每个检测结果创建一个GitHub Issue
- 适当添加标签并划分优先级
- 关联相关Issue
Issue Template
Issue模板
bash
gh issue create \
--title "[PostHog] $TITLE" \
--label "posthog,priority/$PRIORITY" \
--body "$(cat <<'EOF'bash
gh issue create \
--title "[PostHog] $TITLE" \
--label "posthog,priority/$PRIORITY" \
--body "$(cat <<'EOF'Problem
问题描述
$DESCRIPTION
$DESCRIPTION
Impact
影响范围
$IMPACT
$IMPACT
Acceptance Criteria
验收标准
$CRITERIA
$CRITERIA
References
参考资料
- ~/.claude/skills/posthog/references/$REF
- PostHog docs: $DOC_LINK
Created by audit
EOF
)"
/log-posthog-issuesundefined- ~/.claude/skills/posthog/references/$REF
- PostHog文档: $DOC_LINK
由审计创建
EOF
)"
/log-posthog-issuesundefinedIssue Mapping
Issue映射
P0: SDK Not Initialized
P0: SDK未初始化
bash
gh issue create \
--title "[PostHog] SDK not initialized - no events being tracked" \
--label "posthog,priority/p0,bug" \
--body "$(cat <<'EOF'bash
gh issue create \
--title "[PostHog] SDK未初始化 - 无事件被追踪" \
--label "posthog,priority/p0,bug" \
--body "$(cat <<'EOF'Problem
问题描述
PostHog SDK is not initialized. No analytics events are being tracked.
PostHog SDK未初始化,没有分析事件被追踪。
Impact
影响范围
- Zero visibility into user behavior
- Cannot track conversions or feature usage
- Blind to product performance
- 完全无法了解用户行为
- 无法追踪转化或功能使用情况
- 对产品性能一无所知
Acceptance Criteria
验收标准
- called in PostHogProvider
initPostHog() - Provider wraps app in layout.tsx
- Events visible in PostHog Live Events
- returns true in console
posthog.__loaded
- 在PostHogProvider中调用
initPostHog() - Provider在layout.tsx中包裹应用
- 事件可在PostHog实时事件中查看
- 在控制台中返回true
posthog.__loaded
References
参考资料
- ~/.claude/skills/posthog/references/sdk-patterns.md
- https://posthog.com/docs/libraries/js EOF )"
undefined- ~/.claude/skills/posthog/references/sdk-patterns.md
- https://posthog.com/docs/libraries/js EOF )"
undefinedP1: No Reverse Proxy
P1: 无反向代理
bash
gh issue create \
--title "[PostHog] No reverse proxy - events blocked by ad blockers" \
--label "posthog,priority/p1,enhancement" \
--body "$(cat <<'EOF'bash
gh issue create \
--title "[PostHog] 无反向代理 - 事件被广告拦截器阻止" \
--label "posthog,priority/p1,enhancement" \
--body "$(cat <<'EOF'Problem
问题描述
PostHog requests go directly to posthog.com, which gets blocked by ad blockers.
PostHog请求直接发送至posthog.com,会被广告拦截器阻止。
Impact
影响范围
- ~20-30% of users have ad blockers
- Events from those users are lost
- Analytics data is incomplete
- 约20-30%的用户使用广告拦截器
- 这些用户的事件会丢失
- 分析数据不完整
Acceptance Criteria
验收标准
- next.config.js has rewrite rules for /ingest/*
- posthog.init uses api_host: '/ingest'
- Events work with ad blocker enabled
- next.config.js中配置/ingest/*的重写规则
- posthog.init使用api_host: '/ingest'
- 启用广告拦截器时事件仍可正常工作
References
参考资料
- ~/.claude/skills/posthog/references/sdk-patterns.md#reverse-proxy
- https://posthog.com/docs/libraries/js#proxy-mode EOF )"
undefined- ~/.claude/skills/posthog/references/sdk-patterns.md#reverse-proxy
- https://posthog.com/docs/libraries/js#proxy-mode EOF )"
undefinedP1: Privacy Masking Missing
P1: 缺失隐私掩码
bash
gh issue create \
--title "[PostHog] Privacy masking not configured - PII exposure risk" \
--label "posthog,priority/p1,security" \
--body "$(cat <<'EOF'bash
gh issue create \
--title "[PostHog] 未配置隐私掩码 - 存在PII泄露风险" \
--label "posthog,priority/p1,security" \
--body "$(cat <<'EOF'Problem
问题描述
PostHog privacy settings not configured. Text content and input values may be captured.
PostHog隐私设置未配置,可能会捕获文本内容和输入值。
Impact
影响范围
- Autocapture may leak PII
- Session recordings show actual input values
- GDPR/privacy compliance risk
- 自动捕获可能泄露PII(个人可识别信息)
- 会话录制会显示实际输入值
- 存在GDPR/隐私合规风险
Acceptance Criteria
验收标准
- mask_all_text: true in init config
- session_recording.maskAllInputs: true
- person_profiles: 'identified_only'
- Session replays show *** for inputs
- 在初始化配置中设置mask_all_text: true
- session_recording.maskAllInputs: true
- person_profiles: 'identified_only'
- 会话回放中输入内容显示为***
References
参考资料
- ~/.claude/skills/posthog/references/privacy-checklist.md
- https://posthog.com/docs/session-replay/privacy EOF )"
undefined- ~/.claude/skills/posthog/references/privacy-checklist.md
- https://posthog.com/docs/session-replay/privacy EOF )"
undefinedP2: No Standard Events
P2: 无标准事件
bash
gh issue create \
--title "[PostHog] No typed event schema - inconsistent tracking" \
--label "posthog,priority/p2,enhancement" \
--body "$(cat <<'EOF'bash
gh issue create \
--title "[PostHog] 无类型化事件 schema - 追踪不一致" \
--label "posthog,priority/p2,enhancement" \
--body "$(cat <<'EOF'Problem
问题描述
No typed event schema. Events tracked with arbitrary names and properties.
无类型化事件 schema,使用任意名称和属性追踪事件。
Impact
影响范围
- Inconsistent event names across codebase
- Hard to build reliable funnels
- Cross-product analytics not possible
- 代码库中事件名称不一致
- 难以构建可靠的转化漏斗
- 无法进行跨产品分析
Acceptance Criteria
验收标准
- StandardEvent type defined
- trackEvent function enforces types
- user_signed_up, subscription_started events tracked
- TypeScript errors on invalid event names
- 定义StandardEvent类型
- trackEvent函数强制执行类型
- 追踪user_signed_up、subscription_started事件
- 无效事件名称触发TypeScript错误
References
参考资料
- ~/.claude/skills/posthog/references/sdk-patterns.md#standard-events EOF )"
undefined- ~/.claude/skills/posthog/references/sdk-patterns.md#standard-events EOF )"
undefinedLabels
标签
Ensure these labels exist:
bash
gh label create posthog --color 1C4068 --description "PostHog analytics" 2>/dev/null || true
gh label create priority/p0 --color B60205 --description "Critical" 2>/dev/null || true
gh label create priority/p1 --color D93F0B --description "High" 2>/dev/null || true
gh label create priority/p2 --color FBCA04 --description "Medium" 2>/dev/null || true
gh label create priority/p3 --color 0E8A16 --description "Low" 2>/dev/null || true确保以下标签已存在:
bash
gh label create posthog --color 1C4068 --description "PostHog分析" 2>/dev/null || true
gh label create priority/p0 --color B60205 --description "Critical" 2>/dev/null || true
gh label create priority/p1 --color D93F0B --description "High" 2>/dev/null || true
gh label create priority/p2 --color FBCA04 --description "Medium" 2>/dev/null || true
gh label create priority/p3 --color 0E8A16 --description "Low" 2>/dev/null || trueOutput
输出
Report:
- Number of issues created
- Links to each issue
- Priority distribution
报告内容:
- 创建的Issue数量
- 每个Issue的链接
- 优先级分布
Related
相关命令
- - Audit only (no issues)
/check-posthog - - Fix issues directly
/fix-posthog - - Full lifecycle workflow
/posthog
- - 仅审计(不创建Issue)
/check-posthog - - 直接修复问题
/fix-posthog - - 全生命周期工作流
/posthog