googleAnalyticsR: Google Analytics API into R

R library for interacting with the Google Analytics Reporting API v3 and v4.

Install the latest version of this package by entering the following in R:
AuthorMark Edmondson [aut, cre], Artem Klevtsov [ctb], Johann deBoer [ctb]
Date of publication2017-04-01 16:12:22 UTC
MaintainerMark Edmondson <>
LicenseMIT + file LICENSE

View on CRAN

Man pages

aggregateGAData: Aggregate a Google Analytics dataframe over inputted columns

allowed_metric_dim: Create named list of allowed GA metrics/dimensions

anti_sample: Get a GA request with anti-sampling

authDropdown: authDropdown [Shiny Module]

authDropdownUI: authDropdown UI [Shiny Module]

cat0: if argument is NULL, no line output

checkPrefix: check it starts with ga: and if not puts it on

cohort: Cohort object

cohort_dimension_check: Check the request has cohort dimensions

cohortGroup: Cohort Group object

cohort_metric_check: Check the request has cohort metrics

date_ga4: Make a date object

dimension_ga4: Make a dimension object

dim_filter: Make a dimension filter object

dynamicSegment: Dynamic Segment v4 object

error.message: Get the error message

expect_null_or_s3_class: Expect NULL or class (s3)

expect_null_or_type: Expect NULL or type

fetch_google_analytics_4: Fetch multiple GAv4 requests

fetch_google_analytics_4_slow: Fetch GAv4 requests one at a time

filter_clause_ga4: Make a dimension or metric filter clause object

ga_account_list: Get account summary including the ViewId

ga_accounts: Get account list

ga_adwords: Get AdWords Link meta data

ga_adwords_list: List AdWords

ga_auth: Authenticate with Google Analytics OAuth2

ga_custom_datasource: List Custom Data Sources

ga_custom_upload: Custom Data Source Upload Status

ga_custom_upload_file: Upload data to Google Analytics

ga_custom_upload_list: List Custom Data Source Uploads

ga_custom_vars: Get Custom Dimensions or Metrics

ga_custom_vars_list: List Custom Dimensions or Metrics

ga_experiment: Experiments Meta data

ga_experiment_list: List Experiments

ga_filter: Get specific filter for account

ga_filter_list: List filters for account

ga_filter_view: Get specific filter for view (profile)

ga_filter_view_list: List filters for view (profile)

ga_goal: Get goal

ga_goal_list: List goals

ga_remarketing_estimate: Estimate number of users added to the segment yesterday

ga_remarketing_get: Get a remarketing audience

ga_remarketing_list: List remarketing audiences

ga_segment_list: Get segments user has access to

ga_unsampled: Get Unsampled Report Meta Data

ga_unsampled_list: List Unsampled Reports

ga_users_list: List Users

ga_view: Get single View (Profile)

ga_view_list: List View (Profile)

ga_webproperty: Get web property

ga_webproperty_list: List web properties

getColNameOfClass: Gets the names of a dataframe's columns of a certain class

google_analytics: Get Google Analytics v3 data

google_analytics_4: Get Google Analytics v4 data (single request)

google_analytics_4_parse: ga v4 data parsing

google_analytics_4_parse_batch: ga v4 parse batching

google_analytics_bq: Get Google Analytics 360 BigQuery data

google_analytics_bq_asynch: Asynch fetch

google_analytics_meta: Get current dimensions and metrics available in GA API.

googleAnalyticsR: Library for getting Google Analytics data into R

hourly_anti_sample: hourly get request with anti-sampling

idempotency: Idempotency

is.error: Is this a try error?

is.NullOb: A helper function that tests whether an object is either NULL...

listNameToDFCol: Add name of list entry of dataframe to dataframe colum

make_cohort_group: Create a cohort group

make_ga_4_req: Make a Google Analytics v4 API fetch

makeOrFilters: Make orFiltersForSegment

makePivotData: Make pivot data rows

makePivotNames: Make pivot column names

meta: Google Analytics API metadata

met_filter: Make a metric filter object

metric_ga4: Make a metric object

multi_select: multi_select [Shiny Module]

multi_selectUI: multi_select UI [Shiny Module]

myMessage: Custom message log level

order_type: Make an OrderType object

