Product & feature comparisons
Contents
Keeping product comparison charts up-to-date across a large website with multiple products is tricky, so we've built a way to source data from a single place. That way, if a competitor adds a new feature (or updates an existing one), we can update the data in one place and have it automatically reflected across the entire website in existing product comparison tables, blog posts, and other documentation.
To do this, we need a source of record for:
- feature definitions (each PostHog product and its feature set)
- competitor data (each competitor and their product and feature offerings)
By standardizing all features across all products and competitors, we can generate a comparison table without any hard-coded data.
Example
This is not an ordinary Markdown table. (In fact, it's not Markdown at all!)
See more examples in the PostHog vs Amplitude blog post. All tables are dynamically rendered from data sourced from json arrays.
Product & platform features
Feature definitions for PostHog products are stored in:
Session Replay example:
/src/hooks/featureDefinitions/session_replay.tsx
Features can live in the features node, or nested inside in a logical grouping. (This is a truncated example.)
Competitor (& PostHog) data
Competitor data is stored in:
Amplitude example:
/src/hooks/competitorData/amplitude.tsx
Feature-level data for competitors is stored in the same format, with the exception being that products are namespaced under the products node in a single file instead of being spread across multiple files for each product.
There's also a platform node below the product array.
Referencing data
There are several ways to assemble competitor tables. It uses the <ProductComparisonTable /> component which uses <OSTable /> internally.
Compare products between competitors
This will list out the top-level product names and descriptions.
Render all items within a node
Use features to render all items inside the node.
This is helpful for comparing all features within a product without having to reference them individually.