Skip to content

Commit 0cb3709

Browse files
feat(analytics): update event tracking and configuration
- Adjust internal link properties in plausible.md - Add line ending convention to project.yml - Handle potential promise rejection in reportWebVitals.ts - Ensure libraryId is defined in SpecTabs.tsx event tracking
1 parent cb6df5d commit 0cb3709

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

.serena/project.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,8 @@ language_backend:
126126
# list of regex patterns which, when matched, mark a memory entry as read‑only.
127127
# Extends the list from the global configuration, merging the two lists.
128128
read_only_memory_patterns: []
129+
130+
# line ending convention to use when writing source files.
131+
# Possible values: unset (use global setting), "lf", "crlf", or "native" (platform default)
132+
# This does not affect Serena's own files (e.g. memories and configuration files), which always use native line endings.
133+
line_ending:

app/src/analytics/reportWebVitals.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,6 @@ export function reportWebVitals() {
3838
},
3939
});
4040
});
41-
});
41+
})
42+
.catch(() => {});
4243
}

app/src/components/SpecTabs.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,11 @@ export function SpecTabs({
209209

210210
// Toggle: clicking same tab collapses it
211211
if (tabIndex === newValue) {
212-
onTrackEvent?.('tab_toggle', { action: 'close', tab: tabNames[tabIndex], library: libraryId });
212+
onTrackEvent?.('tab_toggle', { action: 'close', tab: tabNames[tabIndex], library: libraryId || undefined });
213213
setTabIndex(null);
214214
} else {
215215
setTabIndex(newValue);
216-
onTrackEvent?.('tab_toggle', { action: 'open', tab: tabNames[newValue], library: libraryId });
216+
onTrackEvent?.('tab_toggle', { action: 'open', tab: tabNames[newValue], library: libraryId || undefined });
217217
}
218218
};
219219

docs/reference/plausible.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ https://pyplots.ai/{category}/{value}/{category}/{value}/...
110110
| Event Name | Properties | Where | Description |
111111
|------------|-----------|-------|-------------|
112112
| `external_link` | `destination`, `spec`?, `library`? | Footer.tsx, LegalPage.tsx | User clicks external link |
113-
| `internal_link` | `destination`, `spec`, `library` | Footer.tsx | User clicks internal link in footer |
113+
| `internal_link` | `destination`, `spec`?, `library`? | Footer.tsx | User clicks internal link in footer |
114114

115115
**External destinations (Footer)**: `github`, `stats`, `linkedin`
116116
**External destinations (LegalPage)**: `linkedin`, `x`, `github_personal`

0 commit comments

Comments
 (0)