无法通过 googleAnalyticsR 导出超过 1000 行

Not able to export more than 1000 rows via googleAnalyticsR

我正在使用库导出超过 6 个月的数据。

我在界面中导出的总行数在2000行左右。

当我通过包复制报告时,我系统地获得了 1000 行。

有没有办法导出总行数?

我的代码看起来很简单:

library(googleAnalyticsR)
my_id <- 123456
ga_auth()

df_ga <- google_analytics(my_id, 
                       date_range = c("2018-12-04", "2019-09-04"),
                       metrics = c("sessions"),
                       dimensions = c("transactionId","sourceMedium","deviceCategory",'region',"city","hour","channelGrouping","userType") ) 

您需要添加 Max rows 才能请求更多行。

# 1000 rows only
thousand <- google_analytics(ga_id, 
                             date_range = c("2017-01-01", "2017-03-01"), 
                             metrics = "sessions", 
                             dimensions = "date")

# 2000 rows
twothousand <- google_analytics(ga_id, 
                             date_range = c("2017-01-01", "2017-03-01"), 
                             metrics = "sessions", 
                             dimensions = "date",
                             max = 2000)  

# All rows
alldata <- google_analytics(ga_id, 
                             date_range = c("2017-01-01", "2017-03-01"), 
                             metrics = "sessions", 
                             dimensions = "date",
                             max = -1)