The Insights report is the default report all users see when navigating into Mixpanel. This report gives users a powerful tool for exploring their data. The series of videos presented here is meant to give an in-depth look into the different features available, helping users quickly get up to speed on what is possible in Insights.
Total Duration: ~30 minutes
Hey everyone. My name is Mikey and I am a product trainer here at Mixpanel. In this series of videos, we are going to take an in-depth look at the Insights report. The Insights report is one of the primary reporting tools used for exploring your data. It can be used to analyze your data in a variety of ways including segmentation, charts, graphs, and formulas.
Before we get too far into the material I want to take a minute to go over some course logistics and see what we will be getting into.
The goal of this course is simple, to help you become an expert in building reports using Insights. By the end of this course, you will be familiar with the various options available in the query builder as well as the different visualization tools we have in the report.
I’ve broken down the material into a series of videos that allow you to easily jump to the sections you are interested in. Under the video in each section, you will see a brief list of the topics discussed with links to help quickly navigate to that section of the video. I will also include some links to additional help material for topics I mention but may not cover in complete detail.
As you can see we have quite a bit of material to cover but before we get started I want to take a quick look at the project we will be working out of, Music Finder. The Music Finder application is a simple hypothetical music streaming service where users first need to sign up and then they can play or purchase songs and albums. The Music Finder project we will be using is pre-populated with user data from this hypothetical app.
And with that, let’s go ahead and dive into the Insights report!
- Selecting events and people properties
- Function dropdown menu options
- Breaking events down
- Comparing events
- Time selection options
- Reset your query
Let’s start our discussion of Insights with a brief description of how the report is structured.
When we hop into Insights, we can see the interface is broken down into two main sections. The top section is the query builder - this is where we will be selecting the data we want to take a look at. Here we can select from the different events, properties, and date ranges available in our Mixpanel project. The bottom section is where we will see the results of our query and where we choose how to view the selected data.
Initially we are met with a default query. The default query for Insights consists of our Top Events in the past 30 days. Top Events will display up to the 12 highest volume events for the time period selected.
Now that we have an idea of how the report is generally structured, let’s start with how to build our own custom query.
To begin building a custom query, we first need to select the event that we want to see. Clicking the current queried event will bring up a drop-down menu that contains the event and user data in our project.
Event data consists of the events and event property information sent to Mixpanel whereas users will contain any people properties we have set for users in people profiles. Any custom events created will also be available for use in analysis under the event tab.
Let’s say we are interested in the Song Play event. We can select this event from the dropdown menu or search for it by typing in the event name. With the event selected we see that we are looking at the total number of Song Play events in the past 30 days. Total here means that this is looking at all instances of the event, regardless of who triggered it. In this case, there were around 1700 Song Play events triggered in this time period total.
There are several other ways we can choose to analyze the Song Play event information in Insights. The function dropdown menu will reveal these options. They are Unique, Average, Median, Min, Max, Daily Active Users (DAU), Weekly Active Users (WAU) and Monthly Active Users (MAU). Uniques represents the number of users who triggered an event and is based on an identifying property, by default Mixpanel uses the distinct_id as this identifying property for uniqueness.
As we saw there was a total of roughly 1700 Song Play events in the past 30 days. When we change the total value to uniques we can see that 100 unique Song Play events are tallied. Another way of thinking about this is that 100 users triggered 1700 Song Play events in the past 30 days. The average option shows the average number of times an event was triggered by an individual user or the total number of Song Play events divided by the unique number of Song Play events. In this case, averaging to about 17 songs played per user.
The concept of uniques extends to the Min, Max and Median options as well. Each of these options look across all the unique users who triggered an event. Max will look for the user who triggered that event the most and then return the number of times the event was completed by that unique user. Min works similarly for the user with the minimum event triggers and median returns the median value across all unique users.
The daily, weekly, and monthly active users options will automatically create a line chart that calculates the number of unique active users for each time intervals (the day, week, or month) of the date range selected. For more information about how these values are calculated please check out our help documentation.
Let’s stick with the total number of Song Play events and go ahead and dig into this data a bit more. The Insights report gives us two options to take a closer look at our data, Breakdown and Compare. The Breakdown option will allow us to group the data by the event properties, people properties, or even the different cohorts we have set up. For the event and people properties, if the property values stored are the same they will be grouped together in the report. The cohorts option lets us compare users in the selected cohort to all users. Let’s use breakdown to take a look at the different Genres for the Song Play event and then also group these events based on the Plan Type the user has using the Plan Type people property.
Just a quick note, you may have noticed, when hovering over these properties we can see some information about the event displayed next to it. This information stems from the projects Lexicon which can be found under the Data Management tab. Lexicon is a great tool that can be used to keep Mixpanel data clean, organized, and easy to use and I highly recommend taking some time to check it out in your own project when you have an opportunity.
Back to our Insights query, when hovering over the event and properties selected, we see that it is possible to change the breakdown order for the properties and to remove properties or events with the options presented next to the event or property in the user interface. Let’s move the Plan Type property breakdown in front of Genre. We see that the order of the broken down results below has changed corresponding to this move. Next, let’s remove the Plan Type breakdown entirely.
As mentioned, we can also breakdown by our Cohorts. For this example, let's look at our New Users Cohort. When breaking down by a cohort we have the option to look at users who are either in or not in the Cohort and Mixpanel will display our selected Cohort’s results and as well as results from All Users.
We can take this query a step further and see how the Song Play event compares with the Song Purchase event using the Compare option. The properties we are breaking the Song Play event down by are now also applied to the Song Purchase event. And with just those few clicks, we can see which genres of music our users are playing the most and compare this to the song purchase habits of our users.
Now imagine we want to focus in on a specific subset of this data. Mixpanel gives us the ability to do this with the Filter function. In the Filter menu we see that it is possible to filter by either a Cohort or an event or people property defined in our project. Here we can filter by the Plan Type property where the value is equal to Premium to see Song Play and Song Purchase instances where these events were performed by users on a Premium plan. Then we can remove the New User Cohort breakdown and add an additional filter to see only users in our New User cohort.
Next, let's take a look at the different options available in the time selector. Currently, this is set to the past 30 days but in this menu we see a variety of pre-set options and the option to select a date range. The select date range menu opens up some additional options, in the last, between, since, and on. In the last will allow us to make a time range similar to the default in the last 30 days but it gives the option to choose the time value and scale ranging from hours to days, weeks, or months.
The between option allows us to specify two dates to query between. There is also the option to make this a rolling date range meaning the dates used will adjust relative to the current day so if today we set the date range to be between 1/3/19 and 1/7/19 tomorrow the report will query between 1/4/19 and 1/8/19.
Since and on a date both function as they sound. Since will query the data collected on or any time after the date selected and the on option will query only the data collected on that specific day.
One final piece of the query builder to be aware of is the small x seen in the top right corner. This is the reset query button and it will completely clear the query we have been working on to give us a brand new Insights query to work with.
- Mixpanel data types
- Different filter options
- Summing properties
- Numeric operator dropdown options
In this video, we will be looking a bit deeper into some of the features available in the Insights report. The features we will be looking at here can be used to help with things like correcting small errors in data from an implementation mistake or finding total time or revenue recorded by a specific event.
Let’s begin by taking a closer look at event and people properties and how they can be manipulated when filtering and breaking events down but before we jump back into the Insights report we need to take a quick look at the different data types Mixpanel uses.
Mixpanel supports 5 different data types, strings, numeric values, booleans, dates, and lists. Mixpanel handles each type of data a little bit differently when breaking them down and each data type has its own different set of filter options available in the UI. There are sometimes instances where we would want to use the filtering options available with one data type even though the data is being sent into Mixpanel as another type or we may want to change the way Mixpanel displays data in our report when breaking things down.
To handle cases like these, Mixpanel gives users the ability to typecast or change the type of a property from one data type to another. Let’s take a look at a few examples where typecasting can be really helpful.
Alright, now that we are back in Music Finder, we are going to take a look at the Album Purchase event to try and see what the prices are for the different albums being purchased. This event has the Price property associated with it sent in as a numeric value. By default for numeric properties, Mixpanel will look at the range of values for the property and bin the values into buckets. This behavior is not helpful in our case as we are interested in seeing the actual prices paid for each album instead of how many fall into the different ranges of prices.
Typecasting can help here because string data types in Mixpanel will display a property value exactly how it was sent to Mixpanel. Clicking back into the Price property we see the Typecast option. This will display the different typecasting options, String, Number, and True/False. If we select the string type we see that the Album Purchase event is broken down by the exact price of the album instead of being binned. If we were interested whether or not the property existed as a non-empty value on all Album Purchase events, we could use the True/False option. Typecasting to that changes the property to the boolean type, returning True if the property is set with some value and False if it is not set or has an empty value.
We can also typecast when using filters. Let's take a look at the Album Publish Date event property on the Album Purchase event. Here we have accidentally had sent this property to Mixpanel as a unix timestamp instead of the recommended YYYY-MM-DDTHH:MM:SS date format. Mixpanel will interpret the unix timestamp as a number instead of a date automatically and we will not be able to use date type filter options with the data as is. We can typecast Album Published Date to a Date type property by clicking the property name in the filter and then selecting Datetime from the dropdown. This will force Mixpanel to interpret the timestamp as a date and allow us to use the date filter options when working with this property.
Another advanced query builder feature to mention is the ability to sum numeric properties.
Going back to our Album Purchase event with the Price property, let’s say we want to know the total revenue from albums purchased in the month of March. In Insights it is possible to sum numeric event or people properties. For people properties, we can select the property under the user tab. For event properties, search for the event that the property is on, in this case, Album Purchase and when hovering over that event there is the Properties button on the right-hand side. Clicking into properties lets us select the property we want to sum.
By default we see the total sum of each Price property value across all Album Purchase events in the time period selected. In the numeric operator dropdown menu we get some different options including Average, Median, Min, Max, P90, or P99. Each calculates what the name implies based on the event or people property selected. P90 and P99 refer to the 90th and 99th percentile of the data respectively.
Formulas in Insights
Hey everyone. In this video, we are going to be taking a look at the formulas functionality in our Insights report. This tool will allow us to create some pretty cool custom formulas using simple mathematical operators and the event or people data in a project. Let's go ahead and dive into our Music Finder project to see how formulas in Insights works.
To create a formula in the Insights report we first want to select the events or people information to use in the formula. In this example we will be looking at two events, “Song Play” and “Song Purchased”.
Once the events of interest are selected we can create a new formula by clicking the Add Formula button seen here. In the Formula builder, we reference the events as variables in the formula using the letters seen just to the left of the events. Mixpanel formulas will allow us to use simple arithmetic operators like Addition (+), Subtraction (-), Multiplication (*), and Division (/). We can also use parentheses to determine the order of operations if need be.
Let’s say we are interested in the ratio of the number of songs played to the number of songs purchased. We input the formula using the variable letters and then can give the formula a name to display in the report. If no name is given, it will default to the formula we entered. We can use numbers as constants in formulas as well, for example, if we wanted to view a ratio as a percentage we can multiply by 100.
Now we can see the formula we created below displayed in the Insights report. We can dig deeper and break down the formula by a property to see how this ratio compares across different values. Filters can also be applied to display a particular value of interest.
We can display more information like the raw events numbers or additional formulas using the Add Formula button. These formulas can use some of the different visualization options and can be added to the Dashboard or Saved for easy viewing later.
And there you have it, formulas in Insights.
- Compare to past
- Bar chart
- Analysis Options
- Value Display Options
- Line chart
- Drill down (zoom) into chart
- Pie chart
- Table view
Now that we have seen how to build different queries in the Insights report, let’s take a closer look at the different options available to customize the way we are viewing our data. By default, the Insights report will display as a bar chart with events listed in descending order based on event volume. As we will see, there are a lot of different ways to view our data in Mixpanel so let’s dive in.
First let’s take a look at the Compare to past feature. Compare to past will allow us to look at data from two different time periods on the same chart. The Compare to past menu gives us several preset options and the ability to select a custom date range for comparison.
The date ranges used for the comparison are based on the time period selected in our queries time section. For example, imagine today is 2/11/19 and we are looking at the top events for the past 30 days and we selected the compare to the previous week option, the initial query would be looking at the 1/12/19 to 2/11/19 time period and the compare to past query would be from 1/5/19 to 2/4/19 - still a 30 day time period but with the starting and ending dates a week prior to the initial query. Hovering over the results in the chart will display the starting and ending dates for the query being made. The Compare to past feature is available when using the bar, line, and table views in Insights.
Now let's take a closer look at the different chart types available in Mixpanel. Starting with the bar chart, we have the option to create a regular or stacked bar chart. Hovering the cursor over the bar will give us some details about the property or event we are viewing like the event name, absolute count and relative percentage. If we want to change the order in which results are displayed there are some different sorting options available. We have the option to sort based on alphabetical order or the value associated with the event or properties being used. These columns can also be resized by dragging the column border. The column with Linear in the title is where the analysis type is displayed. It is possible to change the sorting order based on value when we click this column header.
The three vertical dot menu in the right-hand corner of the analysis type column header will display an additional menu that will allow us to select from the different analysis types and choose the way our values are displayed.
The analysis options will determine the way the chart is calculated and visualized. The options are Linear, Rolling, Logarithmic, and Cumulative.
Linear is the default value and uses a standard linear scale, increasing at a regular interval. When using the Rolling option Mixpanel will calculate the rolling average based on the chosen time units (hours, days, weeks, months) for the entirety of the viewable date range in the graph. This analysis type is good for removing spikes or noise from data. Logarithmic is a nonlinear scale based on orders of magnitude so each equidistant mark on the scale is the value of the previous mark multiplied by some constant. Mixpanel uses a base of 10 for its logarithmic option. Finally there is the Cumulative option which adds the values of each point up as the graph moves along, resulting in a line that increases over time. The Bar chart can only use the Linear and Logarithmic options.
For the value display, there is the option to view the results as the absolute number or a relative percentage. The absolute number shows the numeric value of the different event or property values chosen. The relative percentage will show the percentage of the whole that each value represents. Looking at our example query of Song Play broken down by Genre in the past 30 days, we can see that there were 1702 songs played total and of those 1702 songs 559 were in the Rock genre. The absolute number would be 559 but the relative percentage would be (559/1702) * 100 or 33 percent of Song Play events in the last 30 days were Rock songs.
The final piece of the bar chart UI to look at is the legend. The legend will appear when we use the Breakdown option and it will list the different values for the properties in the breakdown. In our current example, we have the Song Play event broken down by Genre. Let’s remove the Genre breakdown and use a higher cardinality property like Email.
Now we see that the chart is limited to 24 different bars by default. We can remove results from the chart by unchecking the box or we can use the More option and check additional boxes to add more results to it. The unchecking of the boxes in the legend to remove property values will not persist in saved reports or if the report is reloaded.
To remove a value in a method that persists beyond this page we would need to add a filter. The bar chart legend has a cool little feature that will allow us to quickly make a filter from the legend by clicking the x that appears next to the value when hovering over it. As we can see a filter for email does not equal email@example.com has appeared in the query builder.
The next chart type is the line chart. With the line chart we have the option to view the data as a regular or stacked line. The line chart behaves a bit differently from the rest of our visualization options in that it shows the data aggregated in increments of hours, days, weeks, months or quarters in the time period selected, instead of summed into one value for the entire period. For example in the chart here, we are looking at the data from the past 30 days but instead of the aggregate number over the entire 30 days we see the number of Song Play events for each individual day over the past 30 days. To change the time increment used in the Line chart we select the value from the drop-down here. Changing this value to weeks, now each week's totals are calculated.
This behavior is especially important when looking at unique values. Imagine we are still looking at data over the past 30 days, with the bar chart Mixpanel will look at all users across the entire 30 day period and count how many unique users there are for that event. If we changed to a line chart for the same 30 days with a daily interval, Mixpanel instead looks at each individual day in the past 30 days and counts how many unique users are present on each day. This means that each day the unique count is reset so the same user can count on two separate days. For example, a user could do a Song Play event today and yesterday and will be counted on each day as a unique user in a line chart, as opposed to one user over the entire 30 days in the other charts. This means summing uniques from each day in a line chart would not be the same thing as looking at uniques looking across the 30 day period as a whole.
With the line chart we again have the option to sort the events and properties from the analysis type column and this time all four analysis options are available in the three vertical dot menu.
There two line chart specific features to mention as well, the ability to add annotations and zoom in on sections the chart. Annotations allow us to add a note to a specific datetime in the line chart. These can be added by hovering over the date values on the x-axis and clicking the blue plus symbol that appears. From there we can select a date and time the annotation should apply to and then add a description. An important note here is that only users with project admin access or higher will be able to create, save and delete these annotations.
With the line chart, we may want to take a closer look at certain sections of the chart and this is where the zoom feature comes in handy. To zoom into any part of the chart quickly we can click on the chart where we want the new starting point to be and drag the cursor to the stopping position like so. To zoom back out we just click the reset zoom button that appears in the right-hand corner. This is a great way to view a time period in greater detail without having to go back to the query builder and change the time selection.
Next up is the pie chart visualization. The pie chart will show up to 20 different segments in the chart by default. As with the other visualization options, the legend appears when using the breakdown option and we can again add additional segments by clicking the More button and checking additional values. The hiding of segments is a bit different in that unchecking the value in the legend means that value will be added to the Other section of the pie instead of removed from the chart. A filter needs to be added if we did not want the value to appear in the results at all.
The number in the center of the pie chart represents the sum count of the different events being looked at. So for example, right now we are looking at the total number of Song Play events in the past 30 days, 1702 as seen here. If we were to compare another event in the query, lets say total Song Purchased, then the middle number would be the total Song Play event count plus the total Song Purchased event count, or 1702 + 319, for a total of 2,022. Like the bar chart, hover over the slice of the pie to get more information like exact count, the relative percentage of the pie chart total, and the event or property name that portion represents.
Last but not least is the Table view. As the name implies this shows the data in a table and is great for viewing high cardinality properties as we are able to view many more unique values in this view than the others. Sorting data alphabetically and by value is still possible but in this view, we just need to click on the column headers. If it is a text column it will sort alphabetically and for numeric entries, it will sort by value.
Saving and Downloading Insights Reports
At this point we have spent some time building the right query and have configured the visualization options to our liking to get that perfect Insights report. After spending all that time and effort building a report we want to make sure we don’t have to go back and do this again every time we want to see this particular data.
We can save reports in Insights by typing in the name we want for our saved report in the box seen here. As an example let’s look back at the total revenue on the Album Purchase property from one of our previous videos. We quickly create this report with the Price property on the Album Purchase event and let's make it a line chart to see how revenue varies daily. Now we will want to save this report so we can quickly return to it.
Let’s give the report a descriptive name, Album purchase revenue - past 30 days and then click the save button when we are done. The saved Insights reports can be accessed via the Saved Reports button in the top right-hand corner of the report here. We can make changes to the report and Save it again from where the report name is set or we can have the altered report be a new saved report with the Save new option.
Insights reports can also be added to the Dashboard for quick access and viewing. Adding reports to the Dashboard can be done by clicking this button and selecting or creating the Dashboard we want to add the report to. Think of the dashboard as a place to view important metrics at a glance and quickly navigate to those reports should we want to take a closer look.
In addition to being able to save reports, we also have the ability to export results directly from the Insights report. The Download button gives three options, Download PNG, Download PDF, and Download CSV. The Download PNG and Download PDF options will create a screenshot of the report and download it in the format mentioned.
The Download CSV option will allow us to download the results of Insights reports in CSV format. This feature is particularly useful when working with higher cardinality properties that may be difficult to view in the UI. The API used to build reports is limited to 10,000 unique rows of results so if we were working with extremely large datasets it may be necessary to try and break the data up into chunks with smaller date ranges or look into using the JQL tool to export the results.
Wrap Up and Course Feedback
We have reached the end of our deep dive into the Insights report. I hope after watching these videos you feel that you have a good grasp on the different features available in Insights and how to use them.
Please use the buttons below to let us know whether or not you found this course helpful. If you would like to provide any further feedback on this course, or if you have any suggestions for additional training resources, please reach out to us at firstname.lastname@example.org.
Thank you for watching and best of luck as you continue your Mixpanel journey!