# PostHog
URL: /docs/features/analytics/posthog
Learn how to add PostHog analytics to your project.
You can choose to skip these instructions if you are not interested in using PostHog.
## Setup
[PostHog](https://posthog.com/) is a developer-centric product and web analytics platform including many features that can be useful to understand your users and their behavior.
To get started, you will need to create an account on [PostHog](https://posthog.com/) and create a new organization.
Once you have created your organization, select "Web Analytics" as the feature you want to use.
The templates are currently only using Web Analytics, but you can use PostHog for other features such as event tracking, feature flags, and more if you need them.
Then, click on the "Copy API key" button at the top of the page and save these values to a separate file:
```txt title="env.txt"
NEXT_PUBLIC_POSTHOG_KEY="your-api-key-here"
NEXT_PUBLIC_POSTHOG_HOST="https://us.i.posthog.com"
```
You do not need to use these environment variables in your local development environment. They are only used in your production environment.
When you are ready to deploy your project, you can add these values to your environment variables in your hosting provider.