Description Usage Arguments Value
View source: R/ga_comparison_data.R
A wrapper function around googleAnalyticsR::google_analytics()
that returns
a list with data from three time periods: the time period requested by date_range
,
the time period 1 year prior to date_range
and the time period immediately preceding
date_range
.
1 2 3 |
viewId |
The ID of the Google Analytics View to retrieve data from. |
date_range |
The date range to retrieve data from. Takes a vector of two dates with the format "YYYY-MM-DD" |
metrics |
Metrics to retrieve from Google Analytics |
dimensions |
Dimensions to retrieve from Google Analytics |
anti_sample |
Set to |
A list object with data for the current date range, the same date range 1 year prior, and the previous period.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.