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:

https://api-metrika.yandex.net/stat/v1/data.csv?id=44147844&preset=tech_browsers&limit=5

You can use presets with all 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

https://api-metrika.yandex.net/stat/v1/data?preset=sources_summary&id=44147844

“Sources, summary” report. Users from California

preset=sources_summary

filters=ym:s:regionAreaName=='State of California'

Report data is segmented using the parameter filters=ym:s:regionAreaName=='State of California'.

https://api-metrica.yandex.net/stat/v1/data?preset=sources_summary&filters=ym:s:regionAreaName=='State of California'&id=44147844

“Keywords” report

preset=sources_search_phrases

https://api-metrika.yandex.net/stat/v1/data?preset=sources_search_phrases&id=44147844

“Browsers” report

preset=tech_platforms

dimensions=ym:s:browser

This preset helps create a report on user browsers, without accounting for the browser version.

https://api-metrika.yandex.net/stat/v1/data?preset=tech_platforms&dimensions=ym:s:browser&id=44147844

where the dimensions=ym:s:browser parameter sets a dimension in the preset for grouping resulting data.

Content analytics. Category report

Category report

Use this preset to create a report with general statistics by category.

publishers_rubrics

https://api-metrika.yandex.net/stat/v1/data?preset=publishers_rubrics&id=44147844&date1=today&date2=today    
Traffic sources

This preset helps you create a report on sources that users clicked through to the site content.