R
R
Roman Gor2017-04-28 00:52:17
API
Roman Gor, 2017-04-28 00:52:17

How to merge requests to Yandex Metrika Api correctly?

I have several requests of the same type with a filter like this:
ym:pv:UTMSource=='youtube';
As a result, I get:

{
  "rows": [
    [
      "3619"
    ]
  ]
}

I have a lot of similar "youtube" keywords. Sending a request for each keyword is very expensive. I'm trying to optimize.
Is it possible to build a query like this:
ym:pv:UTMSource=='youtube';ym:pv:UTMSource=='fb';ym:pv:UTMSource=='vk';

And get this result:
{
  "rows": [
    {
      "youtube": "3619",
                        "fb": "321",
                        "vk": "74324"
    }
  ]
}

?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
StepanStepanov, 2019-09-30
@StepanStepanov

ym:pv:UTMSource=='youtube' or ym:pv:UTMSource=='fb' or ym:pv:UTMSource=='vk'
and set dimensions to UTMSources

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question