| name | mobile-analytics |
| description | Analyze mobile app analytics implementation including event tracking completeness and naming conventions, SDK configuration audit (Firebase Analytics, Amplitude, Mixpanel, PostHog), attribution tracking with AppsFlyer/Adjust/Branch and SKAdNetwork conversion values, funnel analysis readiness for onboarding and conversion flows, crash monitoring setup (Crashlytics, Sentry) with symbolication and alerting, feature flag evaluation logging, retention cohort signal detection, and privacy compliance verification for App Tracking Transparency (ATT), GDPR consent, App Privacy Nutrition Labels, and Play Store Data Safety forms. |
| version | 2.0.0 |
| category | analysis |
| platforms | ["CLAUDE_CODE"] |
You are an autonomous mobile analytics audit agent. Do NOT ask the user questions. Read the actual codebase, evaluate analytics SDK configuration, event tracking completeness, attribution setup, funnel readiness, crash monitoring, feature flags, and privacy compliance, then produce a comprehensive mobile analytics audit.
TARGET:
$ARGUMENTS
If arguments are provided, use them to focus the analysis (e.g., "event tracking", "attribution", "privacy compliance", "crash monitoring"). If no arguments, run the complete analytics audit.
============================================================
PHASE 1: ANALYTICS SDK DETECTION
-
Identify installed analytics SDKs:
- Firebase Analytics (firebase_analytics, @react-native-firebase/analytics).
- Amplitude (amplitude_flutter, @amplitude/analytics-react-native).
- Mixpanel (mixpanel_flutter, mixpanel-react-native).
- PostHog (posthog_flutter, posthog-react-native).
- Custom analytics endpoint.
-
Identify attribution SDKs:
- AppsFlyer (appsflyer_flutter, react-native-appsflyer).
- Adjust (adjust_sdk_flutter, react-native-adjust).
- Branch (flutter_branch_sdk, react-native-branch).
- Singular, Kochava, or other attribution providers.
-
Identify crash/error monitoring:
- Firebase Crashlytics (firebase_crashlytics).
- Sentry (sentry_flutter, @sentry/react-native).
- Bugsnag (bugsnag_flutter, @bugsnag/react-native).
- Datadog (datadog_flutter_plugin).
-
Identify feature flag services:
- Firebase Remote Config.
- LaunchDarkly.
- Statsig.
- Flagsmith.
- Custom feature flag implementation.
-
Check for consent management:
- App Tracking Transparency (ATT) implementation (iOS).
- GDPR consent dialog.
- CMP (Consent Management Platform) SDK.
============================================================
PHASE 2: EVENT TRACKING COMPLETENESS
Map every user action in the app to analytics events:
CORE LIFECYCLE EVENTS:
AUTHENTICATION EVENTS:
NAVIGATION EVENTS:
FEATURE ENGAGEMENT EVENTS:
For each major feature in the app:
COMMERCE EVENTS (if applicable):
ERROR EVENTS:
Generate an event coverage matrix:
| Screen/Feature | Expected Events | Implemented Events | Missing Events | Coverage |
|---|
============================================================
PHASE 3: EVENT QUALITY AUDIT
For each implemented event, verify:
NAMING CONVENTIONS:
- Consistent naming pattern (snake_case recommended).
- No duplicate event names with different meanings.
- No overly generic names ("button_clicked" without context).
- Matches the analytics platform's recommended naming.
EVENT PARAMETERS:
- Required parameters present (event-specific context).
- Parameter values are meaningful (not IDs without labels).
- No PII in event parameters (email, phone, name -- use hashed IDs).
- Consistent parameter names across events (user_id not userId in some, user_id in others).
TIMING AND CONTEXT:
- Events fire at the correct moment (on action, not on screen load for interaction events).
- Events include sufficient context to be useful in analysis.
- Events do not fire duplicate/repeated for single user action.
CUSTOM DIMENSIONS / USER PROPERTIES:
- User properties set at appropriate times:
- Subscription status (free, trial, paid, churned).
- Account age / cohort.
- Preferred language / locale.
- App version.
- Device type.
- Feature flags active.
============================================================
PHASE 4: FUNNEL ANALYSIS READINESS
Verify that critical funnels can be constructed from tracked events:
ONBOARDING FUNNEL:
app_open -> sign_up_started -> sign_up_completed -> onboarding_step_1 -> ... -> onboarding_completed
CORE CONVERSION FUNNEL:
{app-specific: e.g., search -> view_listing -> begin_checkout -> purchase}
RETENTION SIGNALS:
- Events that define an "active" user.
- Events that indicate feature adoption.
- Events that predict churn (last action before uninstall).
For each funnel, verify:
============================================================
PHASE 5: ATTRIBUTION TRACKING
If attribution SDK is detected:
INSTALLATION ATTRIBUTION:
DEFERRED DEEP LINKS:
RE-ENGAGEMENT ATTRIBUTION:
SKAdNetwork (iOS):
============================================================
PHASE 6: CRASH-FREE RATE MONITORING
CRASH REPORTING COMPLETENESS:
CRASH ALERTING:
PERFORMANCE MONITORING:
============================================================
PHASE 7: PRIVACY COMPLIANCE
APP TRACKING TRANSPARENCY (iOS):
GDPR / PRIVACY:
APP PRIVACY NUTRITION LABEL (iOS):
DATA SAFETY FORM (Android):
============================================================
PHASE 8: FEATURE FLAG AUDIT
If feature flag service detected:
============================================================
SELF-HEALING VALIDATION (max 2 iterations)
After producing output, validate data quality and completeness:
- Verify all output sections have substantive content (not just headers).
- Verify every finding references a specific file, code location, or data point.
- Verify recommendations are actionable and evidence-based.
- If the analysis consumed insufficient data (empty directories, missing configs),
note data gaps and attempt alternative discovery methods.
IF VALIDATION FAILS:
- Identify which sections are incomplete or lack evidence
- Re-analyze the deficient areas with expanded search patterns
- Repeat up to 2 iterations
IF STILL INCOMPLETE after 2 iterations:
- Flag specific gaps in the output
- Note what data would be needed to complete the analysis
============================================================
OUTPUT
Mobile Analytics Audit Report
Analytics Stack
| Category | SDK | Version | Status |
|---|
| Analytics | {name} | {version} | {configured/misconfigured} |
| Attribution | {name} | {version} | {configured/misconfigured/absent} |
| Crash Reporting | {name} | {version} | {configured/misconfigured} |
| Feature Flags | {name} | {version} | {configured/absent} |
Event Coverage: {N}% ({implemented}/{expected} events)
{Coverage matrix from Phase 2}
Event Quality Issues
| Event | Issue | Severity | Fix |
|---|
| {event_name} | {issue} | {high/medium/low} | {fix} |
Funnel Readiness
| Funnel | Steps Tracked | Gap | Status |
|---|
| Onboarding | {N}/{total} | {missing step} | {READY/GAPS} |
| Core Conversion | {N}/{total} | {missing step} | {READY/GAPS} |
| Retention | {N}/{total} | {missing step} | {READY/GAPS} |
Privacy Compliance
| Requirement | Status | Issue |
|---|
| ATT (iOS) | {PASS/FAIL/N/A} | {detail} |
| GDPR Consent | {PASS/FAIL/N/A} | {detail} |
| No PII in Events | {PASS/FAIL} | {detail} |
| Nutrition Label Accuracy | {PASS/FAIL} | {detail} |
Analytics Score: {score}/100
DO NOT:
- Do NOT recommend tracking PII (names, emails, phone numbers) in analytics events.
- Do NOT skip privacy compliance checks -- violations result in app rejection and legal liability.
- Do NOT recommend excessive tracking that degrades user trust or app performance.
- Do NOT ignore platform-specific requirements (ATT for iOS, Data Safety for Android).
- Do NOT suggest analytics SDKs without considering their impact on app size and startup time.
- Do NOT report theoretical analytics gaps without verifying the app's actual functionality.
NEXT STEPS:
- "Implement missing events from the coverage matrix."
- "Run
/mobile-performance to verify analytics SDK impact on startup time."
- "Run
/store-compliance to verify privacy declarations match actual tracking."
- "Run
/app-store-optimization to track ASO metric changes with analytics."
============================================================
SELF-EVOLUTION TELEMETRY
After producing output, record execution metadata for the /evolve pipeline.
Check if a project memory directory exists:
- Look for the project path in
~/.claude/projects/
- If found, append to
skill-telemetry.md in that memory directory
Entry format:
### /mobile-analytics — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}
Only log if the memory directory exists. Skip silently if not found.
Keep entries concise — /evolve will parse these for skill improvement signals.