This article will help you:
|
All Amplitude charts are built using three information panels. These panels are called modules, and while their specific function can change from chart to chart, they follow some general guidelines:
- In the upper-left is the Events Module. This is where you’ll select the Amplitude events you want to include in your analysis.
- In the upper-right is the Segmentation Module, which is where you’ll define and identify the specific subsets of users you’re interested in learning about.
- At the bottom is the Metrics Module. The appearance and features of the Metrics Module varies widely from chart to chart; for that reason, this article will focus solely on the Events Module and the Segmentation Module instead. You can find out about the Metrics Module for a specific chart type by reading the documentation for that chart.
Events module
Events are the heart of any Amplitude analysis. An event is an action a user takes in your product. This could be anything from pushing a button, completing a level, or making a payment. You should aim to track between 15 and 200 events to develop a full understanding of how users are engaging with your app.
Amplitude can also track inactive events, or actions that are not taken by the end user, but still occur within the app or website. One example might be a push notification sent by the app.
NOTE: To learn about configuring inactive events, see our Help Center articles on Amplitude’s Govern feature.
Add events to your analysis
To add an event to an analysis, navigate to the Events Module and click Select Event. This will bring up a list of all available events. You can add up to 10 events to an analysis. An event must first be instrumented before it will appear in this list. To learn more, see this article on managing events.
NOTE: Because they are designed for different types of analyses, Amplitude’s User Composition, User Sessions, Personas, and Compass charts do not have an Events Module. For more information on how to build analyses using these charts, click through the links above to view the documentation.
In addition to the product-specific events your team will instrument, there are five default Amplitude events:
- Top Global Events: Queries on the top ten active events by volume with the highest counts, over the time period selected, for all users in your project.
- Top Events for Segment: Queries on the top ten active events by volume with the highest counts, over the time period selected, for a particular user segment defined in the segmentation module.
- Any Active Event: Queries on any active event over the time period selected. For example, if you want to view your daily active users, select Any Active Event and change the measurement in the bottom module to Uniques.
- Any Event: Queries on any event over the time period selected. This includes non-active events.
- New User: Queries on new users over the time period selected. For example, if you want to view daily new users, select New User and change the measurement in the bottom module to Uniques. A user is considered to be "new" the moment they send their first event to Amplitude.
- When '[Amplitude] New User' is used in a chart, the chart will consider all events that were performed by the New User during the interval (day/week/month) that they are new. For example, in an Event Segmentation chart, if you compare "Uniques" vs "Event Totals", you may see a higher count of events than the number of new users.
Add conditions to your events
You can refine your events using the where or group by specifications. Both use event properties or user properties to affect your analysis, but they do so in different ways.
The where specification conditions your event on an event property or user property that you select. Amplitude will limit the results to those with properties that matched the condition(s) you specified at the time the event was fired.
For example: let’s say you wanted to limit the scope of an event to those that were fired from an iPhone. You’d use the where specification to tell Amplitude that, for this particular event, you only want to count those that came from an iPhone.
The properties you have available will depend on the nature of your product, and on the specific information you think is necessary for understanding a particular event. Some common event properties among Amplitude customers include cause, description, category, type, duration, level, % completed, count, source, status, from, number, lives, authenticated, error, rank, action, and mode. Common examples of user properties include locale, referral source, plan type, number of photos uploaded, number of units of in-game currency, and current level in a game.
If you have more than one event in your Events Module, using the where specification on one event will not affect any of the others. You’ll have to add conditions to each event individually.
The group by specification also uses these properties. However, instead of limiting your results to those that match your conditions, group by will break out your results based on the property you selected. For example, if you were to tell Amplitude to group by country, the metrics module would show you results for each individual country (or, to be more technical, for each instrumented value of that property for which there were any results).
Some things to be aware of:
- You can only group each event by a maximum of two properties, and the graph displays the top ten property value counts by default.
- Amplitude records event and user properties at the time an event is triggered. This can lead to situations where the returned value for the property is no longer the current value.
Segmentation Module
Events, as important as they are, are only half of the equation. You’ll also need to specify the users whose behavior you’re interested in analyzing.
Amplitude’s Segmentation Module lets you create groups of users to analyze. These groups are called segments, and they can be as broad as your entire user base, or very narrowly tailored to match a highly-specific set of user properties.
NOTE: Because they are designed for different types of analyses, Amplitude’s Personas and Compass charts do not have a Segmentation Module. For more information on how to build analyses using these charts, click through the links above to view the documentation.
Also, be sure to see our Help Center article on the advanced features available through the Segmentation Module.
Create a user segment
The first step is deciding which category of users your segment will draw from.
If you select Any Users, your analysis will include all users who have fired the events you’re interested in. This is the broadest possible choice.
You can narrow the focus a bit by selecting Active Users. Amplitude defines an active user as one who has logged at least one event during a specified time range. When you choose this option, Amplitude will look at events fired by any user who was active during the days, weeks, or months covered by your analysis.
Even more specific is the New User option. A new user is defined as a user who logs an event in Amplitude for the first time. When you opt for this selection, Amplitude will look at events fired by these users during the interval—days, weeks, or months—in which the user was new.
For example: If a user was new on July 17, and you set your analysis interval to Daily, only the events that were fired on that same day—July 17—will appear on the chart, regardless of whether that user also fired events the next day.
Finally, if you have the Accounts add-on, you can also select any of the custom groups you have instrumented in place of Users.
Once you've decided how to measure your users, use where and who performed clauses to define your users.
Important Notes
- Segment definitions reference the user property values at the time of each event.
For example, if you have a user who performed an event whereCity = Amsterdam
and then most recently performed an event whereCountry = United Kingdom
, and you add a segment "where City = Amsterdam" to the chart, only the events that the user performed whereCity = Amsterdam
will be included in the chart. If it is necessary to query on an event based on the user property, make sure that the user property is set prior to the user logging that event. More information can be found here. - If you segment by
Device ID
,Event ID
,Latitude
,Longitude
,Server Upload Time
,Session ID
,User ID
, orID
, you will need to input the exact values that you are looking for due to high cardinality of possible values. You will not be able to group by the user propertiesEvent ID
,Latitude
,Longitude
,Server Upload Time
, orID
as well.
You have now created your first user segment.
Modify a segment
The segment you created in the previous section is perfectly functional. Depending on the breadth of your analysis, it may be all you need. But many Amplitude users prefer to drill down more and create user segments based on specific combinations of properties. The Segmentation Module gives you all the tools you need to define user segments with a high level of precision.
To apply a filter to your user segment, follow these steps:
- Click +where.
- Click Select user property... and select the user property or behavioral cohort you want to add to the filter.
- Select the value of the user property you want to include (or specifically exclude).
- Then, select the operator that will define how this property is used in your filter: is, is not, contains, does not contain, less/greater than (or equal to), set is, set is not, set contains, set does not contain, and glob match.
NOTE: If you enter more than one property value, the operator acts as an OR statement. To create an AND statement, add another "where" clause.
- "is" or "is not”: Use the is or is not operators to include or exclude exact property values in your segment definition.
- "contains" or "does not contain": Use the contains or does not contain operators to include or exclude property values with a specific substring in your segment definition. This operator is not case sensitive.
- "set is" or "set is not": Use the set is or set is not operators to include or exclude specific array sets.
- For example, you could define a segment that includes users with an array set of 'Movies' and 'Music' as 'Interests' {=}(set is) 'Movies, Music.’ This means that the user's array set must exactly include 'Movies' and 'Music'. So, if the user only has 'Movies', then they would not meet the definition. Likewise, if the user has 'Sports' in addition to 'Movies' and 'Music,’ they would not meet the definition.
- "set contains" or "set does not contain": These operators match list values containing all the selected values, or list values that do not contain all the selected values, respectively. This is useful to see, for example, people who belong to multiple A/B test groups.
-
- If you are trying to exclude certain values from a property array, use "set does not contain."
- If multiple values are selected, these operators apply an 'AND' statement on the values e.g. if the condition is set as "set does not contain" group A and group B, a user needs to be NOT in group A AND group B to be excluded. If you want to apply an 'OR' statement, multiple "set does not contain" filters need be applied.
-
- "glob match" or "glob does not match": Amplitude has a simple version of regular expressions that allows you to match or exclude strings like "/org/*/chart/*" where * is a wildcard. You can also enter strings like "*[0-9]" or "[!a-z]*" to match values that end in a digit or start with a non-letter. Here is more information on glob matching.
-
- The asterisk only matches non-"/" characters. To search for strings that contain "/", use two asterisks instead. For example, if your URL format is
www.example.com/blogs/blog_id
, and you would like to filter all URLs that contain the word “blog," use glob match and enter**blogs**
.
- The asterisk only matches non-"/" characters. To search for strings that contain "/", use two asterisks instead. For example, if your URL format is
-
For more information, see our Help Center article on how array operators work in Amplitude.
You can also change the name of your segment by hovering over its current name and clicking it. Note that this will also change the segment’s name in any charts already using it.
Using an OR clause
To filter on multiple values of the same property, simply add more values in the Select value(s)... box. This creates an OR clause in the segment’s definition. In the screenshot below, the segment now includes users who fired an event in the United States OR Canada OR the United Kingdom.
NOTE: This does not apply when you have set your operator to "set is" or "set is not".
Using an AND Clause
Adding another filter creates an AND clause to your segment definition. To add additional filters, click +where. In the screenshot below, the segment definition now includes users who fired an event in the United States AND using French.
Add more segments
Amplitude doesn’t limit your analysis to a single segment. To add additional segments, click + Add Segment. Here, there are two segments to compare: one that includes users in the United States, and one that includes users in Canada.
Group by user property
Like the Events Module, the Segmentation Module includes a group by function.
If you have only one event in your analysis, it doesn’t matter if you use group by in the Events Module or in the Segmentation Module. But if your analysis includes more than one event, applying a group by condition from the Segmentation Module will apply that condition to all the events in your analysis. If you don’t want that, then apply the group by condition in the Events Module, on an event-by-event basis.
NOTE: Using group by in the Segmentation Module limits your analysis to one user segment. If you need more user segments, apply group by conditions to each event in the Events Module.
Your chart will display the top five segments by the measurement selected. You can add or remove segments to the chart via the data table below it. In the example below, the analysis groups by device family. The graph shows the number of daily active users in the last 30 days, grouped by the device family they used.
NOTE: Users can fall into multiple segments if they have multiple values for a property in this time period.
Additionally, you can add more than one group by conditions.
Save a user segment
Once you’ve created a user segment, you can save it for re-use in another analysis. Saved user segments are globally available for other team members to use.
To save a user segments, click Saved Segments. Next, click Save Segment and follow the prompts in the window that follows.
You can also search for previously-saved segments through the Saved Segments dropdown. Select the one you need from the list to load it.
To make a segment your default segment—in other words, the one Amplitude automatically loads when you create a new chart—click "Set as default" next to the segment's name.