Google Apps Script
Feedback on this document

Class GaData

From Analytics Services

Members:

MemberTypeDescription
getColumnHeadersGaDataColumnHeaders[]Column headers that list dimension names followed by the metric names. The order of dimensions and metrics is same as specified in the request.
getContainsSampledDataBooleanDetermines if Analytics data contains samples.
getIdStringUnique ID for this data response.
getItemsPerPageintThe maximum number of rows the response can contain, regardless of the actual number of rows returned. Its value ranges from 1 to 10,000 with a value of 1000 by default, or otherwise specified by the max-results query parameter.
getKindStringResource type.
getNextLinkStringLink to next page for this Analytics data query.
getPreviousLinkStringLink to previous page for this Analytics data query.
getProfileInfoGaDataProfileInfoInformation for the profile, for which the Analytics data was requested.
getQueryGaDataQueryAnalytics data request query parameters.
getRowsString[][]Analytics data rows, where each row contains a list of dimension values followed by the metric values. The order of dimensions and metrics is same as specified in the request.
getSelfLinkStringLink to this page.
getTotalResultsintThe total number of rows for the query, regardless of the number of rows in the response.
getTotalsForAllResultsObjectTotal values for the requested metrics over all the results, not just the results returned in this response. The order of the metric totals is same as the metric order specified in the request.
setColumnHeadersGaDataSet the value for the field: columnHeaders
setContainsSampledDataGaDataSet the value for the field: containsSampledData
setIdGaDataSet the value for the field: id
setItemsPerPageGaDataSet the value for the field: itemsPerPage
setKindGaDataSet the value for the field: kind
setNextLinkGaDataSet the value for the field: nextLink
setPreviousLinkGaDataSet the value for the field: previousLink
setProfileInfoGaDataSet the value for the field: profileInfo
setQueryGaDataSet the value for the field: query
setRowsGaDataSet the value for the field: rows
setSelfLinkGaDataSet the value for the field: selfLink
setTotalResultsGaDataSet the value for the field: totalResults
setTotalsForAllResultsGaDataSet the value for the field: totalsForAllResults

method getColumnHeaders()

Column headers that list dimension names followed by the metric names. The order of dimensions and metrics is same as specified in the request.

Return Values:

TypeDescription
GaDataColumnHeaders[]The current value for columnHeaders

method getContainsSampledData()

Determines if Analytics data contains samples.

Return Values:

TypeDescription
BooleanThe current value for containsSampledData

method getId()

Unique ID for this data response.

Return Values:

TypeDescription
StringThe current value for id

method getItemsPerPage()

The maximum number of rows the response can contain, regardless of the actual number of rows returned. Its value ranges from 1 to 10,000 with a value of 1000 by default, or otherwise specified by the max-results query parameter.

Return Values:

TypeDescription
intThe current value for itemsPerPage

method getKind()

Resource type.

Return Values:

TypeDescription
StringThe current value for kind

Link to next page for this Analytics data query.

Return Values:

TypeDescription
StringThe current value for nextLink

Link to previous page for this Analytics data query.

Return Values:

TypeDescription
StringThe current value for previousLink

method getProfileInfo()

Information for the profile, for which the Analytics data was requested.

Return Values:

TypeDescription
GaDataProfileInfoThe current value for profileInfo

method getQuery()

Analytics data request query parameters.

Return Values:

TypeDescription
GaDataQueryThe current value for query

method getRows()

Analytics data rows, where each row contains a list of dimension values followed by the metric values. The order of dimensions and metrics is same as specified in the request.

Return Values:

TypeDescription
String[][]The current value for rows

Link to this page.

Return Values:

TypeDescription
StringThe current value for selfLink

method getTotalResults()

The total number of rows for the query, regardless of the number of rows in the response.

Return Values:

TypeDescription
intThe current value for totalResults

method getTotalsForAllResults()

Total values for the requested metrics over all the results, not just the results returned in this response. The order of the metric totals is same as the metric order specified in the request.

Return Values:

TypeDescription
ObjectThe current value for totalsForAllResults

method setColumnHeaders(columnHeaders)

Set the value for the field: columnHeaders

Arguments:

NameTypeDescription
columnHeadersGaDataColumnHeaders[]Column headers that list dimension names followed by the metric names. The order of dimensions and metrics is same as specified in the request.

Return Values:

TypeDescription
GaDataThe bean object for chaining.

method setContainsSampledData(containsSampledData)

Set the value for the field: containsSampledData

Arguments:

NameTypeDescription
containsSampledDataBooleanDetermines if Analytics data contains samples.

Return Values:

TypeDescription
GaDataThe bean object for chaining.

method setId(id)

Set the value for the field: id

Arguments:

NameTypeDescription
idStringUnique ID for this data response.

Return Values:

TypeDescription
GaDataThe bean object for chaining.

method setItemsPerPage(itemsPerPage)

Set the value for the field: itemsPerPage

Arguments:

NameTypeDescription
itemsPerPageintThe maximum number of rows the response can contain, regardless of the actual number of rows returned. Its value ranges from 1 to 10,000 with a value of 1000 by default, or otherwise specified by the max-results query parameter.

Return Values:

TypeDescription
GaDataThe bean object for chaining.

method setKind(kind)

Set the value for the field: kind

Arguments:

NameTypeDescription
kindStringResource type.

Return Values:

TypeDescription
GaDataThe bean object for chaining.

Set the value for the field: nextLink

Arguments:

NameTypeDescription
nextLinkStringLink to next page for this Analytics data query.

Return Values:

TypeDescription
GaDataThe bean object for chaining.

Set the value for the field: previousLink

Arguments:

NameTypeDescription
previousLinkStringLink to previous page for this Analytics data query.

Return Values:

TypeDescription
GaDataThe bean object for chaining.

method setProfileInfo(profileInfo)

Set the value for the field: profileInfo

Arguments:

NameTypeDescription
profileInfoGaDataProfileInfoInformation for the profile, for which the Analytics data was requested.

Return Values:

TypeDescription
GaDataThe bean object for chaining.

method setQuery(query)

Set the value for the field: query

Arguments:

NameTypeDescription
queryGaDataQueryAnalytics data request query parameters.

Return Values:

TypeDescription
GaDataThe bean object for chaining.

method setRows(rows)

Set the value for the field: rows

Arguments:

NameTypeDescription
rowsString[][]Analytics data rows, where each row contains a list of dimension values followed by the metric values. The order of dimensions and metrics is same as specified in the request.

Return Values:

TypeDescription
GaDataThe bean object for chaining.

Set the value for the field: selfLink

Arguments:

NameTypeDescription
selfLinkStringLink to this page.

Return Values:

TypeDescription
GaDataThe bean object for chaining.

method setTotalResults(totalResults)

Set the value for the field: totalResults

Arguments:

NameTypeDescription
totalResultsintThe total number of rows for the query, regardless of the number of rows in the response.

Return Values:

TypeDescription
GaDataThe bean object for chaining.

method setTotalsForAllResults(totalsForAllResults)

Set the value for the field: totalsForAllResults

Arguments:

NameTypeDescription
totalsForAllResultsObjectTotal values for the requested metrics over all the results, not just the results returned in this response. The order of the metric totals is same as the metric order specified in the request.

Return Values:

TypeDescription
GaDataThe bean object for chaining.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.