Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ga_custom_vars_patch

Modify a custom dimension


Description

Modify existing custom dimensions

Usage

ga_custom_vars_patch(
  id,
  accountId,
  webPropertyId,
  name = NULL,
  active = NULL,
  scope = NULL,
  ignoreCustomDataSourceLinks = FALSE
)

Arguments

id

The id of the custom dimension

accountId

AccountId of the custom dimension

webPropertyId

WebPropertyId of the custom dimension

name

Name of custom dimension

active

TRUE or FALSE if custom dimension is active or not

scope

Scope of custom dimension - one of "HIT","SESSION","USER","PRODUCT"

ignoreCustomDataSourceLinks

Force the update and ignore any warnings related to the custom dimension being linked to a custom data source / data set.

See Also

Other custom variable functions: ga_custom_vars_create(), ga_custom_vars_list(), ga_custom_vars()

Examples

## Not run: 
library(googleAnalyticsR)
ga_auth()

# create custom var
ga_custom_vars_create("my_custom_dim",
                      index = 7,
                      accountId = 54019251,
                      webPropertyId = "UA-54019251-4",
                      scope = "HIT",
                      active = FALSE)

# view custom dimension in list
ga_custom_vars_list(54019251, webPropertyId = "UA-54019251-4", type = "customDimensions")

# change a custom dimension
ga_custom_vars_patch("ga:dimension7",
                     accountId = 54019251,
                     webPropertyId = "UA-54019251-4",
                     name = "my_custom_dim2",
                     active = TRUE)
                     
# view custom dimensions again to see change
ga_custom_vars_list(54019251, webPropertyId = "UA-54019251-4", type = "customDimensions")


## End(Not run)

googleAnalyticsR

Google Analytics API into R

v1.0.0
MIT + file LICENSE
Authors
Mark Edmondson [aut, cre] (<https://orcid.org/0000-0002-8434-3881>), Artem Klevtsov [ctb], Johann deBoer [ctb], David Watkins [ctb], Olivia Brode-Roger [ctb], Jas Sohi [ctb], Zoran Selinger [ctb], Octavian Corlade [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.