ga_unsampled_download: Download Unsampled Report from Google Drive. You must be...

Description Usage Arguments Value See Also Examples

View source: R/unsampled.R

Description

Download Unsampled Report from Google Drive. You must be authenticated with the same account that you setup the unsampled report. This means service account authentication is not supported.

Usage

1
2
3
4
5
6
7
ga_unsampled_download(
  reportTitle,
  accountId,
  webPropertyId,
  profileId,
  downloadFile = TRUE
)

Arguments

reportTitle

Title of Unsampled Report (case-sensitive)

accountId

Account Id

webPropertyId

Web Property Id

profileId

Profile Id

downloadFile

Default TRUE, whether to download, if FALSE returns a dataframe instead

Value

file location if downloadFile is TRUE, else a data.frame of download

See Also

Other unsampled download functions: ga_unsampled_list(), ga_unsampled()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## Not run: 

    # get data.frame of unsampled reports you have available
    unsample_list <- ga_unsampled_list(accountId = "12345", 
                                       webPropertyId = "UA-12345-4", 
                                       profileId = "129371234")
                                       
    # loop through unsampled reports and download as a list of data.frames
    dl <- lapply(unsample_list$title, ga_unsampled_download, 
                 accountId = "12345", 
                 webPropertyId = "UA-12345-4", 
                 profileId = "129371234", 
                 downloadFile = FALSE)
                 
    # inspect first data.frame
    dl[[1]]
    
    # download unsampled report to csv file
    ga_unsampled_download("my_report_title", 
                          accountId = "12345", 
                          webPropertyId = "UA-12345-4", 
                          profileId = "129371234")


## End(Not run)

googleAnalyticsR documentation built on Oct. 7, 2021, 9:06 a.m.