Document PostHog dart-define configuration

This commit is contained in:
Juan José Mata
2026-05-24 22:39:41 +02:00
parent 89f42497a9
commit 2c2e357d73
4 changed files with 50 additions and 0 deletions

View File

@@ -67,6 +67,20 @@ static String _baseUrl = 'http://localhost:3000';
static String _baseUrl = 'https://your-sure-server.com';
```
### 6. (Optional) Configure PostHog Session Recording
PostHog is configured with **compile-time** Dart defines (not `.env`):
```bash
flutter run \
--dart-define=POSTHOG_API_KEY=phc_your_project_key \
--dart-define=POSTHOG_HOST=https://us.i.posthog.com
```
- `POSTHOG_API_KEY` is required to enable PostHog.
- `POSTHOG_HOST` is optional and defaults to `https://us.i.posthog.com`.
- If `POSTHOG_API_KEY` is not passed, the app logs that PostHog is disabled and continues normally.
### 5. Run the App
```bash