integration-javascript_web

Integrate PostHog analytics into JavaScript web apps with event capture.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/FrekiManagarm/dunlo --skill integration-javascript-web-frekimanagarm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: integration-javascript_web
Source: https://github.com/FrekiManagarm/dunlo/tree/main/.agents/skills/integration-javascript_web
Command: npx skills add https://github.com/FrekiManagarm/dunlo --skill integration-javascript-web-frekimanagarm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

PostHog integration turns product activity from your JavaScript web application into actionable analytics by guiding you through client-side event tracking and user identification.

Core Features & Use Cases

  • Add PostHog to JavaScript web (browser) apps: set up posthog-js so you can capture meaningful user actions.
  • Define an event tracking plan: select relevant business events (e.g., conversion, churn) and place them into specific files via a step-by-step workflow.
  • Identify users safely and correctly: link anonymous activity to known users during login/signup and reset on logout to avoid cross-user mixing.
  • Support error tracking: capture exceptions around critical user flows and API boundaries.
  • Privacy-first guidance: avoid sending PII in capture event properties and use identify person properties instead.

Quick Start

Use the integration workflow to instrument your app by starting with basic-integration-1.0-begin.md in this skill.

Frequently Asked Questions about integration-javascript_web

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

FAQPage Schema
How do I add PostHog analytics to a JavaScript web app?

To add PostHog analytics to a JavaScript web app, use a multi-phase workflow to instrument browser-safe event capture. You must call posthog.init() with environment variable tokens before invoking other SDK methods.

How do I identify users in PostHog without mixing anonymous activity?

Identify users safely in PostHog by linking anonymous activity during login or signup, then calling reset on logout. This prevents cross-user data mixing across different authentication states.

Can I use the posthog-js SDK in a Node.js server environment?

No, you cannot use posthog-js in Node or server-side contexts. This integration is designed exclusively for client-side JavaScript web applications and requires browser-safe instrumentation.

What is the best way to prevent PII from appearing in PostHog event tracking?

The best way to prevent PII in PostHog event tracking is to avoid sending personally identifiable information in capture event properties. Use identify person properties instead of putting sensitive data in event payloads.

How do I capture JavaScript exceptions for critical user flows in PostHog?

Capture JavaScript exceptions in PostHog by adding exception tracking around critical user flows and API boundaries. This is integrated into the end-to-end tracking plan workflow.

Do I need an event tracking plan before implementing PostHog in my web app?

Yes, defining an event tracking plan is part of the implementation process. The workflow helps select relevant business events like conversion or churn and places them into specific files for structured capture.