For Developers / Instrument your app |
Track user actions within your app by tagging events. Good event tagging is critical to having a strong understanding of your users.
Events are used to describe interesting actions that happen within your app. Unlike the default metrics Localytics collects, such as sessions, new users, or phone model, events are custom to each app and supplied by you. Events give insight to the specific in-app actions users take such as article reading or posting to a social network. Additionally, events are used in Funnels to determine drop off and conversion rates toward specific goals.
Events are also used to define User Segments that help identify different usage patterns and answer questions like “which readers this week have watched a video but never commented on a story?” Events are a critical component of identifying users to target with relevant and specific in-app messaging.
You tag specific events in an application using a string describing the event. This is particularly useful for answering business questions and design questions such as:
Tagging events is the most important component of a successful analytics integration. While your first impulse might be to tag every action in the application, that approach will make it difficult to find the answers to specific questions.Instead, Localytics strongly encourages the following approach:
Now you have a great starting point for events to track. You will find that many requirements can be covered in just a single event. Many well-tagged apps have less than 30 different event names.
When tagging events, use constant strings defined at compile time. This is advantageous because it avoids the risk of collecting personally identifiable information, it is more efficient, and it guarantees that the charts in the dashboard won’t have too many events to be actionable. In some cases it is acceptable to create these strings dynamically. For example, consider a game with an infinite number of levels. It might be appropriate to record an event named START_LEVEL_X (where X is the current level) every time a user reaches a new level.
Your event names have a big impact on the Dashboard experience. If it's hard to find specific events, then it's hard to answer specific questions. We recommend the following naming conventions.
To make tagging work for you, keep the following points in mind:
Tag events as late as possible. Rather than record five different events to summarize an action, using one event recorded at the end of the action puts all the analytics coding in one place and makes the Dashboard experience very easy. This approach is most successful when attributes are heavily utilized to capture every nuance of the event. Common examples of this approach include:
Localytics provides a separate tagScreen() call to help you identify users’ flow through the app. Typically it is best to treat screens and events as separate concepts. However, sometimes screens do need to be tagged as events so they may be used in funnel analysis or to help product teams understand screen layout and interaction. In these cases, it is still best to tag the event at screen exit with as much information as possible. But do not just tag every screen as an event, as it is redundant information already captured in the tagScreen() call.