Best Practices for Naming Analytics Events in Your Application
Learn best practices for naming analytics events in your application, including using descriptive names, following consistent conventions, and using past tense to create maintainable and useful tracking data.

1. Use Clear, Descriptive Names
When implementing analytics tracking, consistent and clear event naming is crucial for maintainable and useful data. Here are three essential rules to follow:
-
✅ "user_completed_registration"
-
✅ "article_shared_to_x"
-
❌ "btn_click"
-
❌ "complete"
Why? Descriptive names make your analytics data immediately understandable, even months later. They provide context without needing additional documentation.
2. Follow Consistent Conventions
Choose a naming pattern and stick to it across your entire application:
- Use underscores or dots consistently
- Maintain the same word order
- Keep a consistent level of detail
Example of consistency:
-
✅ user_viewed_profile
-
✅ user_updated_profile
-
✅ user_deleted_profile
-
❌ Mixing: userView, profile_update, deleteProfile
3. Use Past Tense
Events represent actions that have already occurred:
-
✅ "article_viewed"
-
✅ "payment_processed"
-
✅ "email_sent"
-
❌ "view_article"
-
❌ "process_payment"
-
❌ "send_email"
💡 Pro Tip: Create a living document of your analytics naming conventions and share it with your team, or better still just use devunus!