Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add kws-projects/react-boilerplate --skill analytics-and-monitoringgit clone --depth 1 https://github.com/kws-projects/react-boilerplateWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/kws-projects/react-boilerplate/analytics-and-monitoring)<a href="https://agentmods.dev/skills/kws-projects/react-boilerplate/analytics-and-monitoring"><img src="https://agentmods.dev/badge/skills/kws-projects/react-boilerplate/analytics-and-monitoring/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/kws-projects/react-boilerplate/analytics-and-monitoring"><img src="https://agentmods.dev/badge/skills/kws-projects/react-boilerplate/analytics-and-monitoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01427 |
| Opus 5.5 | $0.00000 | $0.00571 |
| Sonnet 5.5 | $0.00000 | $0.00285 |
| Haiku 4.5 | $0.00000 | $0.00143 |
Grade A, and why
analytics-and-monitoring scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Analytics & Monitoring
Work with the GA4 analytics and Sentry error-monitoring integrations in this project. Use when adding events, capturing errors, configuring user identity, managing consent, or troubleshooting the integration.
Architecture overview
Both integrations follow the adapter pattern: a thin typed wrapper in
src/lib/ owns the SDK, and all other code uses the adapter (or the React
hooks) — never the raw SDK.
src/lib/analytics.ts → GA4 gtag.js adapter
src/lib/monitoring.ts → Sentry adapter (also re-exports ErrorBoundary)
src/types/analytics.ts → Typed event definitions
src/types/monitoring.ts → Error context / user / breadcrumb types
src/hooks/useAnalytics.ts → React hook (route-aware)
src/hooks/useMonitoring.ts → React hook
src/hooks/usePageTracking.ts → Auto page-view on route change
src/components/ErrorFallback.tsx → Fallback UI for SentryErrorBoundary
GA4 — Adding a new tracked event
-
Define the event shape in
src/types/analytics.ts:export type FeatureUsedEvent = { name: 'feature_used' params: { feature: string; duration_ms?: number } } -
Add it to the
AnalyticsEventunion in the same file. -
Track it from feature code:
import { analytics } from '@/lib/analytics' analytics.track({ name: 'feature_used', params: { feature: 'export' } })Or via the hook:
const { track } = useAnalytics() track({ name: 'feature_used', params: { feature: 'export' } })
Event naming rules (GA4)
- Use
snake_case, max 40 characters. - Avoid GA4 reserved names:
click,error,first_visit,page_view,scroll,session_start,user_engagement. - Prefer recommended events (
login,sign_up,search,share,select_content,exception) when they fit — GA4 provides enhanced reporting for these.
User identification (GA4)
analytics.setUserId(user.id) // after login — internal ID only, no PII
analytics.setUserProperties({ plan: 'pro' }) // user-scoped custom dimensions
analytics.clearUserId() // on logout
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 181 lines · 0 tokens per session scan A 487fba417cd1
analytics-and-monitoring is a skill published in the GitHub repository kws-projects/react-boilerplate (3 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,427 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
analytics-and-monitoring compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| analytics-and-monitoringkws-projects/react-boilerplate | Skill | 3 | 5mo ago | MIT | A | 0 | Cursor |
| traffic-diagnosissurendranb/google-analytics-mcp | Skill | 244 | 5d ago | MIT | A | 34 | Claude Code |
| yd-finguardLeeYudok/agents-scaffold | Skill | 38 | yesterday | MIT | A | 63 | Claude Code |
| exploratory-testingupex-galaxy/agentic-qa-boilerplate | Skill | 26 | 2d ago | MIT | A | 327 | Claude Code |
| integration-rule-engineaozyildirim/Agena | Skill | 103 | 28d ago | MIT | A | 67 | Claude Code, Codex |
| bug-screenshot-annotationupex-galaxy/agentic-qa-boilerplate | Skill | 26 | 2d ago | MIT | A | 285 | Claude Code, Codex |
| ultraciteagustinusnathaniel/nextarter-tailwind | Skill | 124 | 1mo ago | MIT | A | 142 | Claude Code, Codex |