Skip to content

Commit 48342fc

Browse files
feat: update Plausible tracking for new events
- Add tracking for "suggest spec" link on CatalogPage - Add tracking for "report issue" link on SpecPage
1 parent 34429f6 commit 48342fc

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
77
- **Do NOT commit or push in interactive sessions** - When working with a user interactively, never run `git commit` or `git push` automatically. Always let the user review changes and commit/push manually.
88
- **GitHub Actions workflows ARE allowed to commit/push** - When running as part of `spec-*.yml` or `impl-*.yml` workflows, creating branches, commits, and PRs is expected and required.
99
- **Always write in English** - All output text (code comments, commit messages, PR descriptions, issue comments, documentation) must be in English, even if the user writes in another language.
10+
- **Update documentation when making changes** - When adding new features, events, or modifying behavior, always check if related documentation needs updating (e.g., `docs/reference/plausible.md` for analytics events, `docs/workflows/` for workflow changes, `docs/contributing.md` for user-facing changes).
1011

1112
## CRITICAL: Mandatory Workflow for New Specs and Implementations
1213

docs/reference/plausible.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ https://pyplots.ai/{category}/{value}/{category}/{value}/...
111111
|------------|-----------|-------|-------------|
112112
| `external_link` | `destination`, `spec`, `library` | Footer | User clicks external link in footer |
113113
| `open_interactive` | `spec`, `library` | SpecPage | User opens interactive HTML view |
114+
| `suggest_spec` | - | CatalogPage | User clicks "suggest spec" link |
115+
| `report_issue` | `spec`, `library`? | SpecPage | User clicks "report issue" link |
114116

115117
**Destinations**: `linkedin`, `github`, `stats`
116118

@@ -249,6 +251,8 @@ To see event properties in Plausible dashboard, you **MUST** register them as cu
249251
| `toggle_grid_size` | Custom Event | Track view preference |
250252
| `external_link` | Custom Event | Track outbound clicks |
251253
| `open_interactive` | Custom Event | Track interactive mode usage |
254+
| `suggest_spec` | Custom Event | Track spec suggestion clicks |
255+
| `report_issue` | Custom Event | Track issue report clicks |
252256
| `tab_click` | Custom Event | Track tab interactions |
253257
| `og_image_view` | Custom Event | Track og:image requests from social media bots |
254258

@@ -330,6 +334,8 @@ User lands on pyplots.ai
330334
| `tab_collapse` | `library` | SpecTabs.tsx |
331335
| `external_link` | `destination`, `spec`, `library` | Footer.tsx |
332336
| `open_interactive` | `spec`, `library` | SpecPage.tsx |
337+
| `suggest_spec` | - | CatalogPage.tsx |
338+
| `report_issue` | `spec`, `library`? | SpecPage.tsx |
333339
| `view_spec_overview` | `spec` | SpecPage.tsx |
334340
| `view_spec` | `spec`, `library` | SpecPage.tsx |
335341
| `og_image_view` | `page`, `platform`, `spec`?, `library`?, `filter_*`? | api/analytics.py (server-side) |
@@ -462,6 +468,7 @@ window.plausible = function(...args) { console.log('Plausible:', args); };
462468
- [x] Grid size toggle tracking (`toggle_grid_size`)
463469
- [x] Tab interaction events (`tab_click`, `tab_collapse`)
464470
- [x] External link events (`external_link`, `open_interactive`)
471+
- [x] Contribution link events (`suggest_spec`, `report_issue`)
465472
- [x] Server-side og:image tracking (`og_image_view`) with platform detection
466473

467474
### Plausible Dashboard Checklist
@@ -473,5 +480,5 @@ window.plausible = function(...args) { console.log('Plausible:', args); };
473480

474481
---
475482

476-
**Last Updated**: 2026-01-06
483+
**Last Updated**: 2026-01-07
477484
**Status**: Production-ready with full journey tracking and server-side og:image analytics

0 commit comments

Comments
 (0)