50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


rmytarget (version 1.1.1)

myTarGetStats: Get stat by any 'MyTarget API' objects

Description

Load data frame with statistic by any API objects.

Usage

myTarGetStats(date_from = Sys.Date() - 7,
         date_to = Sys.Date(), 
         object_type = "campaigns",
         object_id = NULL, 
         stat_type = "day",
         auth = NULL,
         token_path = getwd(), 
         login = NULL)

Arguments

date_from

Start date

date_to

End date

object_type

API object typr, character value, apply one of campaigns, banners,pad_groups,pads,users

object_id

ID of API object (id campaign or any object

stat_type

Time stap, get value day or hour

auth

R auth object

token_path

Path to directory where you save credential data

login

Your login, or client name in MyTarget account

Value

Data frame with statistic.

See Also

MyTarget API documentation - https://target.my.com/doc/api/detailed/#resource_statistics

Examples

Run this code
# NOT RUN {
myCampStat <- myTarGetStats(date_from = "2016-08-01",
                            date_to = "2016-08-10",
                            object_type = "campaigns",
                            object_id = c("6530449","6477678"),
                            stat_type = "day")
# }

Run the code above in your browser using DataLab