Composable Commerce: eCommerce Guide
Composable commerce is a modular e-commerce architecture where you pick the best components for each function. Learn what it is, how it differs from the...

PostHog is an open source product analytics platform that helps product and growth teams understand how users interact with their application or website. Unlike closed tools such as Google Analytics or Mixpanel, PostHog offers the option to self-host the entire infrastructure, keeping full control over your data.
The platform combines multiple capabilities into a single product: event analytics, session replay, feature flags, A/B testing, and surveys. This removes the need to subscribe to several independent tools and simplifies technical integration.
PostHog captures events automatically (autocapture) without manual instrumentation. Every click, pageview, or form submission is recorded from the very start. For more advanced analysis, you can define custom events that reflect business actions: subscriptions, purchases, or feature activations.
Session recordings show exactly what each user does: where they click, how long they stay in each section, and where they drop off. Combined with conversion funnels, you can pinpoint the exact moment of friction and watch the real user behavior at that step.
PostHog includes a native feature flag system that lets you roll out features gradually to a percentage of users. This integrates directly with the experimentation module (A/B testing), allowing you to measure the impact of each change on conversion metrics before a full rollout.
Surveys let you collect qualitative feedback directly within the product. You can target surveys by cohort, previous behavior, or user properties to gather relevant data without disrupting the experience.
| Feature | PostHog | Mixpanel | Amplitude | GA4 |
|---|---|---|---|---|
| Open source | Yes | No | No | No |
| Self-hosting | Yes | No | No | No |
| Session replay | Yes | No | Limited | No |
| Feature flags | Yes | No | Yes | No |
| A/B testing | Yes | No | Yes | Limited |
| Entry price | Free | Free | Free | Free |
| Free tier limit | 1M events | 20M events | 50M events | Unlimited |
PostHog's main advantage is consolidation: instead of combining GA4 + Hotjar + LaunchDarkly + Optimizely, you get everything in a single platform with a unified data model.
The fastest way is to use PostHog Cloud. Create an account at posthog.com, grab your project API key, and install the snippet on your site:
<script>
!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.crossOrigin="anonymous",p.async=!0,p.src=s.api_host+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="init capture register register_once register_for_session unregister opt_in_capturing opt_out_capturing has_opted_in_capturing has_opted_out_capturing reset isFeatureEnabled onFeatureFlags getFeatureFlag getFeatureFlagPayload reloadFeatureFlags group identify setPersonProperties setGroupProperties".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
posthog.init('YOUR_API_KEY',{api_host:'https://eu.i.posthog.com'})
</script>
Beyond autocapture, define events that reflect your conversion funnel:
posthog.capture('purchase_completed', {
product_id: 'SKU-123',
value: 49.99,
currency: 'EUR'
})
Once data is flowing, create funnels to visualize conversion rates between steps. PostHog automatically calculates drop-off rates and lets you break down by user properties (device, country, acquisition cohort).
PostHog is especially useful in three optimization scenarios:
1. Diagnosing broken funnels. Combine funnel analytics with session replay to see exactly what users do when they drop off at each step. No guessing needed: you watch real behavior.
2. Validating hypotheses with A/B testing. Launch an experiment directly from PostHog, segment traffic, and measure the impact on your north star metric. All without external tools.
3. Personalization with feature flags. Activate features only for specific segments and measure whether they improve conversion before a full rollout.
PostHog is not perfect for every case. Autocapture can generate noise on sites with many interactive elements. Self-hosting requires infrastructure (ClickHouse + PostgreSQL) that can be expensive to maintain. And the learning curve is steeper than more visual tools like Hotjar.
For small teams without DevOps resources, PostHog Cloud on its free tier is the best entry point. For companies with strict privacy requirements (GDPR, EU data residency), self-hosting or EU-region hosting are decisive advantages.
PostHog represents a paradigm shift in product analytics: instead of paying for multiple fragmented tools, you consolidate analytics, session replay, A/B testing, and feature flags into a single platform. For CRO-focused teams, this means faster experimentation cycles and more connected data.
If you want to apply product analytics to your conversion strategy, at Boost we help teams set up their analytics stack and design experimentation processes that drive results. You can also audit your site for free with Scan&Boost.
Adrià Vidal — Boost
Composable commerce is a modular e-commerce architecture where you pick the best components for each function. Learn what it is, how it differs from the...
Connected TV (CTV) advertising lets you reach streaming audiences with targeted ads. Learn what CTV is, how it works, and how to integrate it into your...
Contentsquare is the leading digital experience analytics platform. Discover its features, how it differs from Hotjar or Clarity, and how to apply it to...