Init: Initialize the Google Analytics query parameters

Description Usage Arguments Value See Also

Description

This function takes all the query parameters and combines them into a single list that is to be passed as an argument to QueryBuilder. Note that parameter validation is performed when the QueryBuilder object is created

Usage

1
2
3
4
Init(start.date = NULL, end.date = NULL, dimensions = NULL,
  metrics = NULL, filters = NULL, sort = NULL, segments = NULL,
  max.results = NULL, start.index = NULL, table.id = NULL,
  caching.dir = NULL, caching = FALSE)

Arguments

start.date

Start Date for fetching Analytics Data. Start Date must be of the format "%Y-%m-%d"

end.date

End Date for fetching Analytics Data. End Date must be of the format "%Y-%m-%d"

dimensions

Optional. A vector of up to 7 dimensions, either as a single string or a vector or strings, E.g. "ga:source,ga:medium" or c("ga:source", "ga:medium").

metrics

A vector of up to 10 metrics, either as a single string or a vector or strings. E.g. "ga:sessions" or c("ga:sessions", "ga:bounces").

filters

Optional.The filter string for the GA request.e.g. "ga:medium==referral".

sort

Optional.The sorting order for the data to be returned.e.g. "ga:sessions" or c("ga:sessions", "-ga:browser")

segments

Optional.An advanced segment definition to slice and dice your Analytics data.

max.results

Optional.Maximum Number of rows to include in the query response. Default value is 10000

start.index

Optional.The first row of data to retrieve. Default value is 1

table.id

Profile ID of the form ga:XXXXX where XXXXX is the Analytics View (Profile) ID of for which the query will retrieve the data. The View ID can be found under View Settings by navigating to the Admin Tab under your Google Analytics Profile

caching.dir

String Directory to save cached data

caching

Boolean caching required?

Value

List of all the Query Parameters initialized by the user

See Also

Valid Combinations of Dimensions and Metrics can be found at http://code.google.com/apis/analytics/docs/gdata/gdataReferenceDimensionsMetrics.html#validCombinations


RGoogleAnalytics documentation built on May 2, 2019, 8:34 a.m.