Node.js product analytics installation
Run either npm or yarn in terminal to add it to your project:
In your app, set your project API key before making any calls.
Node.js
You can find your project API key and instance address in the project settings page in PostHog.
Note: As a rule of thumb, we do not recommend hardcoding API keys. Setting it as an environment variable is preferred.