PostHog Laravel Integration
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
Time estimate: 15-45 minutes depending on use case complexity
Prerequisites
Submit your Claude Code skill and start earning
epx add PostHog/skills --skill integration-laravelCompatible with
Supported agents
Centralize analytics logic by creating a dedicated PostHogService class instead of scattering capture calls across controllers.
Configure settings in config/posthog.php using environment variables and initialize the SDK once using PostHog::init().
Identify users during authentication and maintain session correlation by passing distinct IDs via custom request headers.
| name | integration-laravel |
| description | PostHog integration for Laravel applications |
| metadata | author: PostHog version: 1.9.4 |
This skill helps you add PostHog analytics to Laravel 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 - Laravel example project codereferences/laravel.md - Laravel - 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.
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionintegration-laravelExecute the skills CLI command in your project's root directory to begin installation:
epx add PostHog/skills --skill integration-laravelFetches integration-laravel 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:
.cursor/skills/integration-laravel
Restart Cursor to activate integration-laravel. Access via /integration-laravelin your agent's command palette.
Learn more:View source on GitHubSkills CLI docsAbout CursorWhat are agent skills?
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.
error-tracking-go
PostHog/skills · PostHog · same repo
logs-nextjs
PostHog/skills · PostHog · same repo
feature-flags-java
PostHog/skills · PostHog · same repo
integration-fastapi
PostHog/skills · PostHog · same repo
feature-flags-go
PostHog/skills · PostHog · same repo
integration-react-react-router-6
PostHog/skills · PostHog · same repo
integration-laravel is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
integration-laravel fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
I recommend integration-laravel for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
We added integration-laravel from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
Solid pick for teams standardizing on skills: integration-laravel is focused, and the summary matches what you get after install.
We added integration-laravel from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
Keeps context tight: integration-laravel is the kind of skill you can hand to a new teammate without a long onboarding doc.
Registry listing for integration-laravel matched our evaluation — installs cleanly and behaves as described in the markdown.
Useful defaults in integration-laravel — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
integration-laravel has been reliable in day-to-day use. Documentation quality is above average for community skills.
showing 1-10 of 57