yadirGetMetrikaGAData: Get data from Yandex Metrika API is compatible with the...

Description Usage Arguments Value Author(s) Examples

Description

Get data from Yandex Metrika API is compatible with the Google Analytics Core Reporting API (v3), more ditails go link https://tech.yandex.ru/metrika/doc/api2/ga/intro-docpage/

Usage

1
yadirGetMetrikaGAData(start_date = "10daysAgo", end_date = "today", counter_ids = NULL, dimensions = NULL, metrics = NULL, filters = NULL, sort = NULL, samplingLevel = "HIGHER_PRECISION", token = NULL)

Arguments

start_date

Start date in YYYY-MM-DD or relative value for example "today", "yesterday", "5daysAgo"

end_date

End date in YYYY-MM-DD or relative value for example "today", "yesterday", "5daysAgo"

counter_ids

Number of yandex metrika counter, require

dimensions

List of yandex metrika dimensions, for example "ga:date,ga:sourceMedium", for vore details go link https://tech.yandex.ru/metrika/doc/api2/ga/ga/implemented/metrika_dim-docpage/

metrics

List of yandex metrika metrics, for example "ga:sessions,ga:bounces,ga:users", for vore details go link https://tech.yandex.ru/metrika/doc/api2/ga/ga/implemented/metrika_dim-docpage, require

filters

List of filter dimensions and metrics of yandex metrika. For example "ga:country==Russia;ga:language!~^ru.*", for more detail go https://tech.yandex.ru/metrika/doc/api2/ga/segmentation-ga-docpage/

sort

Sort result by metric or dimension, for example "-ga:sessions"

samplingLevel

Level of sempling, one of "HIGHER_PRECISION", "FASTER", "DEFAULT"

Token

character, your Yandex Direct API Token, require

Value

data frame with campaings names and parameters

Author(s)

Alexey Seleznev

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#For get data from Yandex Metrika Data
metrikData <- yadirGetMetrikaGAData(start_date = "2017-08-01",
                                    end_date = "yesterday",
                                    counter_ids = "ga:111111",
                                    metrics = "ga:sessions,ga:bounces,ga:users",
                                    dimensions = "ga:date,ga:sourceMedium",
                                    token = "abcdef123456")

metrikDataGoals <- yadirGetMetrikaGAData(start_date = "2017-08-01",
                                     end_date = "yesterday",
                                     counter_ids = "ga:111111",
                                     metrics = "ga:goal18731440Completions",
                                     dimensions = "ga:date,ga:sourceMedium",
                                     token = "abcdef123456")

alex-www-marketing/ryandexdirect_edit documentation built on May 4, 2019, 10:57 a.m.