orFiltersForSegment: orFiltersForSegment

parse_ga_account_summary: New parse GA account summary

pivot_ga4: Make a pivot object

pivot_ga4_parse: pivot data parsing

reexports: Objects exported from other packages

rmNullObs: Recursively step down into list, removing all such objects

segmentBuilder: Create a GAv4 Segment Builder

segmentBuilderUI: Create a GAv4 Segment Builder

segmentChain: segmentChain

segmentChainUI: segmentChain UI

segment_define: Make a segment definition

segmentDefinition: Segment Definition

segmentDimensionFilter: segmentDimensionFilter

segment_element: Make a segment element

segmentElementUI: A GAv4 segment element row

segmentFilter: Segment Filter

segmentFilterClause: segmentFilterClause

segment_ga4: Make a segment object for use

segmentMetricFilter: segmentMetricFilter

segmentObj_ga4: Segment objects

segmentSequenceStep: segmentSequenceStep

segment_vector_sequence: Make sequenceSegment

segment_vector_simple: Make a simple segment vector

sequenceSegment: sequenceSegment

simpleSegment: Simple Segment

timestamp_to_r: Timestamp to R date

unitToList: Allow unit lists


\%>\% Man page
aggregateGAData Man page
allowed_metric_dim Man page
anti_sample Man page
authDropdown Man page
authDropdownUI Man page
cat0 Man page
checkPrefix Man page
cohort Man page
cohort_dimension_check Man page
cohortGroup Man page
cohort_metric_check Man page
date_ga4 Man page
dimension_ga4 Man page
dim_filter Man page
dynamicSegment Man page
error.message Man page
expect_null_or_s3_class Man page
expect_null_or_type Man page
fetch_google_analytics_4 Man page
fetch_google_analytics_4_slow Man page
filter_clause_ga4 Man page
ga_account_list Man page
ga_accounts Man page
ga_adwords Man page
ga_adwords_list Man page
ga_auth Man page
ga_custom_datasource Man page
ga_custom_upload Man page
ga_custom_upload_file Man page
ga_custom_upload_list Man page
ga_custom_vars Man page
ga_custom_vars_list Man page
ga_experiment Man page
ga_experiment_list Man page
ga_filter Man page
ga_filter_list Man page
ga_filter_view Man page
ga_filter_view_list Man page
ga_goal Man page
ga_goal_list Man page
ga_remarketing_estimate Man page
ga_remarketing_get Man page
ga_remarketing_list Man page
ga_segment_list Man page
ga_unsampled Man page
ga_unsampled_list Man page
ga_users_list Man page
ga_view Man page
ga_view_list Man page
ga_webproperty Man page
ga_webproperty_list Man page
getColNameOfClass Man page
google_analytics Man page
google_analytics_4 Man page
google_analytics_4_parse Man page
google_analytics_4_parse_batch Man page
google_analytics_account_list Man page
google_analytics_bq Man page
google_analytics_bq_asynch Man page
google_analytics_meta Man page
googleAnalyticsR Man page
googleAnalyticsR-package Man page
hourly_anti_sample Man page
idempotency Man page
is.error Man page
is.NullOb Man page
listNameToDFCol Man page
make_cohort_group Man page
make_ga_4_req Man page
makeOrFilters Man page
makePivotData Man page
makePivotNames Man page
meta Man page
met_filter Man page
metric_ga4 Man page
multi_select Man page
multi_selectUI Man page
myMessage Man page
order_type Man page
orFiltersForSegment Man page
parse_ga_account_summary Man page
pivot_ga4 Man page
pivot_ga4_parse Man page
reexports Man page
rmNullObs Man page
segmentBuilder Man page
segmentBuilderUI Man page
segmentChain Man page
segmentChainUI Man page
segment_define Man page
segmentDefinition Man page
segmentDimensionFilter Man page
segment_element Man page
segmentElementUI Man page
segmentFilter Man page
segmentFilterClause Man page
segment_ga4 Man page
segmentMetricFilter Man page
segmentObj_ga4 Man page
segmentSequenceStep Man page
segment_vector_sequence Man page
segment_vector_simple Man page
sequenceSegment Man page
simpleSegment Man page
timestamp_to_r Man page
unitToList Man page


inst/shiny/ga4-example/ga4_demo/ui.R inst/shiny/ga4-example/ga4_demo/server.R
R/users.R R/goals.R R/bigQuery.R R/filters.R R/aggregate.R R/auth.R R/views.R R/pivots.R R/meta.R R/utilities.R R/custom_data_source.R R/data.R R/ga_v4_get.R R/cohorts.R R/experiments.R R/shiny-modules-segments.R R/custom_dims_mets.R R/accounts.R R/options.R R/adwords.R R/fetch_functions.R R/ga_v4_objects.R R/googleAnalyticsR.R R/gadget.R R/parse_functions.R R/anti_sample.R R/unsampled.R R/remarketingAudiences.R R/segments.R R/webprops.R R/ga_v3_get.R R/print-method.R R/shiny-modules.R
man/meta.Rd man/google_analytics.Rd man/ga_view_list.Rd man/segmentBuilder.Rd man/ga_goal_list.Rd man/segmentFilter.Rd man/segmentSequenceStep.Rd man/segmentBuilderUI.Rd man/ga_filter_view.Rd man/ga_unsampled_list.Rd man/segmentMetricFilter.Rd man/google_analytics_4_parse_batch.Rd man/ga_filter_view_list.Rd man/ga_webproperty.Rd man/makePivotNames.Rd man/ga_view.Rd man/authDropdown.Rd man/ga_custom_upload.Rd man/ga_remarketing_estimate.Rd man/order_type.Rd man/ga_remarketing_get.Rd man/ga_filter.Rd man/hourly_anti_sample.Rd man/getColNameOfClass.Rd man/error.message.Rd man/ga_experiment.Rd man/cohortGroup.Rd man/ga_custom_upload_list.Rd man/idempotency.Rd man/ga_goal.Rd man/google_analytics_bq_asynch.Rd man/myMessage.Rd man/make_cohort_group.Rd man/ga_unsampled.Rd man/segmentChainUI.Rd man/dimension_ga4.Rd man/makeOrFilters.Rd man/date_ga4.Rd man/ga_auth.Rd man/unitToList.Rd man/ga_custom_vars.Rd man/listNameToDFCol.Rd man/segment_element.Rd man/segmentDimensionFilter.Rd man/ga_custom_upload_file.Rd man/segment_ga4.Rd man/met_filter.Rd man/ga_adwords_list.Rd man/ga_experiment_list.Rd man/ga_adwords.Rd man/simpleSegment.Rd man/segmentDefinition.Rd man/is.error.Rd man/multi_select.Rd man/segment_vector_sequence.Rd man/google_analytics_4.Rd man/pivot_ga4.Rd man/segment_define.Rd man/ga_remarketing_list.Rd man/ga_segment_list.Rd man/google_analytics_bq.Rd man/ga_filter_list.Rd man/ga_custom_datasource.Rd man/cohort.Rd man/segment_vector_simple.Rd man/ga_webproperty_list.Rd man/reexports.Rd man/cohort_dimension_check.Rd man/google_analytics_meta.Rd man/timestamp_to_r.Rd man/segmentElementUI.Rd man/segmentFilterClause.Rd man/make_ga_4_req.Rd man/is.NullOb.Rd man/pivot_ga4_parse.Rd man/googleAnalyticsR.Rd man/checkPrefix.Rd man/fetch_google_analytics_4.Rd man/cohort_metric_check.Rd man/ga_accounts.Rd man/ga_custom_vars_list.Rd man/sequenceSegment.Rd man/parse_ga_account_summary.Rd man/expect_null_or_s3_class.Rd man/multi_selectUI.Rd man/orFiltersForSegment.Rd man/allowed_metric_dim.Rd man/aggregateGAData.Rd man/dynamicSegment.Rd man/segmentObj_ga4.Rd man/cat0.Rd man/ga_users_list.Rd man/ga_account_list.Rd man/segmentChain.Rd man/expect_null_or_type.Rd man/metric_ga4.Rd man/rmNullObs.Rd man/google_analytics_4_parse.Rd man/fetch_google_analytics_4_slow.Rd man/anti_sample.Rd man/authDropdownUI.Rd man/dim_filter.Rd man/makePivotData.Rd man/filter_clause_ga4.Rd

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.