omnibus-instrument-product-analytics

Instrument PostHog analytics events across web, mobile, and API codebases.

58|5|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/PostHog/skills --skill omnibus-instrument-product-analytics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: omnibus-instrument-product-analytics
Source: https://github.com/PostHog/skills/tree/main/skills/posthog/integration/skills/all
Command: npx skills add https://github.com/PostHog/skills --skill omnibus-instrument-product-analytics

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill helps teams capture meaningful product actions by instrumenting analytics events with PostHog across web, mobile, and backend codebases, enabling deeper insights into user behavior.

Core Features & Use Cases

  • SDK initialization: Set up the PostHog SDK for the detected platform with environment-based keys.
  • Event capture: Add posthog.capture calls around meaningful user actions to quantify adoption and feature usage.
  • Error tracking & identification: Integrate identify() and capture_exception paths to connect errors with users and sessions.

Quick Start

Install the skill in your project and begin instrumenting analytics with PostHog following the workflow described above.

Frequently Asked Questions about omnibus-instrument-product-analytics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I instrument product analytics events with PostHog across my codebase?

Capturing meaningful user actions requires adding posthog.capture calls around key events in your code. This quantifies feature adoption and enables deeper insights into user behavior across web, mobile, and backend applications during development and rollouts.

Can I use PostHog SDK initialization for both web and mobile platforms?

Yes, PostHog SDK initialization supports web, mobile, and API platforms by loading the detected platform's SDK and configuring it with environment-based keys to capture product analytics events across your codebase.

What's the best way to track errors and connect them to user sessions in PostHog?

Integrate identify() and capture_exception paths to track errors and connect them with users and sessions. This ensures meaningful product actions and exceptions are linked for deeper insights into user behavior across your applications.

Does PostHog event capture work for backend API projects?

Yes, PostHog event capture is widely applicable to backend API projects. You can load the SDK, initialize it with environment-based keys, and implement event capture to understand user actions across your API codebase.

When do I need to configure environment-based keys for PostHog analytics?

You need to configure environment-based keys during SDK initialization to separate development and production contexts. This setup is required before implementing event capture, user identification, and error tracking across your codebase.

Why should I add analytics instrumentation during feature development and PR reviews?

Adding analytics instrumentation during feature development and PR reviews ensures meaningful user actions are tracked immediately. This enables deeper insights into feature adoption and user behavior during production rollouts across web, mobile, and API projects.