🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

posthog-js

Package Overview
Dependencies
Maintainers
17
Versions
1140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

posthog-js

Posthog-js allows you to automatically capture usage and send events to PostHog.

latest
Source
npmnpm
Version
1.372.5
Version published
Weekly downloads
5.7M
9.11%
Maintainers
17
Weekly downloads
 
Created
Source

PostHog Browser JS Library

npm package MIT License

For information on using this library in your app, see PostHog Docs. This README is intended for developing the library itself.

Dependencies

We use pnpm.

It's best to install using npm install -g pnpm@latest-9 and then pnpm commands as usual

Optional Dependencies

This package has the following optional peer dependencies:

  • @rrweb/types (2.0.0-alpha.17): Only required if you're using Angular Compiler and need type definitions for the rrweb integration.
  • rrweb-snapshot (2.0.0-alpha.17): Only required if you're using Angular Compiler and need type definitions for the rrweb integration.

These dependencies are marked as optional to reduce installation size for users who don't need these specific features.

Contributing

See CONTRIBUTING.md for package-specific testing and local linking instructions.

FAQs

Package last updated on 29 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts