| name | posthog-core-workflow-a |
| description | Implement PostHog product analytics: event capture, user identification,
group analytics, and property management using posthog-js and posthog-node.
Trigger: "posthog analytics", "capture events", "track users posthog",
"posthog identify", "posthog group analytics", "product analytics".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Grep |
| version | 1.12.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","posthog","workflow","analytics"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
PostHog Core Workflow A — Product Analytics
Overview
Primary PostHog workflow covering event capture, user identification, group analytics, and person properties. This is the foundation for all PostHog analytics: capturing what users do, linking events to identified users, and grouping users by company/team for B2B analytics.
Prerequisites
- Completed
posthog-install-auth setup
posthog-js (browser) and/or posthog-node (server) installed
- Project API key (
phc_...) configured
Instructions
Step 1: Define Event Taxonomy
export const EVENTS = {
USER_SIGNED_UP: 'user_signed_up',
USER_LOGGED_IN: 'user_logged_in',
USER_ONBOARDING_COMPLETED: 'user_onboarding_completed',
FEATURE_USED: 'feature_used',
ITEM_CREATED: 'item_created',
ITEM_UPDATED: 'item_updated',
ITEM_DELETED: 'item_deleted',
SEARCH_PERFORMED: 'search_performed',
EXPORT_COMPLETED: 'export_completed',
SUBSCRIPTION_STARTED: 'subscription_started',
SUBSCRIPTION_UPGRADED: 'subscription_upgraded',
SUBSCRIPTION_CANCELED: 'subscription_canceled',
PAYMENT_COMPLETED: 'payment_completed',
} ;
{
?: | | | ;
?: | | ;
?: ;
}