🦔 PostHog is developer-friendly, open-source product analytics.


PostHog provides open-source product analytics, built for developers. Automate the collection of every event on your website or app, with no need to send data to 3rd parties. With just 1 click you can deploy on your own infrastructure, having full API/SQL access to the underlying data.



Quick Start

1-click Heroku deploy:



Make the Most of PostHog

See PostHog Docs for in-depth walk-throughs on functionality.

PostHog dashboard screenshot

Join our PostHog Users Slack community if you need help, want to chat, or are thinking of a new feature. We're here to help - and to make PostHog even better.



Features

  • Event-based analytics at a user level - capture your product's usage data to see which users are doing what in your application.
  • Product data visualizations: graphs, funnels, user cohorts, user paths, retention tables, and dashboards.
  • Complete control over your data - host it yourself.
  • Session recording to watch videos of your user behavior, with fine-grained privacy controls.
  • Automatically capture clicks and pageviews to analyze what your users are doing without pushing events manually
  • Feature flags to understand the impact of new features before rolling them out more widely
  • Heatmaps with the PostHog Toolbar.
  • Plugins to integrate your product usage data with other systems, like your CRM, or data lakes.
  • Ready-made libraries for JS, Python, Ruby, Node, Go, Android, iOS, PHP, Flutter, React Native, Elixir + API for anything else.
  • Super easy deploy using Docker or Heroku.



Event Autocapture



Philosophy

Many engineers find it painful to work out how their products are being used. This makes design decisions tough. PostHog solves that.

In our view, third-party analytics does not 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 anyone to do powerful analytics.

This means you can know who is using your app, how they're using it, and where you lose users, among many other things.



What's Cool About This?

PostHog is the only product-focused open-source analytics library, with an event and user-driven architecture. That means tracking identifiable (where applicable) user behavior, and creating user profiles. We are an open-source alternative to products such as Mixpanel, Amplitude, or Heap, that's designed to be more developer-friendly than them, with a broader range of features like session recording, heatmaps, feature flags and plugins.

There are a few session-based open-source libraries that are nice alternatives to Google Analytics. That's not what we are focused on.



PostHog Cloud

You can sign up for a free account on our hosted platform.



Deployment Options

Our suggested method for quick deployment is Heroku's one-click option:

Deploy

However, PostHog can be deployed anywhere you want! Here are step-by-step tutorials we've written for deployment options using all the major cloud providers:



Production Deployment

See our Docs for production deployment options.



Developing Locally

See our Docs for instructions on developing locally.



Contributing

We <3 contributions big or small. See our Docs for a guide on how to get started..

Not sure where to start? Book a free, no-pressure pairing session with one of our core contributors.



We're hiring!

Come help us make PostHog even better. We're growing fast, and would love for you to join us.



Open-Source vs. Paid

This repo is entirely MIT licensed, with the exception of the ee directory (if applicable). Need absolutely 💯 % FOSS? Check out our posthog-foss repository, which is purged of all proprietary code and features.

Premium features (contained in the ee directory) require a PostHog license. Contact us at [email protected] for more information.



Contributors 🦸

