PostHog Funnel Tracking Agent
Track every step of your conversion funnel in PostHog. See where users drop off, capture conversion events at each stage, and tag users who make it through.
The Challenge
You know users are dropping off somewhere between your landing page and signup, but pinpointing where requires setting up page view tracking, conversion events, and user identification across every stage. Without a structured funnel in PostHog, you are left guessing which page loses the most visitors and which traffic sources actually produce conversions. Building this manually means touching code at every funnel step and hoping you did not miss one.
What This Prompt Does
Track Funnel Pages
Record page views at each stage of the funnel with URLs, titles, and traffic source data
Capture Conversions
Send conversion events when users complete actions at each stage with full metadata
Identify Converters
Tag users who convert with properties like plan selected, conversion date, and traffic source
Surface Drop-offs
Summarize where users abandon the funnel and recommend optimizations
The Prompt
The Prompt
Task
Use @PostHog/Track Page ViewName it "PostHog/Track Page View" and call it with @PostHog/Track Page View to record page views at each stage of a conversion funnel, @PostHog/Capture EventName it "PostHog/Capture Event" and call it with @PostHog/Capture Event to capture conversion events when users complete key actions at each stage, and @PostHog/Identify UserName it "PostHog/Identify User" and call it with @PostHog/Identify User to tag users who reach conversion milestones with properties like "converted", "funnel_stage", and "conversion_date". This builds a complete funnel tracking setup in PostHog that shows where users drop off and who converts.
Input
The user provides:
- The funnel stages with their corresponding page URLs (e.g., landing page -> pricing -> signup -> onboarding)
- Conversion events to capture at each stage (e.g., "pricing_viewed", "signup_started", "signup_completed")
- User identifiers for users moving through the funnel
- Optional: UTM parameters or traffic source context
Example: "Track our signup funnel: landing page at /home, pricing page at /pricing, signup form at /signup, and welcome page at /welcome. Capture conversion events at each step for user maria@startupName it "startup" and call it with @startup.io who came from a Google ad."
Context
Funnel Stage 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 sequence
- Include properties with each page view:
- Page URL and title
- Funnel stage name and position (e.g., stage 1 of 4)
- Traffic source and UTM parameters
- Referrer URL
- Track pages in the order users encounter them to build an accurate funnel
Conversion Event Capture
- Use @PostHog/Capture EventName it "PostHog/Capture Event" and call it with @PostHog/Capture Event at each funnel transition:
- "funnel_stage_entered" when a user arrives at a new stage
- "funnel_stage_completed" when they take the conversion action
- Stage-specific events like "pricing_page_viewed", "signup_form_submitted"
- Include conversion metadata:
- Time spent on previous stage
- Entry source (direct, referral, ad)
- Any selections made (plan chosen, features selected)
- Capture drop-off signals:
- "funnel_abandoned" if a user leaves without completing the current stage
- Last stage reached before abandonment
User Identification at Conversion
- Use @PostHog/Identify User whenName it "PostHog/Identify User when" and call it with @PostHog/Identify User when a user converts or reaches a significant milestone
- Set conversion-related properties:
- funnel_completed: true/false
- conversion_date: timestamp
- funnel_entry_source: traffic source
- plan_selected: chosen plan (if applicable)
- time_to_convert: duration from first page view to conversion
- Update user segment based on funnel behavior (e.g., "qualified_lead", "converted_user")
Funnel Analysis Setup
After tracking all stages:
- Summarize drop-off rates between stages
- Identify which stage has the highest abandonment
- Note any patterns in user properties at conversion vs drop-off
- Recommend funnel optimizations based on the data
Output
Funnel Tracking Summary:
Funnel Definition: | Stage | Page | Conversion Event | Status | |-------|------|-----------------|--------| | 1. [Stage Name] | [URL] | [event_name] | Tracked | | 2. [Stage Name] | [URL] | [event_name] | Tracked | | 3. [Stage Name] | [URL] | [event_name] | Tracked | | 4. [Stage Name] | [URL] | [event_name] | Tracked |
Page Views Recorded:
- [URL 1]: tracked with [properties]
- [URL 2]: tracked with [properties]
Conversion Events Captured: | Event | Stage | Properties | Status | |-------|-------|-----------|--------| | [event] | [stage] | [key props] | Sent |
User Identified:
- User: [distinct_id]
- Conversion status: [converted/in_progress/abandoned]
- Properties updated: [list]
Funnel Insights:
- Total stages tracked: [count]
- Conversion path: [stage 1] -> [stage 2] -> ... -> [final stage]
- Ready to build funnel visualization in PostHog
Example Usage
Try asking:
- →"Track our signup funnel in PostHog: /home -> /pricing -> /signup -> /welcome for user maria@startup.io from a Google ad campaign"
- →"Set up funnel tracking for our e-commerce checkout: product page, cart, checkout, and order confirmation with conversion events at each step"
- →"Build a trial-to-paid conversion funnel in PostHog: track /trial-signup, /onboarding, /first-project, and /upgrade pages with user identification"