IndexZeroDocs

PostHog

Sessions, pages, acquisition, events, and conversions from a connected PostHog project. Free.

These three tools read a PostHog project connected to the IndexZero project, by running HogQL over its sessions and events tables. They are free and read-only. They are the PostHog counterparts of the Google Analytics tools; use whichever the project has connected. Connecting is done in the dashboard with a personal API key; see Integrations.

Shared arguments

ArgumentTypeRequiredDefaultMeaning
projectIdstringyes
channelorganic_search or allnoorganic_searchSessions PostHog attributes to organic search, or every channel.
daysinteger, 1 to 365no28Trailing window.
startDate, endDateYYYY-MM-DDnoExplicit window.

get_posthog_overview

Sessions, visitors, pageviews, bounce rate, and average session duration for the window, with the previous equal-length window for comparison and a daily trend.

Arguments: the shared set.

get_posthog_report

Run one report.

ArgumentTypeRequiredDefaultMeaning
kindentry_pages, top_pages, exit_pages, traffic_acquisition, events, conversions, or audienceyesentry_pages is landing pages by session, top_pages by pageview.
acquisitionBreakdownchannel, referring_domain, utm_source, utm_medium, or utm_campaignnochannelFor traffic_acquisition.
audienceBreakdowndevice_type, country, browser, or osnodevice_typeFor audience.
eventNamestring, 1 to 200 charsrequired by conversionsThe PostHog event that counts as a conversion, for example signup_completed. Run the events report first to find real names.
pathPrefixstring, up to 200 charsnoRestrict to paths starting with this, for example /blog.
hoststring, up to 253 charsnoevery hostRestrict to one hostname. Useful when the PostHog project has also seen localhost or staging traffic.
limitinteger, 1 to 500no100

Plus the shared arguments.

get_posthog_search_opportunities

Joins Search Console against PostHog to find pages that attract search traffic but under-convert, and queries with impressions that are not landing clicks. Requires Search Console and PostHog both connected.

ArgumentTypeRequiredDefaultMeaning
projectIdstringyes
eventNamestringnoThe conversion event. With it, under-performance means "ranks but never converts"; without it, the report falls back to bounce rate.
daysinteger, 1 to 365no28

On this page