PostHog analytics in Google Sheets (live queries, no export)
PostHog's UI is great for dashboards. It's not great for ad-hoc analysis where you want to pivot, model, or share with someone who lives in Sheets. The usual workflow — "export CSV → upload to Sheets → reformat" — works once, then never again because the data is stale within an hour.
The PostHog connector in gptsheet skips the CSV detour. Queries run live against PostHog's API; rows land directly in your Sheet; re-run on a schedule.
What you can pull
- Daily / weekly / monthly active users
- Custom event queries via HogQL (PostHog's SQL-flavored query language)
- Funnels — drop-off rates between steps
- Retention cohorts
- Feature-flag rollout exposure
- Insight results (existing PostHog Insights, accessed by ID)
Setup: 4 minutes
Step 1: get a personal API key
PostHog → personal settings → Personal API Keys → Create. Pick the read-only scopes you need: query:read, insight:read. Copy the key.
You also need your project ID (top-left of PostHog UI, after /project/).
Step 2: connect
Sidebar → Menu → Connectors → PostHog → paste key + project ID + host (US app.posthog.com or EU eu.posthog.com) → Connect.
The two action types
1. Canned queries
The connector ships with pre-built actions: Daily Active Users (last 30 days), Recent events by type, List feature flags, etc. Click ▶ Run now on any of them.
2. Custom HogQL
For the slicing your team actually wants, use the Run HogQL query action. Paste any HogQL SELECT and the result rows land in your sheet.
SELECT
toDate(timestamp) AS day,
count() AS events,
count(DISTINCT person_id) AS users
FROM events
WHERE event = 'pageview'
AND timestamp > now() - INTERVAL 30 DAY
GROUP BY day
ORDER BY day ASC
Returns one row per day with event count + DAU. Pipe directly into a Sheets chart.
Real patterns we see
Daily MAU / DAU dashboard
One HogQL query → DAU by day for 90 days. Schedule daily refresh. Add a Sheets sparkline chart. Living dashboard, zero ETL.
Funnel analysis
HogQL with arraySort(groupArray(event)) per user → drop-off counts per step. Easier to copy/paste into a slide deck than screenshotting PostHog's funnel view.
Feature-flag exposure × revenue
HogQL: events tagged with feature flag = on. Join the user IDs against your Stripe customer list (via the Stripe connector) to compute MRR-by-flag.
Acquisition source breakdown
HogQL group-by $initial_utm_source for new sign-ups. Combine with paid-ad spend (from CSV) to compute CAC per source.
Combining with the chat agent
Once you have rows from PostHog in a Sheet, the chat agent earns its keep:
- "Plot daily active users from this range and add a 7-day rolling average column."
- "Which day in the last 30 had the highest engagement spike and what events drove it?"
- "Tag each row with a quarter (Q1/Q2/Q3/Q4) based on the day column."
The agent reads the sheet, writes formulas or charts inline, and stays within your data.
Privacy
BYOK. Your PostHog API key is stored in browser localStorage, never on our servers. Every query goes from your Sheet to app.posthog.com (or your self-hosted instance) directly. We only see your gptsheet license key.
Self-hosted PostHog
If you self-host PostHog, change the host field during connector setup to your own URL (e.g., posthog.yourcompany.com). Everything else works the same way.
The Pro tier
PostHog is one of 6 SaaS connectors in the Pro tier ($199 lifetime). Includes Stripe, Amplitude, GA4, Search Console, and Ghost. If your team's analytics live across multiple of these, the lifetime license costs less than one month of most BI tools.
Get the PostHog connector
PostHog is in the Pro tier — $199 lifetime. Includes 6 other SaaS connectors.
Get gptsheet Pro