> ## Documentation Index
> Fetch the complete documentation index at: https://docs.synscribe.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to set up a PostHog dashboard for content analytics

> Provision the standard PostHog views — session recording, conversion actions, the Pages-with-AI-Traffic insight, and the sitewide + per-pillar conversion funnels.

Provision the standard PostHog views once PostHog is connected ([2.1.4 Connect PostHog](/platform/connect-posthog-mixpanel)) — ask Pi with the `posthog-setup` skill, which reads `/memory/posthog.md`, discovers your lead event, creates the views, bundles them into a dashboard, and records the ids back to memory so re-runs stay idempotent (it won't duplicate a view that already exists). Provision all five: session recording, tiered conversion actions, the Pages-with-AI-Traffic HogQL insight, a sitewide conversion funnel, and per-pillar funnels. Together they prove the two things that matter — AI-answer-engine traffic and pillar-level conversion — which is the whole attribution stance in [Part 1 §1.10](/theory/attribution): GSC tells you what ranks, PostHog what those visitors did, and the join tells you which pillar to double down on. Then [wire up attribution](/platform/attribution-setup) and validate it in the [performance review](/platform/performance-review).

## What "standard" means: provision all five

1. Session recording, a PostHog-side toggle. Turn it on in PostHog, then disable your ad-block to
   verify a session records. You set this one in PostHog directly, not through the skill.
2. Conversion `action`s, in three tiers:
   * Soft: click demo, click sign up
   * Conversion: form submission, account setup
   * Hard: payment
3. Pages with AI Traffic, the HogQL insight that isolates traffic referred by ChatGPT, Perplexity,
   Claude, and Gemini. Classic rank tracking can't see this surface (see
   [Part 1 §1.2](/theory/two-search-surfaces)).
4. Sitewide Conversion Funnel, pageview to lead, to baseline conversion.
5. Per-pillar funnels, the same funnel filtered to each content pillar (`/blog`, `/uses`,
   `/features`, and so on), so you can attribute conversion per pillar.

## Step 1: Provision the insights, funnels, and dashboard

```text theme={null}
Set up my standard PostHog views. Discover my lead/conversion event first, then
create the "Pages with AI traffic" insight, a sitewide funnel to lead, and per-pillar funnels for
/blog, /uses, and /features. Bundle them into one dashboard and save the ids to /memory/posthog.md.
Don't duplicate anything that already exists.
```

Pi runs `posthog-setup`: it finds the lead event (confirming with you if it's ambiguous, since a
wrong event makes every funnel silently empty), creates each view, pins them to an
`"Acquisition & AI traffic"` dashboard, and echoes the PostHog ids and URLs so you can
eyeball them.

## Step 2: Create the conversion actions

```text theme={null}
Create actions for the soft conversions (click demo, click sign up), the conversion events
(form submission), and the hard conversion (payment) — match each to my real buttons and
pages.
```

Pi creates the `action`s (matching on pageview URL or an autocapture click, e.g. a "Get a demo"
button). Confirm the paths and labels against the live site before it writes.

## The Pages-with-AI-Traffic insight (the SQL)

This is the insight that proves AI-answer-engine traffic. It's provisioned as a HogQL data table.
Reuse it exactly, and add a `Number of Days` variable for it to run:

```sql theme={null}
SELECT properties.$current_url AS page_url, count() AS event_count
FROM events
WHERE event = '$pageview'
  AND (
    properties.$referrer LIKE '%chatgpt.com%'
    OR properties.$referrer LIKE '%perplexity.ai%'
    OR properties.$referrer LIKE '%claude.ai%'
    OR properties.$referrer LIKE '%gemini.google.com%'
  )
  AND timestamp >= now() - INTERVAL {variables.number_of_days} DAY
GROUP BY page_url
ORDER BY event_count DESC
```

> **Good to know:** when Pi provisions this via `posthog-setup`, it matches an expanded AI-source
> list, checking both `properties.$referring_domain` and `properties.utm_source` (either can be set),
> so it also catches `chat.openai.com`, `copilot.microsoft.com`, `you.com`, and so on. Same insight,
> wider net.

> **Good to know:** on a PostHog account you already use, tell Pi to save to memory what you own and
> what not to touch, so a later session doesn't clobber your existing PostHog setup.

> 🎥 **Video:** [Conversion tracking on PostHog](https://www.loom.com/share/2d9bc938ae4641bf9a29f84aaef33606)

**Back to:** [2.6 Analytics & review](/platform/index#2-6-—-analytics-&-review) · **Prerequisite:** [2.1.4 Connect PostHog](/platform/connect-posthog-mixpanel) · **Next:** [2.6.2 Set up attribution](/platform/attribution-setup) · **Theory:** [1.10 Attribution](/theory/attribution)
