New Yandex.Metrica via API: report designer and API support for other standards

    Yandex.Metrica has completely rebuilt its API . Now you can not be limited to requesting standard sets of reports in search of something useful, but immediately ask a specific question, the answer to which you need.

    The first Metrica API appeared some time after the web interface and was additional functionality to it. The basic functions of the Metric were available in it: a set of basic reports on the principle of one method = one report. The tool is useful, but not flexible, because instead of giving exact answers to your questions, it offered a fixed set of columns in the report without the ability to immediately filter out what you need.

    Now we have changed our approach, and the work of the Metric is completely based on the new API. That is, it became the basis of the service, and not some additional tool to it. The API works on other principles: a set of measurements and metrics is available in it, from which you can build any report on the site, even if it is not in the web interface. So now you can not only study the data in the reports, but also create your own analytical solutions. In addition, we have supported compatibility with various API standards, including Google Analytics.

    Since the operation of the Yandex.Metrica service is completely based on the new API, all new tools and functions of the service immediately appear in it. For example, data segmentation, which after a while will become available to users of the web interface with the launch of Metric 2.0.

    First, about the two main and for many long-awaited features that appeared in the Metrica API, the report and segmentation designer.

    Report Designer

    Now, based on the data that you collect on the site using the Metric, you can independently generate any custom report.

    How it works
    With the previous version of the API, you could receive separate reports with data on which regions visitors came to the site from, what age and gender, what ads they clicked on and so on. But they could not collect a report from such data that takes into account several factors at the same time.

    In requests to the new API, you can immediately set all the dimensions you are interested in (dimensions) and see the relationship between different factors in the response. For instance:

    Details about dimensions and how you can work with them require a separate story. And we will definitely share it here or at our club .

    Data segmentation

    General information on the site is the average temperature in the hospital, while for practical work the analyst is usually interested in data on individual segments of the audience.
    The segmentation feature in the new API allows you to focus on the segment of traffic that interests you and discard all unnecessary. If your target audience is men from St. Petersburg from 25 to 34 years old, you can only see the data in the reports on them: find out from what sources they come from, what browsers they use, what types of devices they have and so on.

    How it works

    Segmentation criteria can be set for more than 50 attributes of visits and hits (traffic sources, search phrases, attributes of advertising campaigns, page URLs, etc.), and conditions can be combined with AND / OR, grouped with brackets, and specified accomplished goals and attribution models and more. All these features also deserve a more detailed story. We can make out more examples which are interesting to you in comments.

    Always up-to-date information on what is happening on the site

    There is practically no delay in the Metric between the occurrence of an event on a site and the availability of data about this event through the API. This is very useful for those who, having run and tested something new on the site, are faced with difficulties. Or vice versa wants to make sure that everything is going well.

    In the Metrica API, you can work with fresh data in just a few minutes, so you do not have to wait for statistics or updates to wait hours or days. This speed of information appearing in reports is ensured by the unique ClickHouse column DBMS, a proprietary Metrica team that can process requests on petabyte data volumes almost instantly.

    Support for various API standards

    All software interfaces are different from each other. And the new Metrica API has a different structure than its previous API or, for example, the Google Analytics API. But this does not mean that application developers will again have to study the new API standard and implement its support.

    We tried to make life easier for everyone who already has ready-made applications, and implemented support for various API standards on our side. Our new API provides a mode of compatibility with Google Analytics, which allows you to connect to the Metric with minimal changes in the application code. Of course, support for the previous Metrica API is also implemented. So, programs based on it will not have to be changed.

    All functions of the new API are described in detail in the documentation.. We will be happy to receive feedback from you - explore new opportunities, experiment and share interesting cases.

    Also popular now: