‹ Reports
The Dispatch

OSS Watchlist: posthog/posthog


Executive Summary

PostHog is an open-source, all-in-one platform for product analytics. It enables teams to perform event-based analytics, user tracking, data visualization, and more, while maintaining data sovereignty and GDPR compliance. PostHog supports self-hosting and offers a free tier on PostHog Cloud. The project is actively developed, with recent activities focusing on enhancing user experience, expanding platform capabilities, and maintaining the codebase's health. The trajectory of the project is positive, with a clear commitment to continuous improvement and feature expansion.

Notable elements:

Recent Activity

Recent development efforts have been led by contributors such as Paul D'Ambra, Marius Andra, Michael Matloka, and Robbie, among others. Their work spans across various aspects of the project:

Collaboration among team members is evident, with multiple individuals contributing to overlapping areas of the project. This collaborative effort suggests a cohesive team working towards common goals.

Recent plans and completions include:

Risks

Plans

Work in progress includes:

These initiatives are expected to significantly contribute to the project's goals by making PostHog more user-friendly, secure, and efficient.

Conclusion

PostHog is in a state of active development with a clear focus on enhancing user experience, expanding functionality, and maintaining a healthy codebase. The project benefits from a vibrant community of contributors who are committed to its continuous improvement. While challenges such as managing technical debt and ensuring security are present, the project's trajectory remains positive with plans for significant enhancements in the near future.

Quantified Commit Activity Over 14 Days

Developer Avatar Branches Commits Files Changes
Bianca Yang 1 4 35 5431
Paul D'Ambra 1 36 93 4651
Marius Andra 1 12 70 4298
Tomás Farías Santana 1 7 33 2898
Ben White 1 18 138 2820
Lior539 3 22 59 2334
David Newell 1 9 294 2135
Juraj Majerik 1 2 61 2090
Thomas Obermüller 1 9 128 2068
Tom Owers 1 4 32 1719
Robbie 2 12 38 1710
Eric Duong 1 10 45 1393
Michael Matloka 1 10 347 1181
Cory Watilo 1 1 29 1107
Brett Hoerner 1 7 42 744
Kyle Galbraith 1 1 2 651
Zach Waterfield 1 13 77 629
Xavier Vello 1 5 20 596
ted kaemming 1 6 20 408
Raquel Smith 1 6 18 381
James Greenhill 1 2 4 356
Julian Bez 1 5 19 351
Neil Kakkar 1 3 19 288
PostHog Bot 1 7 2 109
Manoel Aranda Neto 1 2 13 65
Frank Hamand 1 3 2 32
Tiina Turban 1 1 1 26
slshults 1 1 1 21
dependabot[bot] 1 3 3 8
Joe Martin 1 1 1 7
timgl 1 1 2 3
github-actions 3 13 4 0

Detailed Reports

Report On: Fetch commits



Project Overview

The project in question is PostHog/posthog, an all-in-one, open-source platform for building better products. It provides tools for event-based analytics, user and group tracking, data visualizations, SQL access, session replays, heatmaps, feature flags, A/B testing, correlation analysis, surveys, and more. It's designed to help teams understand user behavior without losing control of their data. PostHog is available for self-hosting with a generous free tier on PostHog Cloud, ensuring GDPR compliance and data sovereignty.

Recent Development Activities

Recent Commits

  • Raquel Smith has been active with 6 commits mainly focusing on the master branch.
  • James Greenhill (fuziontech) made 2 significant commits in the master branch.
  • Robbie (robbie-c) contributed 12 commits across 2 branches with a focus on session filters and master branch updates.
  • Michael Matloka (Twixes) had 10 commits impacting a wide range of files in the master branch.
  • Marius Andra (mariusandra) was highly active with 12 commits in the master branch.
  • Paul D'Ambra (pauldambra) led with 36 commits across the project, showing a broad range of contributions.
  • Other notable contributors include Brett Hoerner (bretthoerner), Eric Duong (EDsCODE), Ted Kaemming (tkaemming), and more.

