I
I
ivan-el2015-08-18 14:02:20
Yandex
ivan-el, 2015-08-18 14:02:20

How to build a request to the Yandex.Metrica API with a selection of sources and search engines?

Hello. You need to build a request to the new version of the Ya.Metrika API. You need to get a sample for the year, broken down by months, with statistics for all sources (external links, direct hits, search engines), plus the Search engines source should have additional statistics on search engines (Yandex, Google ...).
Here is a request:
api-metrika.yandex.ru/stat/v1/data/bytime?date1=2014-07-01&date2=2015-07-01&group=month&dimensions=ym:s:<attribution>SourceEngine,ym:s:< attribution>TrafficSource&ids=<id_of the counter>&metrics=ym:s:users
gives a selection either by search engines or by sources in general, depending on what (SourceEngine or TrafficSource) comes first.
How to make a request? Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
suicidecoding, 2015-08-18
@ivan-el

Options:
1. Use /stat/v1/data instead of bytime and add the dimension ym:s:datePeriod<...>
2. Pass in the row_ids you need

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question