Connect PostHog to your Goodspeed app
Product analytics, session recording, and feature flags, all GDPR-compliant and consent-gated from day one. Goodspeed wires PostHog into every app that needs it at generation time, so you start with a working integration, not a blank config and a documentation tab.
WHAT GETS WIRED IN
Built into every PostHog build
Every app Goodspeed generates with PostHog includes these wired integrations from the first build. No manual setup required.
| Item | Description | Strength |
|---|---|---|
| No client until consent | The analytics client is created on first use and only once consent is granted, which is what makes an opt-out posture real rather than declared. | Analytics |
| Identified on login and signup | identifyPostHogUser() attaches optional traits, including subscription tier. | Analytics |
| Identity cleared on logout | resetPostHogUser() runs on sign-out, so the next person on that device is not counted as the last one. | Analytics |
| One event helper everywhere | captureEvent() is wired through the auth, purchase, navigation and error paths rather than re-implemented per screen. | Analytics |
| Session recording | Switched on through the $session_recording_enabled property when it is enabled in gas.config.ts. | Analytics |
| Feature flags and A/B tests | The useFeatureFlag hook reads flags, so a screen variant can be split-tested without shipping a new release. | Analytics |
Source: the Goodspeed app foundation · analytics/feature-flags
REAL GENERATED CODE
A snippet from a PostHog integration the pipeline ships
This pattern is lifted from the engineered plumbing that ships inside every Goodspeed app. The studio generates PostHog integration code like this for every app that includes it, not a placeholder you have to fill in yourself.
Consent-aware init
// lib/posthog.ts let _posthog: PostHog | null = null; export async function getPostHog(): Promise<PostHog | null> { if (_posthog) return _posthog; const granted = await checkAnalyticsConsent(); if (!granted) return null; if (!apiKey) return null; _posthog = new PostHog(apiKey, { host, persistence: 'memory', bootstrap: { distinctId: await getAnonymousId() }, }); return _posthog; }
Today's log
APPS THAT USE POSTHOG
Where this integration ships
These app types include PostHog as part of the generated stack. Each link goes to a full spec page with capabilities, scored ideas, and a pipeline walkthrough.
- Build a social appBuilding a social app from scratch means solving hard infrastructure problems: real-time feeds, fan-out writes, notification delivery, and content moderation hooks. Goodspeed generates a complete sociSOCIAL APP
- Build a fitness tracker appBuilding a fitness tracker means wiring together daily logging, progress charts, Apple Health, and push reminders. Goodspeed generates all of that in a single build, not a patchwork of tutorials. The FITNESS TRACKER APP
- Build a productivity appProductivity apps succeed when they remove friction from the moment the user decides to work. Goodspeed generates a productivity app with Pomodoro timer, focused task queue, distraction blocker hooks,PRODUCTIVITY APP