If you've built a website any time since about 2005, you've probably used Google Analytics. You add a snippet to your page and you magically have access to pageviews, bounce rate, customer location, browser, device, and many other pieces of information. This is a good starting point, but there is so much more that can be done with analytics.
Two common tools are Mixpanel and Kissmetrics, which give you deeper insights into customer behavior and conversion rates. If you're a lazy programmer and you want to pawn even tracking off on non-technical people, Heap Analytics is a great option since it tracks all events and lets you define them on a graphical user interface after the fact.
Any tool you choose will be fine. They've all converged on some of the same basic functionality that we'll need.
Developers who are new to analytics often take the "analyze everything" approach, where they want to track every event and user interaction down to the last excruciating detail. While this approach has its advantages, it's usually better to take a step back and think about what you hope to accomplish with your analytics.
If you have an e-commerce site, your goal is to get as much revenue as possible. You will want to track the series of actions that users take that lead to a purchase.
If users that come from a particular source (Google ads, Facebook ads, organic traffic) have a particular affinity to certain products, then you need to know that. If users often get frustrated and leave because they have too many menus to click through, then you need to know that.
Everything you do will be focused on how to get customers to make purchases and turn the average visitor into a customer.
We are building a business-facing chat app, so our goals are different than the goals of an e-commerce site. There are really two things we want to track:
We will go over each of these independently at a high level.
Conversion tracking lets you know how effective certain things are in your site at turning a potential customer into a paying customer. For example, it's worthwhile for a marketing team to know which of their ads are the most successful both in terms of allocating their budget and adjusting their messaging.
A typical way to track conversions is to keep track of a variety of UTM codes. UTM stands for "Urchin Tracking Module", which is from a company that Google bought and they decided to keep the name.
There are 5 universal UTM codes. They are:
utm_source: identifies the source of the traffic (for example, Google)
utm_medium: identifies a medium, such as email, newsletter, etc
utm_term: identifies the search term used to get the user to click on the ad.
utm_content: used for A/B testing to differentiate between two pages that link to the same url. This is not used very often.
utm_campaign: identifies a broad campaign that your ad is a part of. For example, "spring_sale" could be the overall campaign.
Within Mixpanel, you can use these UTM codes to track which ads are the most successful.
To achieve reasonable conversion tracking, we're going to need to track the original source of the traffic and follow that user through a series of events that lead us to the desired action.
So, an example funnel for conversion tracking would be:
utm_source=google?utm_term=phoenix+tutorial that was appended to the link and tracked by Mixpanel.At every level of this process there is something that could go wrong and therefore something to learn.
At step 1, we know that the keyword was able to convince someone to come to the site. But perhaps the keyword was not as specific as it should have been and the user was actually looking for something else. If the user quickly leaves, it's safe to assume we did not target this properly.
Alternatively, if we chose a keyword such as phoenix tutorial free, we might be attracting the wrong customers, which is to say, only people who do not want to pay for tutorials. There's something to be said for the marketing effect of free lessons, but it's something to keep in mind.
At step 2, we know that the user viewed several free lessons. This tells us that the free lessons are useful for keeping the user's attention. If this user eventually converts, it means that giving her a sample of what the lessons are all about helped turn her into a paying customer.
At step 3, we see that the user went back to the homepage. And why would she do that? Well, it might be because there's no purchase button in the view she was in before. If there is significant drop-off between step 3 and 4, then maybe you should make it easier for someone to purchase your product, reducing the friction to make the purchase.
At step 4, the user has committed to making the purchase. But that doesn't always guarantee that the user will actually pay. Sometimes if you force them to go through a long signup process, you'll successfully convince them that it's not worth the time to fill everything out and they'll just leave.
And finally, step 5 means that you got a new customer. It's always worth your time to find customers who actually converted and backtrack their actions to see what converting customers so you might be able to garner some insights into how to turn other potential customers into paying customers.
Are new users more engaged than existing users? Are people in Australia more engaged than people in Texas? If so, why? Are users that receive direct communication from an admin more likely to be engaged? There are hundreds of useful questions you could ask.
For PhoenixChat, we also want to know if people are actually using the app. But not only that, we want to know how they're using the app. If we find that all of our customers are using a certain feature, but we are hiding that feature behind several layers of dropdown menus, then maybe we should move that item to somewhere more visible.
If you build out a feature (say, gamification or statistics), and you later discover that nobody is using it, that's helpful information. It tells you that you need to 1) figure out a way to make these features more interesting to your users, 2) easier to find, or 3) abandon them altogether and stop spending resources on something that nobody uses.
Feature usage also tells you what features are useful to your customers and what you should be spending your time on. If your customers seem to spend lots of time looking at their statistics, perhaps you should add fancier charts and give them more feedback about the performance of their posts. If users seem to send direct messages to each other on a regular basis, maybe you should expand chat into a standalone app with additional functionality.
Tracking feature usage is one of the keys to knowing how and where to pivot if necessary. You might find that you set out to build a social network, but your users are actually more interested in some small subset of your app, such as image sharing. You can either try to force everyone into the existing feature set (which is almost always wrong), or you can embrace the behavior of your users and focus your app on what they find most useful.
There are a seemingly endless number of options when it comes to analytics. Google Analytics, Mixpanel, Kissmetrics, Heap, Segment.io, Customer.io, Intercom.io, and dozens (hundreds?) of others.
At the end of the day, most of these are the 90% the same. They all track events and they all track user behavior and pageviews.
Almost every website uses Google Analytics. There is much more to Google Analytics than just the snippet of code that tracks pageviews etc.,
In the software space, the two big players are Mixpanel and Kissmetrics. The two are more or less identical with a slightly different user interface. They give you great reporting, deep user analytics, and a lot of other useful features--some of which we will go over later.
For this app, we are going to use Segment.io and Mixpanel.
Segment.io is an intermediary that separates your data from your analytics. You send all of your events to Segment.io and then have Segment.io pass that data to the analytics service you want to use. We are going to use Segment.io to pass data into both Mixpanel and Customer.io.
If you have a preference for Kissmetrics, feel free to use it. We are going with Mixpanel over Kissmetrics solely because it has a free tier. Also, since we're using Segment.io as a data-intermediary, there is nothing stopping you from using both. All you need to do is toggle the switch to turn on any number of analytics tools.
The next step is to actually integrate Segment.io and start tracking the usage statistics of our app.
Previous: Refactoring ReduxNext: Password Reset Link and Email