Analytics
PostHog
Learn how to use PostHog with supastarter.
To use PostHog with supastarter, first create a PostHog account and get your project key.
Then, add the API key to your .env.local
file and your deployment environment:
Next, we need to install the PostHog packages:
Finally, we need activate PostHog as the analytics provider. To do this, open apps/web/modules/analytics/index.tsx
and change the content to:
To customize the PostHog configuration, edit the apps/web/modules/analytics/provider/posthog/index.tsx
.
Note for EU users: You need to adjust the host url:
Learn more about analytics with PostHog in the official documentation.
For further instructions, follow the general analytics instructions.