Posts tagged with r

 library(rgoogleads)  library(gargle)  token <- token_fetch()  token gads_auth(email = 'xx@gmail.com' Authentication complete.      ad_group_report <- gads_get_report(        resource    = "ad_group",        fields      = c("ad_group.campaign",                        "ad_group.id",                        "ad_group.name",                        "ad_group.status",                        "metrics.clicks",                        "metrics.cost_micros"),        date_from   = "2021-01-08",        date_to     = "2021-01-10",        where       = "ad_group.status = 'ENABLED'",        order_by    = c("metrics.clicks DESC", "metrics.cost_micros")      ) i Multi account request ! The request you sent did not return any results, check the entered parameters and repeat the opposition. 

Why do I receive this error? I have never received it in Radwords package. Where do I mention the argument for the multiple accounts? https://cran.r-project.org/web/packages/rgoogleads/rgoogleads.pdf

I need to get the list of all MCC with an Adwords account via Google API and R. So far I've found some packages to get the list of all clientID within a single MCC but I've found no example to get the list of all MCC within an Adwords account.

Do someone have experience on this topic?

So far I've tried:

library(RAdwordsPlus) library(RAdwords) google_auth <- doAuth() api_version <- "v201809" customer_id <- "MCC-MAIN-CODE" request <-  RAdwordsPlus::managed.customer.request(fields = c("Name", "CustomerId")) r <- RAdwordsPlus::get.service(request     = request,                  cid         = customer_id,                  auth        = google_auth,                  api.version = api_version,                  user.agent  = "r-adwordsplus-test",                  verbose     = FALSE,                  raw = FALSE,                  partial.failure = FALSE) 

Code ended up with this error:

Warning message: In parser(response) : x is not a valid managed.customer 

My Account structure is something like:

  • Main MCC

    • Customer 1 (client_id_1)

      • Camp_#1
      • Camp_#2
    • Customer 2 (client_id_2)

      • Camp_#1
      • Camp_#2
    • Customer 3 (client_id_3)

      • Camp_#1
      • Camp_#2

As stated, my goal will be to get all the client_id in order to gathering data for every Customer in the account

Thanks.