Setup · PostHog

Connect PostHog to tasu

PostHog fills everything revenue tools can't see: onboarding drop-off, paywall reach, retention and your habit map. Two parts — connect the account, then install the events in your app.

Part 1 · 2 minutes

Connect your PostHog project to tasu

  1. 1
    Have a PostHog account.

    posthog.com — free up to 1M events/month, which covers most apps entirely.

  2. 2
    Create a personal API key.

    PostHog → Settings → User → Personal API keys → create one with the Query Read scope. It starts with phx_.

    This is different from the project key (phc_…) your app uses to send events — tasu needs the personal key, and only ever reads.

  3. 3
    Find your Project ID and region.

    Settings → Project → General shows the numeric Project ID. Your region is in the address bar: us.posthog.com or eu.posthog.com.

  4. 4
    Paste all three into tasu.

    tasu → your account (or the PostHog step in onboarding) → region, Project ID, key → Test connection. Green check = connected.

Part 2 · one prompt

Install the events in your app

tasu reads specific event names. You don't have to wire them by hand — paste this into your AI coding tool (Claude Code, Cursor, Windsurf) in your app's repo and it instruments everything: the SDK if missing, every onboarding screen, the funnel events, main-app screens and your core actions.

Instrument my mobile app with PostHog so every part of tasu works: the conversion funnel, screen-by-screen onboarding drop-off, main-app usage and retention. tasu reads these EXACT event names. Do not track prices, amounts or revenue — revenue comes from RevenueCat/Superwall, not analytics.

1. SDK. If PostHog isn't installed yet, add the official SDK for this project's platform (posthog-ios, posthog-android, posthog-react-native, or posthog-flutter) and initialize it once at app launch. Leave a clearly marked placeholder where I'll paste my PostHog project API key and host (US or EU).

2. Identity — this is what lets tasu join behavior to revenue. Call PostHog's identify with our internal user id as soon as it exists (after signup/login). If RevenueCat is in this codebase, use the SAME id you pass to RevenueCat as the app user ID, so the two datasets describe the same person.

3. Map the ENTIRE onboarding flow. Search the codebase and list, in order, every screen a brand-new user can see between first app open and reaching the main app. Do not skip any — include: splash/welcome, value or intro slides, every question/quiz/personalization step, name or goal inputs, notification permission, app-tracking-transparency permission, account creation or sign-in, loading/"building your plan" screens, the paywall, and any post-paywall screens (discount offer, rating request, tutorial). Give each screen a short, stable snake_case id, e.g. "welcome", "goal_question", "notifications_permission", "plan_loading", "paywall", "discount_offer".

4. Instrument EVERY screen from that list. The moment each screen becomes visible, capture:
   - Event name: "onboarding_screen_viewed" (exactly this, the same name on every screen)
   - Properties:
     - "screen_name" = the screen's stable id
     - "step" = its 1-based position actually shown in that session
     - "screen_type" = exactly one of: "value" | "question" | "input" | "permission" | "signup" | "loading" | "paywall" | "offer" | "other"
   Every screen fires it, no exceptions — this powers tasu's by-step AND by-type drop-off views.

5. Track these five funnel events with EXACTLY these names:
   - "app_opened" — every app launch and every return to the foreground.
   - "onboarding_completed" — the moment the user finishes the last onboarding screen and enters the main app.
   - "paywall_viewed" — every time a paywall becomes visible, with property "placement" = "onboarding" or "in_app". Fire it in addition to that screen's "onboarding_screen_viewed".
   - "trial_started" — when a free trial actually starts; hook the purchase success / RevenueCat customer-info callback, not the button tap.
   - "subscription_started" — when a paid subscription activates or a trial converts to paid (RevenueCat callback level if available). No price or amount properties needed.

6. Main-app usage — powers tasu's retention and habit views:
   - "screen_viewed" with property "screen_name" (stable snake_case id) every time a main-app screen or tab becomes visible AFTER onboarding. Cover every screen a user can reach.
   - The core repeat actions of this app — the 3 to 10 things users do again and again that make this app what it is (examples from other apps: "workout_logged", "entry_created", "lesson_completed") — each as its OWN event, snake_case, past tense. These are what tasu correlates with paying vs churned users to find the activation metric.

7. Attribution (unlocks tasu's Revenue-by-channel view): add one onboarding screen that asks new users how they found you (App Store, TikTok, Instagram, friend, etc.), and fire "attribution_selected" with property "channel" = their choice. Keep it a single tap.

8. Do not rename, remove, or duplicate existing analytics events — only add what's missing. If an equivalent event already exists under a different name, keep it AND add the tasu name alongside.

When you're done, output: (a) the ordered onboarding screen list with each screen's id, screen_type and file path, (b) the main-app screens and core action events you added, (c) every file you changed, and (d) exactly where I paste the PostHog API key.

What it sets up

Funnel (install → paid)
app_openedInstalls, D7 retention, active users.
paywall_viewedInstall → paywall, top of funnel.
trial_startedPaywall → trial conversion.
subscription_startedTrial → paid conversion.
onboarding_completedDrop-off before the paywall.
Onboarding, screen by screen
onboarding_screen_viewedFires on EVERY onboarding screen (screen_name, step, screen_type) — your step-by-step drop-off map.
Retention & the habit map
screen_viewedEvery main-app screen — retention + which screens paying users live in.
your core actionsThe 3–10 repeat actions that define your app — the activation-metric signal.
  1. 5
    Ship the update, let a day of data arrive.

    Events start flowing as users open the new build. One day is enough for the funnel to compute.

  2. 6
    Run a scan in tasu.

    The dashboard fills with your real onboarding drop-off, paywall reach and retention — and each still-locked module names exactly what it's waiting for.

That's the whole setup. Read-only queries, key stored encrypted, and your events also meter your plan's included volume (100K/mo).

Using Superwall? Its paywall and purchase events land in PostHog automatically once you enable the integration — see the Superwall guide.