adding-analytics

Add PostHog analytics to web apps with framework detection and SDK setup.

672|104|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/spencerpauly/awesome-cursor-skills --skill adding-analytics-spencerpauly
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: adding-analytics
Source: https://github.com/spencerpauly/awesome-cursor-skills/tree/main/resources/adding-analytics
Command: npx skills add https://github.com/spencerpauly/awesome-cursor-skills --skill adding-analytics-spencerpauly

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the guesswork of wiring PostHog into a web app, so you can capture reliable product analytics without reinventing instrumentation.

Core Features & Use Cases

  • Detects the app framework and chooses the right setup path for Next.js, React, Vue, Svelte, or plain HTML.
  • Installs and configures PostHog for page views, custom events, feature flags, and optional session replay.
  • Helps teams add analytics to sign-up flows, purchases, dashboards, and other product interactions while keeping API keys in environment variables.

Quick Start

Ask the agent to add PostHog analytics to this web app and wire up page views plus the key events you want to track.

Frequently Asked Questions about adding-analytics

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

FAQPage Schema
How do I add PostHog analytics to a Next.js app?

Adding PostHog analytics to a Next.js app involves framework detection, SDK installation, and configuring page views, custom events, and feature flags using environment variables.

Does PostHog session replay work with Vue and Svelte?

PostHog session replay works with Vue, Svelte, Next.js, React, and plain HTML projects by configuring the correct SDK and environment variables to enable session recording.

What's the best way to set up PostHog feature flags and custom event tracking?

Setting up PostHog feature flags and custom event tracking requires detecting your web framework, installing the appropriate client-side or backend SDK, and instrumenting product interactions securely.

Do I need to update CSP headers for PostHog event tracking?

Updating CSP headers for PostHog event tracking is often required to allow external script requests, and the setup checks your configuration to apply necessary CSP updates.

How do I track pageviews and sign-up flows with PostHog in a React application?

Tracking pageviews and sign-up flows with PostHog in a React application requires installing the correct SDK, configuring environment variables, and instrumenting custom events for your product interactions.