Learn R Programming

ganalytics (version 0.10.7)

ga_view_selector: ga_view_selector

Description

A menu user-interface for selecting a Google Analytics view.

Get the view ID of the query.

Set the view ID for the query.

Usage

ga_view_selector(creds = GoogleApiCreds(), with_gui = FALSE)

GaView(object, value)

GaView(object) <- value

# S4 method for gaProperty,missing GaView(object)

# S4 method for gaAccount,missing GaView(object)

# S4 method for ANY,missing GaView(object)

# S4 method for .query,missing GaView(object)

# S4 method for .query,ANY GaView(object, value)

# S4 method for .query GaView(object) <- value

Arguments

creds

Optional. An OAuth2.0 credentials object to use for the request.

with_gui

Optional. Boolean value indicating whether to use a GUI for the menu. Default is FALSE.

object

An object to coerce to a gaView object or to get the gaView of, such as a query, default view of a web property, or the default view of the first web property in a Google Analytics account.

value

The optional replacement view if the object supplied is a query, in which case GaView will return the modified query.

Value

A gaView object.

Methods (by class)

  • object = gaProperty,value = missing: Select the default view of the property.

  • object = gaAccount,value = missing: Select the default view of the first listed property of the account.

  • object = ANY,value = missing: Returns the ID of the supplied view, or the default view within the supplied property or the default view within the first property of the supplied account, or coerces a numeric or character into a viewId.

  • object = .query,value = missing: gets the view ID of the supplied query.

  • object = .query,value = ANY: Set the view of a query, returning the query with the updated view applied.

  • .query: Replaces the view being used by a query.

Examples

Run this code
# NOT RUN {
   my_ga_account <- GaAccounts()[['60253332']]
   my_website_property <- my_ga_account$properties[['UA-60253332-2']]
   my_default_view <- GaView(my_website_property)
# }
# NOT RUN {
   my_ga_account <- GaAccounts()[['60253332']]
   my_default_view <- GaView(my_ga_account)
# }

Run the code above in your browser using DataLab