Owner
PostHog
Open source product analytics platform
PostHog
Comments
  • Improved funnel visualisation

    Improved funnel visualisation

    Is your feature request related to a problem?

    Better Visualisation of Funnels

    Describe the solution you'd like

    • Show relative percentage at each stage
    • Show gradual decrease in numbers focusing highest attrition

    Screenshot at May 28 08-23-55

    Thanks, @rajatkb for the suggestion!

    Thank you for your feature request – we love each and every one!

  • Quantitative analysis - Diagnosing Causes

    Quantitative analysis - Diagnosing Causes

    Opening this issue to start the discussion around quantitative analysis (Step 2) for the conversion optimization process (more context on https://github.com/PostHog/product-internal/issues/127#issuecomment-896231144).

    @macobo I think you'd be interested in being actively involved in working out the solution for this? Would be great to also have an engineer from Core Experience Team actively involved too (@liyiy @alexkim205). @clarkus too.

    How do you want to start work on this? I'm thinking we could start a discussion from first principles and some research/benchmarking. Probably easier to start this in a Google doc instead to have more fluidity?

  • Paths Upcoming features

    Paths Upcoming features

    Here's a list of features to consider that will be implemented early next week:

    • Paths based on user dropoff in funnel (https://github.com/PostHog/posthog/pull/5699)
    • Flexible # of steps view (be able to see more or less steps based on an integer param) (https://github.com/PostHog/posthog/pull/5675)
    • Conversion rates as percentages along with absolutes
    • Time distribution of step conversions (https://github.com/PostHog/posthog/pull/5693)
    • ~~Filter paths for cohorts~~ (already works)
    • Event exclusion (easily add events you don't want to see in paths) (https://github.com/PostHog/posthog/pull/5741)
    • mix and match different types of events (https://github.com/PostHog/posthog/pull/5741)
    • specify end point (https://github.com/PostHog/posthog/pull/5746) (Note: start point is already implemented. They don't work together simultaneously yet)
    • search paths between two funnel steps

    Will update this ticket with specific parameters used in api as we implement.

    Tagging @clarkus for a head start on designs. @mariusandra @liyiy @alexkim205 @paolodamico so you have context

  • Make saved reports a top-level feature

    Make saved reports a top-level feature

    Is your feature request related to a problem?

    Reports are useful for saving ad-hoc analysis. I want to:

    • Save/share reports which are individually useful
    • Add same report to multiple dashboards

    We have a concept of saved reports already. You can access them by:

    1. Going to insights
    2. Clicking history
    3. (Optional) Giving a unnamed insight a name
    4. Clicking on "saved" tab

    Describe the solution you'd like

    Make reports a more top-level thing with:

    1. Default tab to "saved" insights, history being a different tab
    2. Provide tooling to manage reports - e.g. filtering by name, creator, when created, starring, etc.
    3. Allow adding reports directly from dashboards - e.g. by having a (+) button which when opened allows to filter saved reports.
    4. Add a way to open recent reports of same type to insights. Move all "saved funnels" to reports.

    How filtering is handled by Heap

    2021-02-19_17-33

    Describe alternatives you've considered

    Only using dashboards - makes it harder to reuse reports in dashboards, bad for discovery.

    How [email protected] does it:

    At top of insights there are New, Save, Save as new buttons.

    2021-02-19_17-36

    Clicking open opens a modal for filtering these reports:

    2021-02-19_17-37

    Additional context

    There's a downside to this: we'd be cluttering our side nav even more with "related" functionality.

    cc @paolodamico @EDsCODE

    Thank you for your feature request – we love each and every one!

  • Experimentation MVP Things to Do

    Experimentation MVP Things to Do

    Following up from https://github.com/PostHog/posthog/issues/7418 , here's what we need to do to get the MVP out in these 2 weeks:

    Main Tasks:

    1. [x] Figure out & build the UI Creation Flow - @liyiy
      • @clarkus & @paolodamico : we could use some input here about the basic flow. (specifically on how we should structure this, disregard full fledged wireframes for now) There's 2.5 steps to creating an experiment: (1) Create an insight & (2) Choose a FF. (2.5): Name and description of experiment.
      • As you can tell, there's lots of ambiguity above^ that we need to clean up.
      • (We considered a flow where funnels have a "create experiment from insight" button, but @macobo mentioned how this increases complexity on the standard funnels view, and reduces discoverability quite a bit in simple mode)
      • (future context): There's a back & forth when choosing an insight & FF: They choose an insight, we tell them how long the experiment will run for. They tweak FF rollout % / definition, we tweak how long we expect experiment to run for. They tweak insight definition, we tweak how long to run the experiment for. What's a good way of doing this?
    2. [x] Build Experiment Page with the Insight and experiment results (also see here)
    3. [x] Create Plugin to add $active_feature_flags & $feature/{key} to every event (we only do it for web captures today) - @neilkakkar - deferred. Just focusing on posthog-js for now.
      • This implicitly allows breakdowns by Feature Flags on Funnels
    4. [x] Given a funnel with FF breakdown, calculate experiment results
    5. [ ] Given a funnel and FF, calculate how long an experiment should run

    New constraints:

    1. To give accurate results on expected running time, we need to answer the question: Given a FF, how many people in the past X days on this insight would've belonged to this FF? And use this to estimate. For now, restricting scope to basic FFs only (i.e. flag with the only property being the rollout % to all users).
  • Epic - Nail Seamless Analytics Experience

    Epic - Nail Seamless Analytics Experience

    Expanding on this sprint planning comment

    Nail Seamless Analytics Experience (Working title)

    Owner: @Twixes

    Why?

    Why? Insights and dashboards are very sluggish and inconsistent to use. The app doesn't spark joy.

    Goals

    Goal 1: "It should be possible to go from a dashboard to an insight and back in 0.1 seconds" Goal 2: TBD, working draft: "80% decrease in WTF/minute during usability surveys."

    Steps

    • P1, fix before other stuff. Persons modal loads forever on trends @mariusandra

    • Finally release saved insights @mariusandra

    • Implement the Information Architecture flow and refresh the look @Twixes

    • Combine the UX of insights, saved insights and dashboards into a coherent whole @Twixes and @mariusandra

    • Chart UX improvements:

      • Add all chart types with various states into storybook @mariusandra
      • Unify "not loaded" states amongst all charts
      • Don't show "No matching events" when never loaded anything yet
      • Add "area chart" and "percentage mode"
  • Improve navigation and discoverability

    Improve navigation and discoverability

    Is your feature request related to a problem?

    Through numerous customer interviews we now know there seems to be a bit of an issue with our current navigation, in which a) users find it a bit hard to reach the features they need or b) users are unaware of other features/capabilities of PostHog. This design proposal attempts to tackle that. Also attempting to balance the need to make all features easily discoverable to the problem of having so much stuff that it's overwhelming for new users.

    Aside from the above, this design also introduces full support for multiple projects and multiple organizations.

    Release plan. As this is a particularly intensive change (from a UX perspective), I'm thinking that we can release in the following manner:

    1. Multiple feedback rounds (this thread).
    2. Initial implementation (very intense UX change, but fortunately it will likely not require a huge code change).
    3. Beta testing with select power users (do usability tests and get qualitative feedback from them).
    4. Phased release with feature flags (quantitative impact).
    5. Full release.

    Thank you for your feature request – we love each and every one!

  • feat(trends): add moving average `smoothing_intervals` param

    feat(trends): add moving average `smoothing_intervals` param

    This will average over the preceding smoothing_intervals intervals. The driver for this is to remove either weekly or monthly trends.

    Limitations at the moment are that it only works for total volume queries, as it relies on the results from clickhouse being from a single timeline series.

    Video example here

  • Metrics on event deliverability

    Metrics on event deliverability

    Tasks

    • [x] https://github.com/PostHog/posthog/pull/4783
    • [ ] https://github.com/PostHog/plugin-server/pull/480
    • [ ] https://github.com/PostHog/posthog/pull/4871

    Requested by a potential user on a call.

    If I'm exporting events somewhere else, I'd like some metrics as to what percentage of my events actually get delivered.

    Segment provides this:

    They infer success from the lack of an error being thrown.

    One step towards "UI plugins" that could help here is allow plugin devs to set metrics that would appear on a dashboard. A native API like this, for example:

    const eventsDelivered = await storage.get('eventsDelivered')
    const eventsProcessed = await storage.get('eventsProcessed')
    updateMetric('percentageDelivered', (eventsDelivered/eventsProcessed)*100)
    

    This way we don't have to deal with the problem of rendering arbitrary code yet, but give plugin devs the option to show some more stuff on the UI. Just a quick idea though.

  • Dashboards color schemes

    Dashboards color schemes

    When working on the designs for #1659, @lottiecoxon helped us create different color scheme proposals for the main dashboards 🙌 (full design here). Opening this issue to discuss the different proposals.

    Current color scheme

    image

    Proposal 1

    image

    Proposal 2

    image

    Proposal 3

    image

    Proposal 4

    image

  • Time conversion analysis - new view

    Time conversion analysis - new view

    This issue is to discuss the frontend implementation of the time conversion analysis view. Full product specs can be found here.

    Initial wireframe draft below (from @corywatilo's new UI on #4535). Looking for feedback @corywatilo @marcushyett-ph @mariusandra @kpthatsme. The histogram is quite simple that's why it's mocked. On the y-axis we have a regular number scale as we have today. On the x-axis we have each bucket range.

    image

  • chore: nice diff for pytest

    chore: nice diff for pytest

    Problem

    The diff output from pytest is not very easy to read

    Screenshot 2022-09-24 at 17 02 19

    Here's a diff where a List[Dict] has a difference. They are (if you spend time reading it) a hundred or so characters different ¯_(ツ)_/¯ (╯°□°)╯︵ ┻━┻

    Changes

    adds https://github.com/hjwp/pytest-icdiff which adds much clearer diffs (when using the assert x == y syntax)

    Screenshot 2022-09-24 at 17 02 08

    Here's the same test failure. Immediately highlighting that a particular key in a particular element is different.

    How did you test this code?

    Installing the package and running a test

  • Create cohort from action (grouped event) or funnel completion

    Create cohort from action (grouped event) or funnel completion

    Is your feature request related to a problem?

    No

    Describe the solution you'd like

    Give the user the ability to instantly create a cohort (via a one-click button) from an action/grouped event and from completed funnels. This is more for ease and smoothness through the product than actually lacking the ability to do so.

    Describe alternatives you've considered

    It can be manually recreated as a cohort, however, as actions and cohorts appear to share the same criteria requirements, it seems like an easy quality of life improvement.

    Additional context

    n/a

    Thank you for your feature request – we love each and every one!

  • Improvements to event usage transparency during onboarding

    Improvements to event usage transparency during onboarding

    Is your feature request related to a problem?

    No

    Describe the solution you'd like

    Two improvement suggestions here.

    The first is to do with the pricing page:

    Allow users to sign into their google analytics account (or any other analytics tools that have a viable API) and grab event usage data to estimate costings.

    The second is to do with billing and usage after sign up

    During the initial setup and exploratory period (and even later in the journey when you simply want to optimise events and costs), understanding the number of events and their cost is very important. At the moment there is just a number of events counted and the caveat that there's possibly a 24-hour delay. However, the system does know the time period for the events that it has registered the events and so can work out an exact period of usage show details and make estimates from that.

    For the user to better understand the cost and usage (which is so important for adopting a new product and getting signoff on spend), the user should be able to pick a period and get a breakdown such as the following:

    *Period: user chooses 6 completed days

    Events within period: 205,780 Estimated events per month: 1,131,790 Estimated cost per month: $30.00

    Event breakdown for period:

    Page events (pageviews and pageleave): 50,000 Automatically captured events: 150,000 (turn off automatically captured events) Session recording events: 5,000 (turn off session recordings) Custom events: 780

    Most used custom events:

    customEvent1: 200 (26% of custom events) customEvent2: 100 (13% of custom events) customEvent3: 50 (6% of custom events) customEvent4: 30 (4% of custom events) customEvent5: 10 (1% of custom events) Others: 300 (40% of custom events)

    This will allow users to understand their usage vs costs better during the early onboarding stage and also give users who want to better optimise their usage a tool to see where savings can be made at-a-glance.

    Describe alternatives you've considered

    Manually create insights that pull out the information required to better understand event usage.

    Additional context

    n/a

    Thank you for your feature request – we love each and every one!

  • Split dashboard content with heading blocks

    Split dashboard content with heading blocks

    Is your feature request related to a problem?

    No

    Describe the solution you'd like

    I'd like to be able to split a dashboard with headings. Full-width text blocks that can be used to better group the insights within a dashboard.

    Describe alternatives you've considered

    You could break down dashboards to be more granular, but not being able to group dashboards into "folders" means you just end up with a lot of dashboards.

    Additional context

    n/a

    Thank you for your feature request – we love each and every one!

  • Not able to use session duration minute or hour filter

    Not able to use session duration minute or hour filter

    Bug description

    When filtering sessions by session duration, trying to filter by minute or hour causes the value to go null, break styling. Re-selecting seconds causes all options to be selected.

    image image

    How to reproduce

    1. Create insight
    2. Add filter to event of session duration
    3. Try to set session duration time unit to minutes or hours.

    Environment

    • [x] PostHog Cloud
    • [ ] self-hosted PostHog, version/commit: please provide

    Additional context

    Also effects filter groups.

    Thank you for your bug report – we love squashing them!

Guesslang detects the programming language of a given source code
Guesslang detects the programming language of a given source code

Detect the programming language of a source code

Sep 16, 2022
Learning source code review, spot vulnerability, find some ways how to fix it.

Learn Source Code Review Learning source code review, spot vulnerability, find some ways how to fix it. WordPress Plugin Authenticated Stored XSS on C

Sep 1, 2021
This is a Python program to get the source lines of code (SLOC) count for a given GitHub repository.

This is a Python program to get the source lines of code (SLOC) count for a given GitHub repository.

Mar 10, 2022
Sep 21, 2022
Product-Review-Summarizer - Created a product review summarizer which clustered thousands of product reviews and summarized them into a maximum of 500 characters, saving precious time of customers and helping them make a wise buying decision.

Product-Review-Summarizer - Created a product review summarizer which clustered thousands of product reviews and summarized them into a maximum of 500 characters, saving precious time of customers and helping them make a wise buying decision.

Jan 1, 2022
A tool can scrape product in aliexpress: Title, Price, and URL Product.
A tool can scrape product in aliexpress: Title, Price, and URL Product.

Scrape-Product-Aliexpress A tool can scrape product in aliexpress: Title, Price, and URL Product. Usage: 1. Install Python 3.8 3.9 padahal halaman ins

Dec 30, 2021
Streamlit App For Product Analysis - Streamlit App For Product Analysis

Streamlit_App_For_Product_Analysis Здравствуйте! Перед вами дашборд, позволяющий

Jan 10, 2022
Analytics service that is part of iter8. Robust analytics and control to unleash cloud-native continuous experimentation.

iter8-analytics iter8 enables statistically robust continuous experimentation of microservices in your CI/CD pipelines. For in-depth information about

Oct 14, 2021
Developer-friendly asynchrony for Django

Django Channels Channels augments Django to bring WebSocket, long-poll HTTP, task offloading and other async support to your code, using familiar Djan

Sep 21, 2022
The easy-to-use and developer-friendly CMS

django CMS Open source enterprise content management system based on the Django framework and backed by the non-profit django CMS Association. Get inv

Sep 17, 2022
Developer-friendly asynchrony for Django

Django Channels Channels augments Django to bring WebSocket, long-poll HTTP, task offloading and other async support to your code, using familiar Djan

Sep 23, 2022
The easy-to-use and developer-friendly CMS

django CMS Open source enterprise content management system based on the Django framework and backed by the non-profit django CMS Association. Get inv

Sep 21, 2022
Developer-friendly asynchrony for Django

Django Channels Channels augments Django to bring WebSocket, long-poll HTTP, task offloading and other async support to your code, using familiar Djan

Sep 16, 2022
Modern, privacy-friendly, and detailed web analytics that works without cookies or JS.
Modern, privacy-friendly, and detailed web analytics that works without cookies or JS.

Modern, privacy-friendly, and cookie-free web analytics. Getting started » Screenshots • Features • Office Hours Motivation There are a lot of web ana

Sep 21, 2022
rotki is an open source portfolio tracking, analytics, accounting and tax reporting tool that respects your privacy.
rotki is an open source portfolio tracking, analytics, accounting and tax reporting tool that respects your privacy.

rotki is an open source portfolio tracking, analytics, accounting and tax reporting tool that respects your privacy. The mission of rotki is to bring transparency into the crypto and financial sectors through the use of open source.

Sep 17, 2022