google-analytics - Google Analytics Collector¶
The google-analytics collector queries a view in google analytics.
The configuration uses dimensions and metrics with the same name and
meaning in the google analytics
API.
Account-level properties¶
credentials (string or object):- If the value is a string then it is treated as a file-path assumed to be a JSON file which corresponds to a Google Service Account Credentials file.
- If the value is an object then it is assumed to be the inlined JSON content of the Google Service Account Credentials file.
Query-level properties¶
view_idtime_grain-dayorhour- specifies the level of time-granularity to aggregate the query results. ( In GA terms this means thebatchGetquery will use either thega:dateorga:dateHouras a timestamp for the results ).dimensionFilterClauses,filtersExpression,metricFilterClauses- these expressions are used to filter the query results from GA, they are injected as-is into the generated query tobatchGet.
The query dimensions and metrics are taken from the dimension_defs
and metric_defs properties.
dimension_defs- the dimension names are identical to those in google analytics API.- It is discouraged to use absolute temporal dimensions in
dimension_defssuch asga:dateandga:dateHouras a dimension as this may result in distinct metrics for each timestamp in the Anodot UI. The collector will automatically request the correct temporal dimension based on thetime_grainattribute and use it as a timestamp but not as a dimension.