Presets

Presets (preset) automatically set the metrics and dimensions that are necessary for a report.

For example, to get data for a report on browsers, use the tech_browsers preset:

You can use presets with all the API methods.

In a request, presets can be used together with metrics and dimensions. In this case, an explicitly defined parameter takes priority over a preset parameter.

Use presets to create Yandex.Metrica reports that are available in the web interface:

Preset usage examples

Sources — Summary report

preset=sources_summary

Sources — Summary report. Users from

preset=sources_summary

Report data is segmented using the parameter  .

preset=sources_summary

filters=ym:s:regionCityName=='Saint Petersburg'

The report data is segmented using the parameter filters=ym:s:regionCity=='Saint Petersburg'.

https://api-metrika.yandex.net/stat/v1/data?preset=sources_summary&filters=ym:s:regionCityName=='Saint Petersburg'&id=44147844

Sources — Keywords report

This example uses request parametrization. In the preset, you must set the ID of the goal to create the report on.

preset=sources_search_phrases_goal

goal_id=<Goal ID>