integration-tanstack-start

Install and configure PostHog analytics for TanStack Start apps.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

PostHog analytics integration for TanStack Start apps enables seamless client and server-side tracking, user identification, and error monitoring within TanStack Start projects.

Core Features & Use Cases

  • Client-side PostHogProvider integration and TanStack Router wiring following TanStack Start patterns.
  • Server-side tracking via posthog-node in API routes and backend helpers to ensure tamper-resistant analytics.
  • User identification after login to correlate frontend actions with backend events and build cohesive analytics across sessions.

Quick Start

Follow the workflow from the SKILL.md to set up PostHog in a TanStack Start app, add client and server tracking, and verify events.

Frequently Asked Questions about integration-tanstack-start

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

FAQPage Schema
How do I integrate PostHog analytics into a TanStack Start app?

Integrate PostHog by configuring the PostHogProvider for client-side tracking and using posthog-node within API routes for server-side event capture.

Does PostHog support server-side event capture in TanStack Start?

Yes, PostHog supports server-side event capture in TanStack Start by using the posthog-node package within API routes to record tamper-resistant backend analytics.

How do I identify users in PostHog after login with TanStack Router?

Identify users in PostHog after login by leveraging TanStack Router hooks to correlate frontend actions with backend events and build cohesive analytics across sessions.

What dependencies are required for PostHog analytics in TanStack Start?

PostHog analytics in TanStack Start requires the @posthog/react package for client-side integration and the posthog-node package for server-side tracking.

Why use a PostHogProvider singleton pattern for server-side tracking?

The PostHogProvider singleton pattern ensures consistent server-side tracking across TanStack Start API routes, preventing duplicate client instances and maintaining reliable event capture.

Can I track both client and server-side events with PostHog in TanStack Start?

Yes, you can track both client and server-side events with PostHog in TanStack Start by wiring TanStack Router hooks for actions and posthog-node for backend API routes.