Short answer
PostHog can run a price test: a feature flag picks the variant, your code turns it into a price, and revenue comes from a Stripe table in its data warehouse. The split stays fixed. Leverprice only does prices: server SDKs, a bandit on revenue per visitor and webhook-verified revenue. Keep PostHog for analytics and let Leverprice set prices.
- PostHog experiments measure revenue from data warehouse tables such as a Stripe source, joined on a shared identifier and counting rows after first exposure.
- We found no bandit option in PostHog experiments, so traffic stays at the split you set.
- PostHog experiments share the feature flag meter: 1,000,000 requests a month free, then $0.0001 per request.
- Leverprice returns the price from server SDKs, moves traffic with a Thompson-sampling bandit on Pro and attributes purchases through signed checkout metadata.
If PostHog already holds your funnels, running a price test there looks almost free, and on the invoice it mostly is: experiments share the feature flag meter, and the first 1,000,000 flag requests a month cost nothing (pricing). The work sits around the flag. Your code turns a variant into a price and charges it at checkout, and revenue appears per variant only after Stripe data lands in PostHog's warehouse and joins to the right people.
Leverprice does only the price part. It returns the price from your server and moves traffic toward the best revenue per visitor, using revenue it reads from your payment provider. Leverprice is our product; this page says where PostHog is the better choice and shows how to run the two side by side. PostHog facts were checked against its docs and pricing page on November 17, 2026.
How do Leverprice and PostHog compare for price testing?
| Leverprice | PostHog | |
|---|---|---|
| Approach | Purpose-built price testing | Product analytics suite with feature flags and experiments |
| Where prices are decided | On your server: the SDK returns a price checked against your own min and max | In your code: a feature flag returns a variant, and you map it to a price |
| Automatic optimization | Yes on Pro: Thompson-sampling bandit on revenue per visitor; Free is a manual split | No bandit option found; the split stays where you set it |
| Revenue source | Signed provider webhooks, matched through signed checkout metadata; refunds subtract. On Stripe, one-time Checkout Sessions are verified; a subscription's first payment is reported with trackPurchase(), shows as unverified and counts when the Learn from setting is Reported | Data warehouse tables such as a Stripe source, joined to your events by a shared identifier (docs) |
| Payment providers | Stripe, Polar, Lemon Squeezy, Dodo Payments | Any whose data you load into its warehouse; Stripe is the documented example |
| SDK languages | Server only: TypeScript/JavaScript, Python, PHP, Ruby, Go | Server: Node.js, Python, PHP, Ruby, Go, Java, .NET, Elixir, Rust; plus web and mobile SDKs (libraries) |
| Scope | Price tests and regional prices per country | Product analytics, feature flags, and experiments on any metric |
| Pricing (Nov 2026) | Free; Pro $29/month or $199/year; Lifetime $299 once (pricing) | Experiments share the flag meter: 1,000,000 requests/month free, then $0.0001 each (pricing) |
How do you run a price test in PostHog?
In PostHog, a price test is an experiment whose variants your code maps to prices. The setup takes five steps:
- Create an experiment with one variant per price. PostHog creates the feature flag behind it.
- On your server, evaluate the flag for each visitor and map the variant to an amount. Use the same amount on the pricing page and at checkout, and never accept it from the browser.
- Add Stripe as a data warehouse source and create a revenue metric on one of its tables. The docs' example uses
stripe_subscriptions, withcreated_atas the timestamp,customer_idas the warehouse join key,properties.$user_idas the events join key, and a sum ofplan_amount(docs). - Check that the identifier has the same value and format on both sides, and that the timestamp column is a real datetime, not a string.
- Launch, then read results. A warehouse row counts only after the person's first exposure, inside the metric's conversion window and the experiment's dates.
The full walkthrough, with code, is in price testing with PostHog.
Where does a PostHog price test need extra work?
In four places, all of them the cost of putting a price behind a general-purpose flag.
Identity comes first. The revenue join works only when a value in the Stripe table equals a value on your PostHog events, so decide how a Stripe customer maps to a PostHog person before the test starts. A buyer you never identify in PostHog can't be joined. Leverprice skips the join: the signed attribution travels in the checkout metadata and comes back with the payment, signed-in or not. The mechanics are in verified revenue from webhooks.
Then the split. We found no bandit option in PostHog experiments, so traffic stays where you set it until you stop. With three prices at an even split, two thirds of the test traffic sees a price that isn't the best one, for the whole test.
Then the edges. What crawlers see, what a visitor gets when the flag can't be evaluated, and how checkout re-checks the amount are all your code. Leverprice's SDK gives crawlers the standard price, returns your own fallback price when no signed config arrives within 500 ms, and checks every price against your bounds.
Last, refunds. Whether a refund lowers a variant's revenue depends on how you build the metric. In Leverprice, refunds come off the price that earned them, from the provider's own refund events.
Choose PostHog if
- PostHog is already your analytics, and you want price results next to your funnels and retention.
- You want to judge a price on something other than payments, such as activation or usage, which PostHog experiments can measure from events.
- You sell through a provider Leverprice doesn't support and can load its data into PostHog's warehouse.
- Two or three prices at a fixed split are enough, your traffic fits the free flag allowance, and you'd rather build than pay.
Choose Leverprice if
- You want the price decided on your server, with your own bounds, a fallback when anything fails and crawlers kept out.
- You want traffic moved toward the best revenue per visitor without managing a split.
- You'd rather not build an identity join: purchases are attributed through signed checkout metadata, including buyers who never sign in.
- You take payments through Stripe, Polar, Lemon Squeezy or Dodo Payments and want revenue checked against signed webhooks. On Stripe that covers one-time Checkout Sessions; Polar also verifies a subscription's first payment.
- You want regional prices per country in the local currency, inside the same test, with results you can read by region.
- You want a coding agent to set it up through Leverprice's MCP server or CLI.
How do you use PostHog and Leverprice together?
You don't have to pick one. Leverprice sets the price and verifies revenue; PostHog keeps the analytics. Send PostHog the price each browser saw, and every funnel, retention chart and experiment can be broken down by it.
No Leverprice JavaScript runs in the browser, but PostHog's does, so the simplest bridge is a super property: render the quote's price on the server, then register it with posthog-js. How to get quote.price into a server-rendered page depends on your framework; the Next.js guide shows the App Router version.
"use client";
import { useEffect } from "react";
import posthog from "posthog-js";
// Rendered on the pricing page with the price your server got from Leverprice.
export function PriceTracker({ price, currency }: { price: number; currency: string }) {
useEffect(() => {
// From now on, every event this browser sends carries the price it saw.
posthog.register({ price_shown: price, price_currency: currency });
}, [price, currency]);
return null;
}price is in minor units (2900 means $29.00), the same number your checkout charges. In PostHog, break down any funnel by price_shown.
To move a running PostHog price experiment over:
- End the PostHog experiment and stop using its flag for prices.
- Replace the flag-to-price mapping with
getPrice()on the server, where you render the pricing page and where you create the checkout. - Pass
quote.metadatawhole into the checkout, then connect your provider's webhook signing secret in Leverprice. Setup per framework is in the docs. - Keep PostHog, add the super property above, and leave its other experiments running.
Don't run a PostHog experiment on the price while Leverprice is testing it: two systems assigning prices to one visitor ruin both results.
Frequently asked questions
Does PostHog support multi-armed bandits?
We found no bandit option in PostHog's experiment docs as of November 2026, so traffic stays at the split you set. Bandit vs A/B testing for pricing explains what a fixed split costs while a test runs.
Can PostHog measure revenue per variant from Stripe?
Yes, through its data warehouse. Add a Stripe source, then build a metric on a table such as stripe_subscriptions, joined to your events by a shared identifier; only rows after each person's first exposure count (docs).
Is PostHog cheaper than Leverprice for price testing?
On the invoice, usually: experiments use the flag meter, and the first 1,000,000 requests a month are free. The cost moves into the code and warehouse setup you build and maintain, while Leverprice Pro is a flat $29/month or $199/year.
Can I keep running PostHog experiments on everything else?
Yes. Keep PostHog experiments for onboarding, copy and features, and leave price amounts to Leverprice. Just don't put the price itself behind a PostHog flag while a Leverprice test runs.