Analytics services. Customer analytics

Evgeniia Kuznetsova
Poteha Labs
Published in
9 min readDec 3, 2018

Answering the embarrassing questions you wanted to ask but were afraid to

Imagine yourself as an entrepreneur who has just launched a donut shop website or an educational mobile app. You are now interested in setting up a low-budget analytics to measure usage dynamics. Everyone around you is talking about Mixpanel, Facebook analytics and other services you have never come across. In this article, we will answer the questions in order to help you understand the basics of customer analytics.

So what is a client analytics service?

Nota bene! Client analytics service is a part of customer analytics and is NOT related to log collection and management. Log monitoring is usually a separate task or a whole service conducted by developers and focused on stability and performance. Customer analytics is in turn used to study user behavior within the website or app: how a customer acts, how often his actions repeat and how he reacts on push notifications or pop-up ads.

Globally, customer analytics is used both for websites and mobile apps. Despite interfaces and functionalities may differ a lot, analytics service settings and workflow would be almost similar.

What’s the purpose of using it?

Customer analytics is suitable for:

— monitoring user behavior while interacting with your service;

— making decisions on how to develop your service including new content and features;

— discovering customers pain points and generating insights on how to improve user experience.

How does it work?

In order to study user behavior, first of all, you need to collect data about historical behavior. But what exactly should you collect? This question contributes about 70% to the difficulty of the whole task.

Development team members have to join their forces and respond to this question together. These are obviously product manager, developers, analysts. On this step any mistake would cost a lot: by fault, you might not collect what you really need and instead collect the data which will be useless for decision makers.

After the team has defined which behavioral properties should be collected, the architecture for data collecting should be invented. The main object analytics services handle is an event. An event is a description of what has happened which is sent to the analytics service in response to the user’s action. As a rule, for each of the actions chosen on the previous step, an event is a JSON file with several fields which describe the action completely.

Wait… What is a JSON file?

JSON file is a text file which describes what has happened. For instance, it may contain information about that user called Mary has started the game at 23:00 on November 15. How to describe each possible action? If a user clicks the button, which properties should be collected? There are properties of 2 types:

— Super-properties which are common for all the events and are always present. These are definitely the date and timestamp, device id, API version, OS version, analytics service version.

— Event-specific properties which are arbitrary and should be selected with attentiveness. For example, for a button “Buy coins” in a mobile game these properties would be “Number of bought coins” and “How much the coins cost”.

JSON sample of an event a language learning app could produce

Ok, but why don’t we simply gather all the data?

Because all the events for the analytics services are created by hand. Analytics services don’t allow to “Save everything” (and that would be meaningless regarding the following processing). Only those events from your service flow which are interesting to someone in the team should be collected. Even not every state of a button or a window is worth collecting. For long processes (game levels, for example) only the beginning and the end of the process may be important with no interest in the process itself.

Generally, web and mobile services consist of objects called ‘entities’. Coins or game levels are examples of these entities. Thus events can be composed using entities, their possible states, and actions. Several game world examples of events: ‘level started’, ‘level finished’ or ‘level finished, reason: eaten by dragon’. For entities which can be ‘open’ or ‘started’ it is also better to create ‘closed’ / ‘finished’ states so as not to break the logic and over-complicate further analysis.

How many events should a complex mobile app create?

There is no exact number appropriate for everyone. We would say that complicated analytics services can handle hundreds of previously developed by team events. But still it depends on the business tasks, the expectations and on the time you may afford to spend on analytics. Anyway, you should focus not on the quantity but on the significance of those or other events.

What’s next?

Suppose we have invented a set of events of our interest. Now it’s time to gather the data. For this, you need to integrate analytics service into your website or app. Firstly, you should choose the analytics service. Here you may simply google free ones or immediately take one of the most popular services: Mixpanel, Yandex.Metrika, Google Analytics, Facebook analytics, Tune, Amplitude and so on. Secondly, you have to integrate analytics the SDK into your own code. This is why these services are called ‘client’ — because the SDK integrates directly into the client and there is no hassle with the server side.

Where is the data stored?

Every JSON file created by the app should be somewhere stored. Where should we put all the data and how? In case you choose client analytics, the service itself is responsible for storage. We know nothing about the storage, nor how large the data is neither the folder structure used there and, in fact, we don’t care.

Analytics service provides us with a corporate account where the results of the processing of raw behavioral data will be displayed. Next, analysts work with the metrics prepared in this account.

Free client analytics services usually don’t let users download raw datasets. However, such options are present in several analytics services (which are rather pricey).

How long does it take to set up analytics service?

