This article will help you:
In order to get the most out of Amplitude Data, it's important to spend some time ensuring you have a good foundation in place. We recommend the following best practices:
Start with your goals and metrics
When you start with your goals and metrics first, it helps you decide which events and properties you should be capturing, and how to prioritize them for instrumentation. Learn more about this process in our Help Center article on creating a tracking plan in Amplitude Data.
Keep it simple and consistent
Event and property names should be simple and self-explanatory. Just as with writing code, establishing a set of conventions from day one will make your data easier to understand for everyone at your company. This includes naming conventions for your events and properties, which you can configure in your account taxonomy.
Identify users correctly
When identifying users, avoid using email as the distinct ID. Email addresses change over time, and when that happens, your analytics will become less precise and reliable. Instead, use the same UUID you use in your database. And make sure to alias users once they've logged into your product, to associate previous anonymous events.
Determine where to capture events
You’ll need to choose where to capture your events—on the server or the client. While capturing events on the server is more reliable, it offers less access to information about the user such as IP, user agent, referrer, and UTM parameters. And tracking events on the client side can leave them vulnerable to things like ad blockers. We recommend tracking any key events on the server, and only capturing events on the client when you need to understand the context surrounding that event.
Add event properties and user properties
Use properties to articulate all the details associated with an event or user. Properties describe the context of the data, which allows your analysts to group, filter, and create cohorts. Properties fall into two camps: event-specific (like the revenue associated with a purchase event) and user-specific (like demographic information about a user). Most events and users have multiple properties associated with them, but again, keep it simple.
Separate development and production environments
Don't dirty your production data by sending events from your development environments. Make sure to use separate access tokens, which can be configured in Destinations in Amplitude.
QA analytics in CI/CD
Run ampli status to lint the source and verify that the implementation matches the spec. No more fixing analytics bugs or having to manually QA analytics.
Assign an owner
Lastly, assign someone on your team to take ownership of the tracking plan. Without an owner, you increase the risk of your tracking plan falling out of date, which will degrade your analytics quality.