Description Usage Arguments Value
fetch_events
downloads data on event metrics for a given
view during the given dates and returns the data as a tibble.
1 2 3 4 5 6 7 8 9 | fetch_events(
view_id,
start_date,
end_date,
dimensions = NULL,
dim_filters = NULL,
anti_sample = FALSE,
use_resource_quotas = FALSE
)
|
view_id |
The view id in Google Analytics |
start_date |
The start date as an ISO 8601 string. |
end_date |
The end date as an ISO 8601 string. |
dimensions |
A vector of dimensions to return. The default is NULL. |
dim_filters |
A set of dimension filters to constrain the results. The default is NULL. |
anti_sample |
A boolean indicating whether to use googleAnalyticsR's anti-sample feature, which chunks API calls to keep the number of records requested under the API limits that trigger sampling. This makes the download process slower but ensures that all records are returned. Only use this feature if you see that an API request triggers sampling without it. The default is FALSE. |
use_resource_quotas |
A boolean indicating whether to use the resource
quotas in Parliament's Google Analytics account to prevent sampling.
This is a faster and more effective way to disable sampling than using
|
A tibble of event metrics.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.