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

Overview


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 🦸

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!

    enhancement 
    opened by akbansa 113
  • 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?

    opened by paolodamico 61
  • 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

    enhancement feature/paths 
    opened by EDsCODE 59
  • 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 mixp@nel 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!

    enhancement 
    opened by macobo 41
  • 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).
    feature/experimentation 
    opened by neilkakkar 38
  • 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

    enhancement design 
    opened by paolodamico 37
  • 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"
    feature/dashboards epic feature/saved-insights 
    opened by mariusandra 32
  • 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!

    enhancement 
    opened by paolodamico 32
  • 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

    opened by hazzadous 30
  • Metrics on event deliverability

    Metrics on event deliverability

    Tasks

    • [x] https://github.com/PostHog/posthog/pull/4783
    • [x] https://github.com/PostHog/plugin-server/pull/480
    • [x] 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.

    enhancement apps 
    opened by yakkomajuri 30
  • 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

    enhancement feature/funnels 
    opened by paolodamico 27
  • fix: session recordings listing is nplus1 for persons

    fix: session recordings listing is nplus1 for persons

    Problem

    closes #12617

    When listing recordings a separate query is made for the PersonDistinctId of each person in the results

    Changes

    prefetches the distinct ids

    How did you test this code?

    Added a developer test

    opened by pauldambra 0
  • Google auth is case sensitive

    Google auth is case sensitive

    Bug description

    From a Customer signing up to EU Cloud (names redacted):

    Hello Simon! Just tried to login with an invite an admin sent me. They invited me on [email protected], and I tried to login using my Google Workspace-account which is: [email protected]. This gave me a Server Error (500) on my way back to PostHog, from Google's Oauth. I suspected this could be due to case-sensitivity, so an admin changed the invitation to [email protected] , and then it worked, so just letting you know.

    How to reproduce

    1. See above

    Environment

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

    Additional context

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

    bug 
    opened by simfish85 0
  • fix(query-performance): use @cached_property for view.team, view.organization

    fix(query-performance): use @cached_property for view.team, view.organization

    Problem

    We want to avoid unnecessary postgresql queries

    Changes

    Cache view.team/view.organization for the duration of a request.

    Leads to a bigger refactoring around permissioning.

    How did you test this code?

    Tests.

    Verified each request creates a new view object so caching does not persist beyond a request.

    opened by macobo 0
  • chore(roles-access): Events usage for roles

    chore(roles-access): Events usage for roles

    Problem

    Changes

    1. Fix bug where admin+ was unable to add a custom edit role.
    2. Add basic usage tracking

    👉 Stay up-to-date with PostHog coding conventions for a smoother review.

    How did you test this code?

    opened by liyiy 0
  • WIP: Permissioning speedup

    WIP: Permissioning speedup

    Problem

    • Loading a dashboard with 10 insights was doing upwards of 90 queries total for calculating insight permissions
    • Moving business logic out of models has both performance and maintainability benefits
    • view.team/view.organization did a query each time they were accessed.

    Changes

    👉 Stay up-to-date with PostHog coding conventions for a smoother review.

    How did you test this code?

    opened by macobo 1
Owner
PostHog
Open source product analytics platform
PostHog
Guesslang detects the programming language of a given source code

Detect the programming language of a source code

Y. SOMDA 618 Dec 29, 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

Shan 24 Dec 31, 2022
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.

Nipuna Weerasekara 2 Mar 10, 2022
Retentioneering 581 Jan 7, 2023
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.

Parv Bhatt 1 Jan 1, 2022
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

Rahul Joshua Damanik 1 Dec 30, 2021
Streamlit App For Product Analysis - Streamlit App For Product Analysis

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

Grigory Sirotkin 1 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

null 16 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

Django 5.5k Jan 3, 2023
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

django CMS Association 9.1k Jan 4, 2023
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

Django 5.5k Jan 6, 2023
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

django CMS Association 9.1k Jan 8, 2023
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

Django 5.5k Dec 29, 2022
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

R. Miles McCain 2.1k Jan 3, 2023
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.

Rotki 2k Dec 30, 2022