This chapter is currently under development. Please check back later for
updates.
What are Analytics Events?
Analytics events are user interactions with your product that you track using an analytics tool. These events can be anything from clicking a button to making a purchase. Events are the building blocks of your product analytics. By tracking events, you can understand how users are interacting with your product, identify areas for improvement, and measure the impact of changes you make to your product.Which Events to Track?
When deciding which events to track, there are two key principles you should keep in mind:1. Be Relevant
Events should be relevant to your business goals. This means that you should only track events that are meaningful to your product and your users. For example, if you’re building an e-commerce platform, you should track events like “product_added_to_cart” and “purchase_completed”, but you don’t need to track events like “page_scrolled” or “item_hovered”.2. Be Actionable
Events should be actionable, meaning that they should provide you with information that you can act on. For example, if you track an event like “signup_button_clicked”, you can use this information to optimize your signup flow and increase the number of signups.Event Design Principles
When designing events for your product analytics, there are a few key principles you should keep in mind to ensure that your events are effective and useful.Event Names
When naming events, use a consistent naming convention to make it easier to analyze and compare events.Use snake_case
You should use snake_case to name your events. This means that you should use lowercase letters and separate words with underscores. For example, you should name an event like “product_viewed” instead of “ProductViewed”. In the larger scheme of things, it doesn’t matter which case convention you use as long as you’re consistent. I recommend using snake_case because I’ve found it to be readable, easy to type, and easy to work with in most analytics tools and SQL queries.Examples
Good:- product_viewed
- purchase_completed
- ProductViewed
- Purchase Completed
Use a noun-verb format
When naming events, use a noun-verb format to make it clear what the event represents. Here, the noun represents the object or entity that the event is related to, and the verb represents the action in past tense. In case of complex verbs like “Add to cart”, you can use a noun-verb-noun format, where the first noun represents the subject of the action, the verb represents the action, and the second noun serves as a qualifier or descriptor.Examples
Good:- product_viewed
- purchase_completed
- product_added_to_cart
- view_product
- completed_purchase
- add_product_to_cart
Use descriptive names
When naming events, use descriptive names that clearly convey the meaning of the event. This will make it easier for you and your team to understand what the event represents and how it should be used.Examples
Good:- product_viewed
- purchase_completed
- product_added_to_cart
- view
- click
- add_to_cart