PostHog documentation

Last updated:

These Docs explain how to deploy, use, and contribute to PostHog.


We believe the era of third-party product analytics software will eventually come to end.

In our view, third-party analytics doesn't work anymore in a world of cookie laws, GDPR, CCPA, and many other four-letter acronyms. There should be an alternative to sending all of your customers' personal information and usage data to third-parties like Google.

PostHog gives you full control over all the data from your users, while allowing you to do powerful analytics.

We have seen multiple larger companies who cannot send their data to third-party tracking services for cost or privacy reasons. As a result, they end up with a complex data pipeline into a data lake with an analytics platform on top. Data analysts end up being the only people who understand it.

PostHog solves that. We let every person in the company have easy access to product analytics that they can understand and use independently, even at a massive scale, all without sending data to third-parties.

Documentation structure


There are 2 ways of using PostHog:

  • PostHog Cloud
  • Self-Hosted

Do you want to get started quickly without having to deploy PostHog yourself?

Start using PostHog Cloud for free.

Do you want to self-host PostHog?

Check out our deployment page.

Capturing events with PostHog

You can capture events and send data to PostHog in 3 different ways:


Using our HTML snippet is the quickest way to get started if you're using PostHog to track a website.

You can also start trying PostHog with no code using our bookmarklet.


We provide 15+ libraries for various popular programming languages and tools that you can use to send data to PostHog.


You can use our API to get data in and out of PostHog, making it suitable for any use case you have that is not met by our integrations.


Our tutorials can help you learn how to use PostHog's many features with in-depth walkthroughs.

Doing analytics with PostHog

Integrating PostHog with other tools


Integrations holds the Docs for all available PostHog libraries, including those maintained by our core team and the community.

We have PostHog libraries written in all major programming languages, as well as integrations available with services like Segment, Slack, and Sentry.


Plugins are a Beta feature that lets you extend PostHog's functionality, allowing you to enrich your event data, send events to other services, as well as prevent event ingestion.

If there's something you need in PostHog that we haven't built yet, you can request it on GitHub, or build a plugin for it yourself.

Contributing to PostHog

We love all contributions to PostHog, big or small.

Check out our contributing docs for information on how to contribute, as well as info about how to run a local environment, what our stack is, and how the project is structured.

Platform structure

Platform structure hosts information on configuration valid for both cloud and self-hosted instances.