Posthog is used for user analytics. It’s a powerful tool that allows you to get an in-depth understanding of your users, do A/B testing & more.

Set up PostHog

  1. Create a PostHog account or sign in.
  2. Create a new project
    • You’ll be given an API_KEY and a HOST. Add this to your .env file.
      .env
      #### PostHog Analytics
      NEXT_PUBLIC_POSTHOG_KEY=your_posthog_key
      NEXT_PUBLIC_POSTHOG_HOST=your_posthog_host
      

If you missed this, you can always find it by going to: Quick start -> Ingest events -> View SDK -> Next.js

Here’s a quick video guide to help you find it in PostHog analytics:

You’re ready to go!