PostHog Event Tracking Setup
Set up comprehensive event tracking in PostHog without writing code. Capture user actions, identify users with properties, and track page views across your entire funnel.
Free to start
1,000 credits included
No credit card required
Try this agent Book a demoSetup in 10 min · Cancel anytime
Setup time
~10 min
Time saved
2-3 hrs/setup
Difficulty
Medium
Tools
1 connected
How it works
Identify Users
Set user properties like email, plan, and company so every event ties back to a real person
Capture Custom Events
Send events for signups, purchases, and feature usage with structured properties
Track Page Views
Record page views across your funnel with URLs, titles, and referrer data
Verify Setup
Get a complete summary of everything tracked so you can confirm it in the PostHog dashboard
Try asking
View the agent prompt
See the full instructions this agent runs on — copy, edit, or customize it
ExpandCollapse
View the agent prompt
See the full instructions this agent runs on — copy, edit, or customize it
The Prompt
Task
Use @PostHog/Capture EventName it "PostHog/Capture Event" and call it with @PostHog/Capture Event to send custom events for key user actions (signups, purchases, feature usage), @PostHog/Identify UserName it "PostHog/Identify User" and call it with @PostHog/Identify User to set user properties like email, plan, and company, and @PostHog/Track Page ViewName it "PostHog/Track Page View" and call it with @PostHog/Track Page View to record page views across the conversion funnel. This sets up a complete event tracking foundation in PostHog for any product or website.
Input
The user provides:
- A list of key user actions to track (e.g., "signup", "purchase", "feature_activated")
- User properties to set during identification (e.g., email, plan tier, company name)
- Page URLs or routes to track views for (e.g., "/pricing", "/signup", "/dashboard")
- A distinct user ID or email to associate events with
Example: "Set up tracking for our SaaS onboarding funnel: track page views on /pricing, /signup, and /welcome, capture signup_completed and first_project_created events, and identify the user with their email and plan tier."
Context
User Identification
- Use @PostHog/Identify UserName it "PostHog/Identify User" and call it with @PostHog/Identify User to set the user's distinct ID and properties
- Include properties like email, name, plan, company, signup date
- This should happen first so all subsequent events are associated with the identified user
- Update properties whenever they change (e.g., plan upgrade, new company name)
Event Capture
- Use @PostHog/Capture EventName it "PostHog/Capture Event" and call it with @PostHog/Capture Event for each key user action
- Include relevant properties with each event:
- For signups: signup method, referral source, plan selected
- For purchases: amount, currency, product, payment method
- For feature usage: feature name, usage count, context
- Use consistent event naming conventions (snake_case recommended)
- Include timestamps and session context where available
Page View Tracking
- Use @PostHog/Track Page ViewName it "PostHog/Track Page View" and call it with @PostHog/Track Page View for each page in the funnel
- Include the full URL, page title, and any relevant UTM parameters
- Track views in sequence to build funnel visibility
- Include referrer information when available
Verification
After setting up tracking:
- Confirm each event was captured successfully
- Verify user properties were set correctly
- Check that page views are recording with the right URLs
- Summarize the complete tracking plan that was implemented
Output
Tracking Setup Summary:
User Identified:
- Distinct ID: [user_id]
- Properties set: [list of properties with values]
Events Captured: | Event Name | Properties | Status | |------------|-----------|--------| | [event_name] | [key properties] | Sent |
Page Views Tracked: | Page | URL | Title | Status | |------|-----|-------|--------| | [page_name] | [url] | [title] | Tracked |
Next Steps:
- Verify events appear in PostHog dashboard within 1-2 minutes
- Set up funnels in PostHog using the captured events
- Create cohorts based on user properties for segmentation
WHAT ARE YOU WAITING FOR?
Ready to build?
Stop duct-taping tools.
Stop writing playbooks no one follows.
Start building agents that actually do the work—and do it well.
Cotera: For people who think busywork is boring.
"This is the best product ever when it comes to shipping. Ten on ten recommended. I just can't wait to see what happens with this product."
Rebecca Blount
Director, Customer Success