Branch Activity

  • The Prevent-mousewheel-in-number-fields branch saw activity from slshults, focusing on improving user experience in number fields.
  • The add-frameworks-to-onboarding branches (part 1 to part 3) saw contributions from Lior539, aiming to enrich the onboarding process with additional frameworks.
  • The add-session-filters branch received updates from Robbie (robbie-c), enhancing session filtering capabilities.

Developer Insights

The development team has been actively pushing updates and new features across several branches. Key areas of focus include:

  • Enhancing user experience with UI improvements and bug fixes.
  • Expanding the platform's capabilities with new integrations and functionalities such as session filters and framework support in onboarding.
  • Addressing technical debt and dependencies updates to ensure the platform's stability and performance.

Conclusions

The PostHog development team exhibits a strong commitment to constantly improving the platform's features and usability. With contributions spanning across various aspects of the project, from front-end enhancements to back-end optimizations, the team is dedicated to providing a comprehensive analytics solution that meets users' evolving needs. The active development across multiple branches indicates a structured approach to introducing new features while maintaining the platform's robustness.

Quantified Commit Activity Over 14 Days

Developer Avatar Branches Commits Files Changes
Bianca Yang 1 4 35 5431
Paul D'Ambra 1 36 93 4651
Marius Andra 1 12 70 4298
Tomás Farías Santana 1 7 33 2898
Ben White 1 18 138 2820
Lior539 3 22 59 2334
David Newell 1 9 294 2135
Juraj Majerik 1 2 61 2090
Thomas Obermüller 1 9 128 2068
Tom Owers 1 4 32 1719
Robbie 2 12 38 1710
Eric Duong 1 10 45 1393
Michael Matloka 1 10 347 1181
Cory Watilo 1 1 29 1107
Brett Hoerner 1 7 42 744
Kyle Galbraith 1 1 2 651
Zach Waterfield 1 13 77 629
Xavier Vello 1 5 20 596
ted kaemming 1 6 20 408
Raquel Smith 1 6 18 381
James Greenhill 1 2 4 356
Julian Bez 1 5 19 351
Neil Kakkar 1 3 19 288
PostHog Bot 1 7 2 109
Manoel Aranda Neto 1 2 13 65
Frank Hamand 1 3 2 32
Tiina Turban 1 1 1 26
slshults 1 1 1 21
dependabot[bot] 1 3 3 8
Joe Martin 1 1 1 7
timgl 1 1 2 3
github-actions 3 13 4 0

Report On: Fetch issues



Bug description

Person properties are not populating. For example: properties af_status and isconcierge do not populate when trying to use them as a filter or as a breakdown. The properties show up as 'Not seen', yet the properties do exist when looking at individual users (for example: users fyKh6NeNlsT0ylob7W5Lwa0PU1h1 and t2UpXv0Me9MDU4MYkZPjcHUkn573).

Screen Shot 2024-03-25 at 4 00 22 PM

How to reproduce

  1. Create a product analytics.
  2. Add Session Start in a Trend report.
  3. Filter af_status or isconcierge Expected: Person property will appear Actual: Person property does not appear To validate: go to any new user, the above person properties exist for the user.