Very simple service can be integrated within hours (Yandex AppMetrica, for instance) and will provide you with the basic metrics without any custom events. Time needed for complex service integration depends on the events you are interested in. Also, some difficulties which would require additional development may arise. Possible difficulties:

— If the events are ordered strictly, how to fix this order and the fact that one event can never come to analytics earlier than another?

— What if the user has changed time on his mobile phone? Or his time zone?

— How to collect the occurred events in case a user lacks Internet access?

On average, Mixpanel may be configured in a couple of days. If you are planning to specify and then collect loads of specific events, it may take up to a week.

How to choose analytics service which suits my website/app?

Homer trying to choose an analytics service

You may find that general statistics is fine in each of most popular analytical tools. It would be enough for marketing specialists and sales managers as all the basic metrics are in place (DAU, MAU, ARPU, retention). Simple landing page requires relatively light analytics service, for example, a Yandex.Metrika counter.

But when it comes to unordinary tasks, the choice depends on the website or app specifics. They define analytical tasks and events which should be processed in order to solve them. We’ll try to tell about several useful advantages of the popular services for you to simplify your choice.

For example, Mixpanel provides the split testing functionality. How does it work? Right in the Mixpanel dashboard, one should create a new experiment and several cohorts (A, B, …) within it. Then he defines a) which users should get into each cohort and b) the variety of values for the entity he is going to test. It means users from A will see button filled with, say, green and B cohort will receive blue button.

Since Mixpanel gathers all the data it can find device_id for each user in A and B. In the website or app code using analytics SDK its owner creates tweaks — special parts of code where values may change for testing. After that, for each user Mixpanel will substitute value (which is button color in the current case) depending on his cohort. If there is no internet connection, the user will be shown a default colored button.

Sometimes you may want not only to gather and explore the events but also to aggregate users. Mixpanel does have a tab ‘Users’ where you can find customer’s personal data (name, email, social net profiles) and look through his log history. These events also may be aggregated and form simple statistics: ‘100 times eaten by dragon’ or ‘bought 5 flowers’. Some services even allow to download this info.

Next, let’s switch to Facebook analytics. What’s its main competitive advantage? It unions website or app visitor with his Facebook profile. And that’s amazing! You can explore your audience and what’s more important you can convert it into ad audience easily. Suppose I visited a website which I’ve never seen before. Later on, if the service owner switches on the ad company, ads will be shown to me on Facebook. For you, as a service owner, it is very easy to use. The only thing you should not forget is to set your ad budget daily cap.

Almost nothing to do and works fine! Are there any cons?

Surely, there are. The first is often the price. Usually, such services are paid for by period. A mobile game startup may pay about $50k per month to get all the insights needed for further development. Pretty much, isn’t it? And if you try to save your money and choose free solutions, you will get a very limited feature set to use. Analytics will not be detailed: you’ll see customer device types and operating systems but will not be able to look at specific events or create funnels.

Generally, almost every analytics service limits your access to raw data. That is, on the whole, the main disadvantage of the concept of client analytics: you can never run your own models on your own data. Therefore, you will not be able to study user sessions fully. Another thing is complicated customer aggregation. For example, studying your website sales funnel stages in Mixpanel you would only be able to calculate the mean time between stages. Any other metric, say, median time or percentiles will not be available to learn using this service.

Regarding Facebook analytics, its greatest minus is a complicated and not user-friendly at all interface which is, in addition, rather slow.

But the worst thing about client analytics is that even Mixpanel when it comes to big data (which is common for active mobile application), calculates approximations. It’s stated in the documentation and probably is done to speed up the calculations, however, still, it’s not what you would expect from an analytics service. If you compare the results from client analytics with your own server-side analytics, the values might differ. We are going to tell more about how to build your own server-side analytics in our next article.

What if I use them all?

We think it’s a great idea! Different systems tend to produce different results and slightly different values. Moreover, the functionalities and prices may differ.

In addition, several systems can be switched on in parallel for testing: for example, if you study the new interface and are going to abandon your old service and switch to the new one gradually. As in any business, you need to know the limits and connect as many analytics services as you can work with (Please remember, that if you use several, they should not slow down the network connection altogether!).

How to add new events?

What if new features have been released and you need to add events to collect and process? Analytics service works the same way as it was at setup: you have to describe your new events and using the SDK integrate gathering them into your client’s code.

So, we hope our answers would be practical and useful for you. Or perhaps, at least they helped you understand that client analytics services don’t meet your needs. In this case, server-side analytics might be a solution you are looking for. Right in Part 2 of the article, we have described how to build classical server-side analytics. In Part 3, we have told more about cloud services implementation which we used in our recent project.

Thank you for reading! Please, ask us questions, leave your comments and stay tuned! Find us at https://potehalabs.com

--

--