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

# FINANCIAL CALCULATOR ANALYTICS

# Financial calculator analytics

PostHog events for the public `/financial-calculators` pages, and how to read
the calculator funnel from them: visit, use, signup, connected account, paid.

Event names live in `lib/financial-calculators/analytics.ts`
(`CALCULATOR_EVENTS`). Treat them as append-only. Renaming one silently breaks
every saved insight that uses it.

## Why this exists

Before CFO-9803 the calculators had no events of their own. A deep dive
(Aug 7 to Oct 16, 2026) had to rebuild the funnel from pageview order and
autocapture, and could not tell which of the two "Try for free" buttons a
signup used, whether a visitor ran the calculator, or which calculator a paying
customer came from.

## Events

Every calculator event carries `slug` (`directory` on the directory page).
Events are sent through `useCalculatorAnalytics`, which applies the same
analytics gate as the rest of the site, so nothing is sent from localhost.

| Event | When | Properties |
| - | - | - |
| `calculator_directory_viewed` | Directory page load | `calculator_count` |
| `calculator_directory_searched` | Directory search, once typing has settled for 800 ms | `query`, `result_count` |
| `calculator_directory_card_clicked` | A calculator link on the directory | `slug`, `category`, `position`, `list` (`search_grid` or `category_list`), `searched` |
| `calculator_viewed` | Calculator page load | `slug`, `category`, `has_shared_scenario`, plus person properties below |
| `calculator_input_changed` | First edit of each field per page view | `slug`, `field`, `edited_field_count` |
| `calculator_calculated` | Calculate with valid inputs | `slug`, `source` (`form`, or `chat` from Ask Silvia), `run_number`, `inputs`, `changed_fields`, `uses_default_inputs`, `result_label`, `result_value`, `result_format` |
| `calculator_validation_failed` | Calculate with invalid inputs | `slug`, `fields` |
| `calculator_reset` | Reset | `slug` |
| `calculator_scenario_link_copied` | Copy scenario link | `slug`, `outcome` (`copied`, `fallback`, `invalid`) |
| `calculator_cta_clicked` | A "Try for free" signup button | `slug`, `placement` (`result` beside the result, `footer` at the bottom of the page) |
| `calculator_related_clicked` | A related-calculator card | `slug`, `target_slug`, `position` |
| `calculator_navigation_clicked` | Breadcrumbs, "View all", "All financial calculators" | `slug`, `target` |
| `calculator_source_link_clicked` | A primary-reference link | `slug`, `href` |
| `calculator_faq_opened` | A FAQ question opened | `slug`, `question`, `position` |
| `calculator_scroll_depth_reached` | 25, 50, 75 and 100% of the page | `slug`, `depth` |

`calculator_calculated` and `calculator_cta_clicked` are also sent by the Ask
Silvia chat (CFO-9796), with `chat_variant` added. Filter on `source` or
`chat_variant` to separate them.

`inputs` holds the numbers and option values the visitor entered. Calculators
ask for no names or contact details, so nothing in it identifies a person.

### Person properties

`calculator_viewed` stamps these on the person. PostHog merges the anonymous
visitor into the signed-up user, so the properties follow them through
signup, account connection and payment.

| Property | Set with | Meaning |
| - | - | - |
| `first_calculator_slug`, `first_calculator_category`, `first_calculator_viewed_at` | `$set_once` | The first calculator this person ever opened |
| `last_calculator_slug`, `last_calculator_viewed_at` | `$set` | The most recent one |

### Signup page

The signup buttons link to
`/sign-up?calculator=<slug>&calculator_placement=<result|footer>`.
`signup_page_viewed` then carries `calculator_slug` and `calculator_placement`,
so a calculator button arrival is distinct from one through the top nav.
Anyone can edit that URL, so only a slug-shaped `calculator` and a
`calculator_placement` of `result` or `footer` are reported. Anything else is
dropped.

## Reading the funnel

The full funnel, as a PostHog funnel insight:

1. `calculator_viewed`
2. `calculator_calculated` (filter `source = form` to exclude chat)
3. `calculator_cta_clicked`
4. `signup_page_viewed`
5. `user_signed_up`
6. `plaid_account_connected` or `snaptrade_account_connected` or `manual_account_created`
7. `subscription_started`

Break down by `slug` on step 1 to compare calculators.

Signup, connection and payment by first calculator (person property), in HogQL:

```sql theme={null}
SELECT
  person.properties.first_calculator_slug AS first_calculator,
  uniqIf(person_id, event = 'calculator_viewed') AS visitors,
  uniqIf(person_id, event = 'user_signed_up') AS signed_up,
  uniqIf(person_id, event IN ('plaid_account_connected',
                              'snaptrade_account_connected',
                              'manual_account_created')) AS connected,
  uniqIf(person_id, event = 'subscription_started') AS paid
FROM events
WHERE timestamp >= now() - INTERVAL 30 DAY
  AND person.properties.first_calculator_slug IS NOT NULL
  AND event IN ('calculator_viewed', 'user_signed_up', 'plaid_account_connected',
                'snaptrade_account_connected', 'manual_account_created',
                'subscription_started')
GROUP BY first_calculator
ORDER BY visitors DESC
```

This counts the downstream events in the window regardless of order. For
"after the first calculator view", compare timestamps against
`first_calculator_viewed_at`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.