Learn R Programming

rym (version 1.0.6)

rym_add_segment: Create segment in 'Yandex Metrica'

Description

Create a new API segment in 'Yandex Metrica' counter.

Usage

rym_add_segment(
     counter, 
     name,
     expression,
     login = getOption("rym.user"), 
     token.path = getOption("rym.token_path"))

Arguments

counter

Yandex Metrika counter ID

name

character, segment name

expression

character, filter expression, for example "ym:s:trafficSource=='organic' AND ym:s:isNewUser=='Yes'", for more information go link

login

character, Your Yandex login

token.path

character, Directory for store API credential

Author

Alexey Seleznev

References

Official docs of 'Yandex Metrica Management API'

See Also

See rym_add_goal() for create new goal in 'Yandex Metrica'.

Examples

Run this code
if (FALSE) {
rym_add_segment(
     counter = 123456789, 
     name = "my_segment",
     expression = "ym:s:trafficSource=='organic' AND ym:s:isNewUser=='Yes'",
     login = "your_login")

}

Run the code above in your browser using DataLab