Event names follow a consistent naming convention
Why it matters
Mixed analytics event naming conventions — camelCase alongside snake_case alongside PascalCase — cause silent query failures in analytics dashboards. A funnel that joins buttonClicked with button_clicked misses events and produces artificially low conversion numbers. This is an observability issue (iso-25010:2011 Maintainability): when event names are inconsistent, adding a new tracking point requires reading existing code to guess which convention applies, and mistakes go undetected until conversion data looks wrong in production.
Severity rationale
Low because inconsistent naming degrades analytics data quality and developer experience without creating a security or availability risk.
Remediation
Standardize on snake_case (the GA4 and PostHog default) and define all event names as typed constants in lib/analytics-events.ts:
// lib/analytics-events.ts
export const ANALYTICS_EVENTS = {
CTA_CLICKED: 'cta_clicked',
FORM_SUBMITTED: 'form_submitted',
FORM_ABANDONED: 'form_abandoned',
PAGE_VIEWED: 'page_viewed',
} as const
// Usage:
analytics.track(ANALYTICS_EVENTS.CTA_CLICKED, { location: 'hero' })
Import from this file everywhere — typos become compile errors and the full event catalog is in one place. Rename existing events in your analytics platform's UI to match; most platforms support event aliases during migration.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Analytics & Tracking Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- iso-25010:2011 · maintainability — Analyzability sub-characteristic
Taxons
History
- 2026-04-18·v1.0.0·Initial import from marketing-analytics·automated