H
H
hunt3r9112020-05-27 12:19:12
API
hunt3r911, 2020-05-27 12:19:12

How to group data by Yandex.Metrica API by page URL view?

Hi everybody!

I have the following query to get data from Yandex.Metrica:
reporting.api.stat <- rym_get_data(counters = "***",
date.from = "2020-01-01",
date.to = "yesterday" ,
dimensions = "ym:s:date,
ym:s:lastsignTrafficSource,
ym:s:startURL,
ym:s:UTMSource,
ym:s:UTMMedium,
ym:s:UTMCampaign",
metrics = "ym:s:visits,
ym:s:users,
ym:s:pageviews,
ym:s:goal103938322users,
ym:s:goal63420316users,
ym:s:goal98340817users,
ym:s:goal93208165users,
ym:s:goal63422218users ",
sort = "-ym:s:date",
accuracy = "full",
login = "***",
token.path = "***") Can

you please tell me how to get this data grouped by ym:pv:URLPath?

Tried different filters. It works if I remove the attribution model and the traffic source ym:s:lastsignTrafficSource. Like this:

reporting.api.stat_new <- rym_get_data(counters = "***",
date.from = "2020-01-01",
date.to = "yesterday",
dimensions = "ym:pv:date,
ym :pv:UTMSource,
ym:pv:UTMMedium,
ym:pv:UTMCampaign,
ym:pv:URLPath",
metrics = "ym:pv:users,
ym:pv:pageviews",
filters = "ym:pv:URLPath =~ '/***/|/*** /'",
accuracy = "full",
login = "***",
token.path = "***")

But I can't remove ym:s:lastsignTrafficSource, they are required.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question