PostHog through Squiid

Product analytics, session replay, feature flags and experiments. PostHog is next up on Squiid, being built now.

Next up Provisioned Provisioned. Squiid creates the project or account for you and keeps the provider keys.

What PostHog is

PostHog is a product analytics platform that bundles the tools around it. Events captured from your app build funnels, retention curves and trends; session replay shows the recording behind a drop-off; feature flags roll a change out to a percentage of users or a named group; experiments measure the result; and surveys collect answers in the product. It also stores raw events, queryable with SQL, so analysis is not limited to the prebuilt charts. It can be self-hosted or run as cloud, and the data warehouse features let you join product events with revenue or support data.

For an AI-coded product this is how you find out whether the feature the agent shipped is used. It also matters for cost: knowing which users trigger expensive model calls, and how often, turns an unpredictable bill into a product decision. Feature flags are useful for the same reason, because a flag lets you disable an expensive path without a deploy. Cohorts and user paths also answer questions a dashboard of totals cannot, such as what the users who stayed did differently.

Why connect it through Squiid

Squiid provisions the PostHog project and holds the personal API key used for management and queries, while the project key used in the client stays scoped to capture. Calls go to https://api.squiid.io/v1/posthog/... with Authorization: Bearer $SQUIID_API_KEY, and SDKs work by pointing their base URL at the gateway (gateway convention). Event volume meters against prepaid credits at PostHog's list price, starting from its free allowance, on one monthly invoice with everything else. Autocapture can record interactions without instrumenting every element, which is useful early and worth replacing with explicit events later.

  • One account, one key, one bill, one dashboard. PostHog sits beside every other service your project uses, on the same invoice and the same credit balance.
  • Key custody. Squiid holds the PostHog credentials. Your code carries SQUIID_API_KEY, so POSTHOG_API_KEY, POSTHOG_PERSONAL_API_KEY, NEXT_PUBLIC_POSTHOG_KEY, POSTHOG_HOST never land in a repository, a preview deployment or an agent’s context.
  • Metering you can see. Every call is counted per service and per day, so you know what PostHog costs before the month ends.
  • Pause on zero. When prepaid credits run out the gateway stops authorizing usage instead of running up a bill you did not fund.
  • One rotation. Rotating the Squiid key cuts off every agent, worker and deployment at once, with no provider key to hunt down.

What you get

  • A provisioned PostHog project with the API key held by Squiid
  • Event analytics, funnels and retention
  • Session replay tied to events
  • Feature flags and A/B experiments
  • Usage-based pricing with a free allowance at list

How to connect PostHog

One variable replaces the provider credentials this service would normally need. Requests go to the gateway and the official SDKs work by pointing their base URL at it (gateway convention).

# .env
# replaces POSTHOG_API_KEY, POSTHOG_PERSONAL_API_KEY, NEXT_PUBLIC_POSTHOG_KEY, POSTHOG_HOST
SQUIID_API_KEY=sq_live_xxxxxxxxxxxxxxxxxxxxxxxx

# every request: https://api.squiid.io/v1/posthog/...
# header:       Authorization: Bearer $SQUIID_API_KEY
01

Add it in your dashboard

Open the Squiid catalog, add PostHog and fund credits. Squiid provisions the project and keeps the provider keys.

02

Put the one key in your env

Add SQUIID_API_KEY to .env and delete POSTHOG_API_KEY, POSTHOG_PERSONAL_API_KEY, NEXT_PUBLIC_POSTHOG_KEY, POSTHOG_HOST. Nothing else from PostHog needs to exist in your project.

03

Point your agent at it

Claude Code, Cursor and Codex read the same variable and call https://api.squiid.io/v1/posthog/. Agents add capture calls at the points a feature is used and wrap expensive paths in a feature flag they can turn off later.

Pricing through Squiid

PostHog charges per event, replay and feature flag request above a monthly free allowance, at the provider's listed price. Squiid passes that through at par: one dollar of prepaid credit is one dollar of PostHog usage, with no markup and no per-request margin.

PostHog is used on the usage based basis, so there is no fixed monthly plan cost to pass through. You pay for what you use at the provider’s listed price.

Squiid adds no markup to provider prices. There is a free plan at $0 a month with a 15% fee when you top up credits, Solo at $19.97 a month with a top-up fee that starts at 8% and falls to 3.5% as your spend grows, Team from $29.97 a seat a month with the same ladder one point lower, and Custom with a rate of 3% or less. Credits are prepaid, so PostHog usage stops when the balance reaches zero rather than producing an invoice you did not fund. Auto top-up with a cap keeps production running without handing anyone an open-ended card.

If you leave

Export: historical data is exported where PostHog supports it and the project is re-created in your own account, with new events going to your own keys. Squiid never owns your code, your schema or your domain, and the gateway speaks PostHog's own API, so the client change is a base URL. The handover page lists what happens for every provider in the catalogue.

Works with every coding agent

PostHog through Squiid is just an HTTP call with a bearer token, so every agentic coding tool can use it with the single key already in your environment:

Vibe coding a feature on PostHog usually means asking for it in plain language and letting the agent write the integration. Because the key is Squiid’s rather than the provider’s, it can do that without ever holding a credential that could be leaked, logged or committed.

Related services

Questions people ask

Is PostHog free through Squiid?

PostHog's free monthly allowance applies as normal, and usage beyond it bills at PostHog's list price against your credits with no markup.

Can I use feature flags to control model spend?

Yes. Putting an expensive model path behind a flag lets you disable it instantly without a deploy, which is a common pattern.

Does session replay work with the gateway?

Yes. Capture and replay ingestion route through the gateway with SQUIID_API_KEY, and the project key in your client stays capture-only.

PostHog or Google Analytics?

PostHog is product analytics with user-level events, replay and flags. It answers what people did in your app, not just which pages loaded.

What happens at zero credits?

Usage above the free allowance stops being authorized. Existing data and dashboards are unaffected.

Connect PostHog with one key.

PostHog combines event analytics, funnels, session replay, feature flags, A/B tests and surveys in one platform with a generous usage-based free tier. Provisioned by Squiid.