PostHog Mobile Analytics Tracker
Track screen views, in-app events, and user engagement across your mobile app with PostHog. Get full visibility into how users navigate and interact with your product.
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/week
Difficulty
Medium
Tools
1 connected
How it works
Track Screen Views
Record every screen transition with names, paths, and navigation context for session flow analysis
Capture In-App Events
Send events for taps, swipes, purchases, and feature usage with full device context
Identify Mobile Users
Associate devices with users and set properties like subscription tier, OS version, and app version
Map Session Flows
Visualize how users navigate through your app and identify the most common paths
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/Track Screen ViewName it "PostHog/Track Screen View" and call it with @PostHog/Track Screen View to record mobile screen views as users navigate through your app, @PostHog/Capture EventName it "PostHog/Capture Event" and call it with @PostHog/Capture Event to capture in-app engagement events like taps, swipes, form submissions, and feature usage, and @PostHog/Identify UserName it "PostHog/Identify User" and call it with @PostHog/Identify User to identify mobile users with their properties. This builds a complete mobile analytics setup in PostHog that shows how users move through your app and which features drive engagement.
Input
The user provides:
- Screen names and paths to track (e.g., "Home Screen", "Profile Settings", "Checkout")
- In-app events to capture (e.g., "button_tapped", "item_added_to_cart", "search_performed")
- User identifier and properties (e.g., user ID, device type, app version)
- Optional: engagement metrics to focus on (session length, feature adoption, retention signals)
Example: "Track mobile analytics for our fitness app: screen views for Home, Workout, Progress, and Profile screens. Capture workout_started, exercise_completed, and streak_achieved events. Identify the user with their subscription tier and device info."
Context
Screen View Tracking
- Use @PostHog/Track Screen ViewName it "PostHog/Track Screen View" and call it with @PostHog/Track Screen View for each screen the user visits
- Include properties with each screen view:
- Screen name (human-readable, e.g., "Workout Detail")
- Screen path or route (e.g., "/workout/detail")
- Previous screen (for navigation flow analysis)
- App section or tab (e.g., "training", "social", "profile")
- Track screens in the order users navigate to build session flow visibility
- Note time spent context where available
In-App Event Capture
- Use @PostHog/Capture EventName it "PostHog/Capture Event" and call it with @PostHog/Capture Event for meaningful user interactions:
- Core actions: feature used, item created, content viewed
- Engagement signals: share, save, favorite, comment
- Commerce events: add to cart, purchase, subscription change
- Error events: crash, timeout, failed action
- Include contextual properties:
- Screen where the action occurred
- Content or feature identifier
- User state (logged in, trial, premium)
- Device context (OS version, app version, device model)
- Use consistent naming: "object_action" format (e.g., "workout_started", "photo_uploaded")
Mobile User Identification
- Use @PostHog/Identify UserName it "PostHog/Identify User" and call it with @PostHog/Identify User to associate the device with a known user
- Set mobile-specific properties:
- Device type (iOS/Android), OS version, app version
- Subscription tier, account type
- Push notification status (enabled/disabled)
- First app open date, total sessions
- Update properties when they change (e.g., app update, plan change)
Engagement Analysis
After tracking is set up:
- Summarize the screen flow recorded
- List all events captured with their properties
- Identify which screens and features show the most engagement
- Flag any gaps in tracking coverage
Output
Mobile Analytics Setup Summary:
User Identified:
- Distinct ID: [user_id]
- Device: [device_type] / [os_version]
- App version: [version]
- Properties set: [list]
Screen Views Tracked: | Screen | Path | Properties | Status | |--------|------|-----------|--------| | [Screen Name] | [/path] | [key props] | Tracked |
In-App Events Captured: | Event | Screen Context | Properties | Status | |-------|---------------|-----------|--------| | [event_name] | [screen] | [key props] | Sent |
Session Flow: [Screen 1] -> [Screen 2] -> [Screen 3] -> ...
Coverage Summary:
- Screens tracked: [count]
- Events captured: [count]
- User properties set: [count]
- Ready to analyze in PostHog mobile analytics
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