Skip to content

posthog: outbound_click, copy and search events; crm Actions page - #2541

Merged
Flotapponnier merged 2 commits into
devfrom
feat/posthog-events
Sep 20, 2026
Merged

Flotapponnier merged 2 commits into
devfrom
feat/posthog-events

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Follow-up to #2540.

Site: `src/lib/analytics.ts` (typed `track()`, no-op when PostHog is not initialised) and three events, no personal data:

  • `outbound_click` {href, host, text, page}: one delegated capture-phase listener in the PostHog provider for every link leaving the host (provider websites on /products, X, GitHub, endpoint hosts). The number a benchmark site lives on: visitors sent to providers.
  • `copy` {kind, value?, bench?}: CopyButton takes an optional `event`; wired on the public endpoint rows (kind endpoint + bench), the citation bar (api_url + bench), /mcp (mcp_url), the embed badge (embed + format + bench), the AI brief tiles (brief).
  • `search` {query, kind, url}: when a result is picked in the search dialog.

CRM: Actions page (outbound clicks by destination host with the page they came from, copies per kind/value/bench, search queries with the landing URL) plus 7 d KPIs with w/w; 4 more HogQL queries per hourly refresh (15 total, ~0.6 % of the org budget). Queries validated against a real PostHog project (0 rows there, syntax and shapes OK). Deployed to Railway.

Nothing lands in PostHog until the production `NEXT_PUBLIC_POSTHOG_KEY` placeholder is replaced by the real project token.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HJgbZCqjR4nvCfcJSzofbw

florent-sys and others added 2 commits September 20, 2026 13:13
…opy with kind/bench, search with the query and the result picked) so the CRM measures what the traffic turns into; crm: Actions page (outbound hosts, copies per bench, search queries), four more HogQL queries per hourly refresh (15 total)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJgbZCqjR4nvCfcJSzofbw
…h their name, the badges catalog copy tagged embed with format and bench, track() typed per event, action labels rendered

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJgbZCqjR4nvCfcJSzofbw
@Flotapponnier
Flotapponnier merged commit 5f3e573 into dev Sep 20, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants