Authentication and Setup

Setting up your environment so you can connect to the API

ga_auth()

Authenticate with Google Analytics OAuth2

ga_cache_call()

Setup caching of API calls

Reporting API

Getting data from your Google Analytics account

google_analytics() google_analytics_4()

Get Google Analytics v4 data

google_analytics_3()

Get Google Analytics v3 data (formerly google_analytics())

google_analytics_bq()

Get Google Analytics 360 BigQuery data

Reporting API v4 objects

Creating objects for more advanced v4 Reporting API fetches

filter_clause_ga4()

Make a dimension or metric filter clause object

dim_filter()

Make a dimension filter object

met_filter()

Make a metric filter object

order_type()

Make an OrderType object

pivot_ga4()

Make a pivot object

make_cohort_group()

Create a cohort group

Segment API v4 objects

Creating segments for v4 reporting API fetches

segment_ga4()

Make a segment object for use

segment_define()

Make a segment definition

segment_element()

Make a segment element

segment_vector_sequence()

Make sequenceSegment

segment_vector_simple()

Make a simple segment vector

Helpers

Useful functions for working with the Google Analytics data

aggregateGAData()

Aggregate a Google Analytics dataframe over inputted columns

allowed_metric_dim()

Create named list of allowed GA metrics/dimensions

ga_meta() google_analytics_meta()

Get current dimensions and metrics available in GA API.

meta

Google Analytics API metadata

Shiny modules

Using Google Analytics with Shiny

authDropdown()

authDropdown [Shiny Module]

authDropdownUI()

authDropdown UI [Shiny Module]

multi_select()

multi_select [Shiny Module]

multi_selectUI()

multi_select UI [Shiny Module]

segmentBuilder()

Create a GAv4 Segment Builder

segmentBuilderUI()

Create a GAv4 Segment Builder

Advanced fetching options

Building your own Google Analytics API requests

make_ga_4_req()

Make a Google Analytics v4 API fetch

fetch_google_analytics_4()

Fetch multiple GAv4 requests

fetch_google_analytics_4_slow()

Fetch GAv4 requests one at a time

Model functions

Functions to create and use models with your Google Analytics data

ga_model()

Use a model function created by ga_model_make

ga_model_example()

Load an example model

ga_model_load()

Load a created model

ga_model_make()

Modelling function factory for Google Analytics data

ga_model_edit()

Edit a created ga_model

ga_model_save()

Save a created model

ga_model_write()

Write the ga_model functions to a file

ga_model_tweet()

Upload an interactive visualisation so it can be embedded in a tweet

Account structure

Viewing the account > webproperty > view structure

google_analytics_account_list() ga_account_list()

Account summary for all accounts available to your user

ga_accounts()

List account metadata

ga_webproperty_list()

List web properties

ga_webproperty()

Get a web property

ga_view_list()

List View (Profile)

ga_view()

Get single View (Profile)

AdWords and remarketing segments

Tools to work with the AdWords integrations of Google Analytics

ga_segment_list()

Get segments user has access to

ga_adwords_list()

List AdWords

ga_adwords()

Get AdWords Link meta data

ga_remarketing_list()

List remarketing audiences

ga_remarketing_build()

Create a remarketing audience for creation

ga_remarketing_create()

Create a new remarketing audience

ga_remarketing_estimate()

Estimate number of users added to the segment yesterday

ga_remarketing_get()

Get a remarketing audience

Custom Datasource uploads

Uploading data to your Google Analytics web property

ga_custom_datasource()

List Custom Data Sources

ga_custom_upload_list()

List Custom Data Source Uploads

ga_custom_upload()

Custom Data Source Upload Status

ga_custom_upload_file()

Upload data to Google Analytics

Setting up View filters

Manipulate the filters that are applied to your Google Analytics Views

ga_filter_list()

List filters for account

ga_filter()

Get specific filter for account

ga_filter_add()

Create a new filter and add it to the view (optional).

ga_filter_apply_to_view()

Apply an existing filter to view.

ga_filter_delete()

Delete a filter from account or remove from view.

ga_filter_update()

Updates an existing filter.

ga_filter_update_filter_link()

Update an existing profile filter link. Patch semantics supported

ga_filter_view_list()

List filters for view (profile)

ga_filter_view()

Get specific filter for view (profile)

Setting up Goals

Manipulate the goals defined for your Google Analytics Views

ga_goal_list()

List goals

ga_goal()

Get goal

ga_goal_add()

Create a new goal.

ga_goal_update()

Updates an existing goal.

Unsampled Reports [GA360]

Get your GA360 unsampled reports

ga_unsampled_list()

List Unsampled Reports

ga_unsampled()

Get Unsampled Report Meta Data

ga_unsampled_download()

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.

User management

Work with users of your Google Analytics account

ga_users_list()

List Users

ga_users_add()

Create or update user access to Google Analytics

ga_users_delete()

Delete all user access for an email

ga_users_delete_linkid()

Delete users access from account, webproperty or view level

ga_users_update()

Update a user access in Google Analytics

VisitorID management

Work with individual website visitor IDs

ga_clientid_activity()

User Activity Request

ga_clientid_deletion()

Create or update a user deletion request

ga_clientid_hash()

Get hashed version of client id (also known as hashClientId, hashedClientId, or BigQuery's fullVisitorId)

Custom variables

Work with custom dimensions and metrics for your Google Analytics account

ga_custom_vars_list()

List Custom Dimensions or Metrics

ga_custom_vars()

Get Custom Dimensions or Metrics

ga_custom_vars_create()

Create a custom dimension

ga_custom_vars_patch()

Modify a custom dimension

Experiments

Work with experiment objects

ga_experiment_list()

List Experiments

ga_experiment()

Experiments Meta data