 What is learning analytics? It is defined as the measurement, collection, analysis and reporting of data about how learners behave in their context. The purpose is to understand and optimize this learning and the environment in which it occurs. In today's society, users interact with the Internet with a variety of devices. This allows us to observe their events in this environment. And one application of these observations is to produce certain recommendations. This is part of a discipline widely known as business intelligence in which data supports decision making for businesses. In a learning environment, we have a similar situation. We observe the learners while they use not only a computer, but a variety of new devices these days. The purpose is to help the instructor make decisions and answer the typical question after a learning experience. Did they really learn? But of course, in order to improve this process, first we have to take certain measures. Whatever you measure, then you can improve it. But with a detailed set of observations comes the issue of privacy. How much data can we collect about learners? In the gradient laboratory, we came up with a very powerful compromise. We provide students with a virtual machine, which is a computer inside their own computer. Students learn in that environment so that we can observe all these events, but only those events while they are working in our course. With the collection of events we obtain with these techniques, then we can put into practice what is called as the five steps of learning analytics. We collect the events, report the results, use them to make predictions, act on those predictions, and then the overall process is refined.