Environment

  • [X] PostHog Cloud US, project ID: 22502
  • [ ] PostHog Cloud EU, project ID: [please provide from https://eu.posthog.com/settings/project-details#variables]
  • [ ] PostHog Hobby self-hosted with docker compose, version/commit: [please provide]
  • [ ] PostHog self-hosted with Kubernetes (deprecated, see "Sunsetting Kubernetes support"), version/commit: [please provide]

Additional context

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

Report On: Fetch PR 21235 For Assessment



Analysis of the Pull Request

Overview

This pull request introduces two main changes to the PostHog/posthog repository. The first change allows users to explore experiment results in an insight, which is a significant enhancement for analyzing experiments. The second change improves the responsiveness of embedded insights, enhancing the user experience when embedding insights in other platforms or tools.

Code Quality Assessment

  1. Clarity and Readability: The changes are well-structured and easy to follow. The use of descriptive variable names and clear comments helps in understanding the purpose of the code changes. For instance, the addition of the explicitDate property in various query models is straightforward and its purpose is clear from the context.

  2. Maintainability: The changes adhere to existing coding standards and practices in the project, ensuring consistency. The modifications are isolated to specific areas related to experiments and insights, minimizing the risk of unintended side effects on other parts of the application.

  3. Functionality Enhancement: The ability to explore experiment results directly within an insight is a valuable addition for users looking to perform deeper analysis on their experiments. This feature enhances the utility of insights by providing more detailed and actionable data.

  4. Performance Considerations: The second change aims at improving the responsiveness of embedded insights. While specific performance metrics are not provided, this focus on responsiveness is important for a smooth user experience, especially when integrating insights into external platforms.

  5. Error Handling and Edge Cases: There's an acknowledgment of a potential issue when the hogql-insight-funnels flag is enabled, indicating awareness of edge cases and potential bugs. This proactive approach to identifying and addressing potential issues is positive for overall code quality.

  6. Testing: The pull request includes updates to UI snapshots, indicating that visual changes have been considered and tested. However, there's no explicit mention of unit tests or integration tests for the new functionality introduced. Including automated tests would further enhance code quality by ensuring that new features work as expected and do not introduce regressions.

  7. Documentation and Comments: The code changes include comments where necessary, aiding in understanding the changes made. However, additional documentation, especially regarding how users can leverage the new experiment exploration feature, would be beneficial.

Recommendations

  • Automated Testing: It's recommended to include automated tests (unit tests or integration tests) for the new features introduced to ensure reliability and prevent regressions.
  • Performance Metrics: For the change aimed at improving responsiveness, it would be helpful to include specific performance metrics or benchmarks to quantify the improvement.
  • Feature Documentation: Providing detailed documentation or guides on how users can utilize the new experiment exploration feature would enhance user adoption and satisfaction.

Conclusion

The pull request introduces valuable enhancements to the PostHog/posthog project, focusing on improving experiment analysis capabilities and insight responsiveness. The changes are well-implemented with attention to code quality aspects such as clarity, maintainability, and error handling. Including automated tests and additional documentation would further solidify these enhancements, ensuring they deliver maximum value to end-users.

Report On: Fetch pull requests



PR #21145: fix: allow user to go to settings before a product is set up

Created 3 days ago, closed 3 days ago Merged by Zach Waterfield (zlwaterfield) 3 days ago

Problem

Right now there is a bug where a user can't go to any settings page except /settings/project when they don't have a product set up. This is because the url.settings() returns /settings/project by default and doesn't take into account all the different settings pages that user could be trying to hit.

Changes

The fix is to just check for any settings pages.

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

Does this work well for both Cloud and self-hosted?

Yes

Report On: Fetch PR 21234 For Assessment



Analysis of Pull Request #21234: "fix(insights): Make embedded insights flexible in height"

Overview

This pull request addresses an issue raised by a user regarding the responsiveness of embedded insights, specifically their height. The user's concern highlights that the embedded insights do not adjust their height based on the content, leading to a less optimal user experience. The proposed changes aim to make these insights more responsive by allowing their height to adjust dynamically.

Code Changes

  1. CSS Adjustments: The primary change involves CSS modifications to ensure that the visualization part of an insight (InsightCard__viz) becomes more flexible in terms of height when exported as an image. This is achieved by setting a minimum height based on a percentage of the viewport width, aiming for a roughly rectangular shape that can accommodate the insight's content more effectively.

  2. Snapshot Updates: Accompanying the code changes are updates to 52 UI snapshots across various themes (dark and light) and insight types (funnels, trends, retention, etc.). These updates reflect the visual adjustments made through the CSS changes.

  3. Testing: The description mentions local testing but acknowledges the absence of automated tests for these changes. The author expresses openness to adding tests but requires further consideration on how best to implement them.

Code Quality Assessment

  • Clarity and Readability: The changes are straightforward and localized primarily within CSS files, making them easy to understand. The use of comments helps clarify the intent behind specific style adjustments.

  • Maintainability: The modifications follow existing styling conventions and should not introduce significant maintenance overhead. However, the reliance on viewport width for determining minimum height could require future adjustments if new insight types or embedding contexts are introduced.

  • Testing Considerations: The lack of automated tests for visual responsiveness is a gap in ensuring long-term stability for these changes. While local testing can validate immediate improvements, automated tests would help catch regressions or issues arising from future updates.

  • Responsiveness Strategy: Using viewport width as a basis for adjusting height is a pragmatic approach to improving responsiveness. However, this method may not always yield optimal results across all screen sizes and aspect ratios. Further refinement or alternative strategies might be needed based on user feedback and usage patterns.

Recommendations

  1. Automated Testing: Investigate and implement automated tests that can simulate different embedding contexts and screen sizes to ensure the responsiveness adjustments perform as expected across a range of scenarios.

  2. User Feedback Loop: Monitor user feedback closely following these changes to identify any edge cases or scenarios where the responsiveness adjustments do not meet user needs or expectations.

  3. Documentation: Update any relevant documentation or guides related to embedding insights to reflect these changes and provide users with guidance on how to achieve the best results with embedded insights.

  4. Future Enhancements: Consider exploring additional CSS or JavaScript-based solutions for dynamically adjusting embedded insight dimensions based on actual content size rather than relying solely on viewport dimensions.

Conclusion

Pull Request #21234 effectively addresses a specific user concern regarding the responsiveness of embedded insights by making them more flexible in height. While the changes are clear and well-implemented, further enhancements in testing, user feedback collection, and potentially refining the responsiveness strategy will ensure these improvements remain robust and effective in diverse usage scenarios.

Report On: Fetch Files For Assessment



Analyzing the provided source code from the PostHog repository, specifically the WebPropertyFilters.tsx file, we can make several observations regarding its structure and quality. This file is part of the front-end codebase, dealing with web analytics property filters.

Structure and Readability

  1. Modularization: The code is well-organized into a single functional component named WebPropertyFilters. This modular approach enhances readability and maintainability.
  2. TypeScript Usage: The file leverages TypeScript for type safety, which is evident from the explicit typing of props such as webAnalyticsFilters and setWebAnalyticsFilters. This practice helps prevent type-related bugs and improves code documentation.
  3. Descriptive Naming: Variable and function names are descriptive and intuitive, making the code easier to understand. For example, setWebAnalyticsFilters clearly indicates that it's a setter function for updating web analytics filters.
  4. Taxonomic Group Types: The use of TaxonomicFilterGroupType enum for defining group types (EventProperties, PersonProperties) contributes to cleaner code by avoiding hard-coded strings and facilitating changes in the future.

Code Quality

  1. Filtering Logic: The filtering logic within the onChange handler is concise and leverages existing utility functions like isEventPropertyOrPersonPropertyFilter. This not only keeps the component clean but also promotes code reuse.
  2. Property Allow List: The component defines an allow list for both event and person properties, which is a good practice for ensuring that only relevant properties are processed. This can help in avoiding unnecessary processing and potential security concerns.
  3. Comments: There's a comment regarding re-enabling certain properties after merging a specific pull request (https://github.com/PostHog/posthog-js/pull/875). While comments are helpful, it's important to track such TODOs outside the code (e.g., using issues or project management tools) to ensure they're addressed timely.
  4. Error Handling: There's no explicit error handling in this component. While it might not be necessary depending on how the component is used, considering potential error states and how they're communicated to the user can improve user experience.

Suggestions for Improvement

  1. Error Handling: Evaluate if error handling is needed based on potential API failures or invalid input scenarios. Providing feedback to users can enhance usability.
  2. TODO Tracking: Move comments related to future work (like re-enabling properties post-merge) to a project management tool or issue tracker to ensure they're not overlooked.
  3. Testing: While not shown in the snippet, ensuring this component and its logic are covered by unit tests would be beneficial for maintaining quality, especially when dealing with filtering logic that might grow more complex over time.

Overall, the WebPropertyFilters.tsx file demonstrates good coding practices with a focus on readability, modularity, and type safety. With minor improvements around error handling and task tracking, it stands as a solid example of front-end code in a modern web application.