This package is designed to work with the API Google Doubleclick in R.
Key features:
- OAuth 2.0 authorization;
- Access to the following Google Analytics APIs:
- Management API: access to configuration data for accounts, web properties, views (profiles), goals and segments;
- Core Reporting API: query for dimensions and metrics to produce customized reports;
- Multi-Channel Funnels Reporting API: query the traffic source paths that lead to a user's goal conversion;
- Real Time Reporting API: report on activity occurring on your property at the moment;
- Metadata API: access the list of API dimensions and metrics and their attributes;
- Access to all the accounts which the user has access to;
- API responses is converted directly into R as a
data.frame
; - Auto-pagination to return more than 10,000 rows of the results by combining multiple data requests.
To install the latest release version from CRAN with:
install.packages("RDFA")
To install the development version the install_bitbucket
function from devtools
package can be used:
devtools::install_bitbucket(repo = "rdfa", username = "unikum")
Another method to install the package RGA
(using the command line):
git clone https://[email protected]/unikum/rga.git
R CMD build rdfa
R CMD INSTALL rdfa_*.tar.gz
Once you have the package loaded, there are 3 steps you need to use to get data from Google Analytics:
- Authorize this package to access your Google Analytics data with the
authorize()
function. - Determine the profile ID which you want to get access to with the
list_profiles()
function. - Get the results from the API with one of these functions:
get_ga()
,get_mcf()
orget_rt()
.
For details about this steps please type into R:
browseVignettes(package = "RDFA")
Before posting a bug please try execute your code with the httr::with_verbose()
wrapper. It will be useful if you attach verbose output to the bug report.
httr::with_verbose(list_profiles())
httr::with_verbose(get_ga("XXXXXXXX"))
Post the traceback()
output also may be helpful.
To report a bug please type into R:
utils::bug.report(package = "RDFA")