### PostHog Integration for TanStack Router
Works with
Initialize PostHogProvider in the root route to ensure global access to the analytics client across all child routes.
Track pageviews using TanStack Router navigation events and capture user actions directly within event handlers, avoiding useEffect.
Identify users during authentication and maintain session correlation by passing distinct IDs via headers in API requests.
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionintegration-react-tanstack-router-code-basedExecute the skills CLI command in your project's root directory to begin installation:
Fetches integration-react-tanstack-router-code-based from PostHog/skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate integration-react-tanstack-router-code-based. Access via /integration-react-tanstack-router-code-based in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
15
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
15
stars
| name | integration-react-tanstack-router-code-based |
| description | >- PostHog integration for React applications using TanStack Router with code-based routing |
| metadata | author: PostHog version: 1.9.4 |
This skill helps you add PostHog analytics to React with TanStack Router (code-based) applications.
Follow these steps in order to complete the integration:
basic-integration-1.0-begin.md - PostHog Setup - Begin ← Start herebasic-integration-1.1-edit.md - PostHog Setup - Editbasic-integration-1.2-revise.md - PostHog Setup - Revisebasic-integration-1.3-conclude.md - PostHog Setup - Conclusionreferences/EXAMPLE.md - React with TanStack Router (code-based) example project codereferences/tanstack-start.md - Tanstack start - docsreferences/identify-users.md - Identify users - docsreferences/basic-integration-1.0-begin.md - PostHog setup - beginreferences/basic-integration-1.1-edit.md - PostHog setup - editreferences/basic-integration-1.2-revise.md - PostHog setup - revisereferences/basic-integration-1.3-conclude.md - PostHog setup - conclusionThe example project shows the target implementation pattern. Consult the documentation for API details.
Identify users during login and signup events. Refer to the example code and documentation for the correct identify pattern for this framework. If both frontend and backend code exist, pass the client-side session and distinct ID using X-POSTHOG-DISTINCT-ID and X-POSTHOG-SESSION-ID headers to maintain correlation.
Add PostHog error tracking to relevant files, particularly around critical user flows and API boundaries.
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
PostHog/skills
PostHog/skills
PostHog/skills
PostHog/skills
PostHog/skills
PostHog/skills
integration-react-tanstack-router-code-based fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
Keeps context tight: integration-react-tanstack-router-code-based is the kind of skill you can hand to a new teammate without a long onboarding doc.
integration-react-tanstack-router-code-based reduced setup friction for our internal harness; good balance of opinion and flexibility.
integration-react-tanstack-router-code-based is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Solid pick for teams standardizing on skills: integration-react-tanstack-router-code-based is focused, and the summary matches what you get after install.
integration-react-tanstack-router-code-based has been reliable in day-to-day use. Documentation quality is above average for community skills.
I recommend integration-react-tanstack-router-code-based for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
Solid pick for teams standardizing on skills: integration-react-tanstack-router-code-based is focused, and the summary matches what you get after install.
Useful defaults in integration-react-tanstack-router-code-based — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
integration-react-tanstack-router-code-based has been reliable in day-to-day use. Documentation quality is above average for community skills.
showing 1-10 of 29