Types for Google Analytics Data v1alpha API¶
-
class
google.analytics.data_v1alpha.types.BatchRunPivotReportsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageThe batch request containing multiple pivot report requests.
-
entity¶ A property whose events are tracked. This entity must be specified for the batch. The entity within RunPivotReportRequest may either be unspecified or consistent with this entity.
- Type
Entity
-
requests¶ Individual requests. Each request has a separate pivot report response. Each batch request is allowed up to 5 requests.
- Type
Sequence[RunPivotReportRequest]
-
-
class
google.analytics.data_v1alpha.types.BatchRunPivotReportsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageThe batch response containing multiple pivot reports.
-
pivot_reports¶ Individual responses. Each response has a separate pivot report request.
- Type
Sequence[RunPivotReportResponse]
-
-
class
google.analytics.data_v1alpha.types.BatchRunReportsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageThe batch request containing multiple report requests.
-
entity¶ A property whose events are tracked. This entity must be specified for the batch. The entity within RunReportRequest may either be unspecified or consistent with this entity.
- Type
Entity
-
requests¶ Individual requests. Each request has a separate report response. Each batch request is allowed up to 5 requests.
- Type
Sequence[RunReportRequest]
-
-
class
google.analytics.data_v1alpha.types.BatchRunReportsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageThe batch response containing multiple reports.
-
reports¶ Individual responses. Each response has a separate report request.
- Type
Sequence[RunReportResponse]
-
-
class
google.analytics.data_v1alpha.types.Cohort(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageDefines a cohort. A cohort is a group of users who share a common characteristic. For example, all users with the same acquisition date belong to the same cohort.
-
name¶ Assigns a name to this cohort. The dimension
cohortis valued to this name in a report response. If set, cannot begin withcohort_orRESERVED_. If not set, cohorts are named by their zero based indexcohort_0,cohort_1, etc.- Type
-
dimension¶ The dimension used by cohort. Only supports
firstTouchDatefor retention report.- Type
-
date_range¶ The cohort selects users whose first visit date is between start date and end date defined in the
dateRange. In a cohort request, thisdateRangeis required and thedateRangesin theRunReportRequestorRunPivotReportRequestmust be unspecified.The date range should be aligned with the cohort’s granularity. If CohortsRange uses daily granularity, the date range can be aligned to any day. If CohortsRange uses weekly granularity, the date range should be aligned to the week boundary, starting at Sunday and ending Saturday. If CohortsRange uses monthly granularity, the date range should be aligned to the month, starting at the first and ending on the last day of the month.
- Type
DateRange
-
-
class
google.analytics.data_v1alpha.types.CohortReportSettings(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageSettings of a cohort report.
-
class
google.analytics.data_v1alpha.types.CohortSpec(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageSpecification for a cohort report.
-
cohorts¶ The definition for the cohorts.
- Type
Sequence[Cohort]
-
cohorts_range¶ The data ranges of cohorts.
- Type
CohortsRange
-
cohort_report_settings¶ Settings of a cohort report.
- Type
CohortReportSettings
-
-
class
google.analytics.data_v1alpha.types.CohortsRange(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageDescribes date range for a cohort report.
-
granularity¶ Reporting date range for each cohort is calculated based on these three fields.
- Type
Granularity
-
start_offset¶ For daily cohorts, this will be the start day offset. For weekly cohorts, this will be the week offset.
- Type
-
end_offset¶ For daily cohorts, this will be the end day offset. For weekly cohorts, this will be the week offset.
- Type
-
class
Granularity(value)[source]¶ Bases:
proto.enums.EnumReporting granularity for the cohorts.
-
-
class
google.analytics.data_v1alpha.types.DateRange(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageA contiguous set of days: startDate, startDate + 1, …, endDate. Requests are allowed up to 4 date ranges.
-
start_date¶ The inclusive start date for the query in the format
YYYY-MM-DD. Cannot be afterend_date. The formatNdaysAgo,yesterday, ortodayis also accepted, and in that case, the date is inferred based on the property’s reporting time zone.- Type
-
end_date¶ The inclusive end date for the query in the format
YYYY-MM-DD. Cannot be beforestart_date. The formatNdaysAgo,yesterday, ortodayis also accepted, and in that case, the date is inferred based on the property’s reporting time zone.- Type
-
-
class
google.analytics.data_v1alpha.types.Dimension(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageDimensions are attributes of your data. For example, the dimension city indicates the city from which an event originates. Dimension values in report responses are strings; for example, city could be “Paris” or “New York”. Requests are allowed up to 8 dimensions.
-
name¶ The name of the dimension. See the API Dimensions for the list of dimension names.
If
dimensionExpressionis specified,namecan be any string that you would like. For example if adimensionExpressionconcatenatescountryandcity, you could call that dimensioncountryAndCity.Dimensions are referenced by
nameindimensionFilter,orderBys,dimensionExpression, andpivots.- Type
-
dimension_expression¶ One dimension can be the result of an expression of multiple dimensions. For example, dimension “country, city”: concatenate(country, “, “, city).
- Type
DimensionExpression
-
-
class
google.analytics.data_v1alpha.types.DimensionExpression(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageUsed to express a dimension which is the result of a formula of multiple dimensions. Example usages:
lower_case(dimension)
concatenate(dimension1, symbol, dimension2).
-
lower_case¶ Used to convert a dimension value to lower case.
- Type
CaseExpression
-
upper_case¶ Used to convert a dimension value to upper case.
- Type
CaseExpression
-
concatenate¶ Used to combine dimension values to a single dimension. For example, dimension “country, city”: concatenate(country, “, “, city).
- Type
ConcatenateExpression
-
class
CaseExpression(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageUsed to convert a dimension value to a single case.
-
class
ConcatenateExpression(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageUsed to combine dimension values to a single dimension.
-
dimension_names¶ Names of dimensions. The names must refer back to names in the dimensions field of the request.
- Type
Sequence[str]
-
delimiter¶ The delimiter placed between dimension names.
Delimiters are often single characters such as “|” or “,” but can be longer strings. If a dimension value contains the delimiter, both will be present in response with no distinction. For example if dimension 1 value = “US,FR”, dimension 2 value = “JP”, and delimiter = “,”, then the response will contain “US,FR,JP”.
- Type
-
-
class
google.analytics.data_v1alpha.types.DimensionHeader(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageDescribes a dimension column in the report. Dimensions requested in a report produce column entries within rows and DimensionHeaders. However, dimensions used exclusively within filters or expressions do not produce columns in a report; correspondingly, those dimensions do not produce headers.
-
class
google.analytics.data_v1alpha.types.DimensionMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageExplains a dimension.
-
ui_name¶ This dimension’s name within the Google Analytics user interface. For example,
Event name.- Type
-
-
class
google.analytics.data_v1alpha.types.DimensionValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageThe value of a dimension.
-
class
google.analytics.data_v1alpha.types.Entity(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageThe unique identifier of the property whose events are tracked.
-
property_id¶ A Google Analytics GA4 property id. To learn more, see where to find your Property ID.
- Type
-
-
class
google.analytics.data_v1alpha.types.Filter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageAn expression to filter dimension or metric values.
-
field_name¶ The dimension name or metric name. Must be a name defined in dimensions or metrics.
- Type
-
null_filter¶ A filter for null values. If True, a null dimension value is matched by this filter. Null filter is commonly used inside a NOT filter expression. For example, a NOT expression of a null filter removes rows when a dimension is null.
- Type
-
string_filter¶ Strings related filter.
- Type
StringFilter
-
in_list_filter¶ A filter for in list values.
- Type
InListFilter
-
numeric_filter¶ A filter for numeric or date values.
- Type
NumericFilter
-
between_filter¶ A filter for two values.
- Type
BetweenFilter
-
class
BetweenFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageTo express that the result needs to be between two numbers (inclusive).
-
from_value¶ Begins with this number.
- Type
NumericValue
-
to_value¶ Ends with this number.
- Type
NumericValue
-
-
class
InListFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageThe result needs to be in a list of string values.
-
class
NumericFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageFilters for numeric or date values.
-
operation¶ The operation type for this filter.
- Type
Operation
-
value¶ A numeric value or a date value.
- Type
NumericValue
-
class
Operation(value)[source]¶ Bases:
proto.enums.EnumThe operation applied to a numeric filter
-
-
class
StringFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageThe filter for string
-
match_type¶ The match type for this filter.
- Type
MatchType
-
class
MatchType(value)[source]¶ Bases:
proto.enums.EnumThe match type of a string filter
-
-
-
class
google.analytics.data_v1alpha.types.FilterExpression(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageTo express dimension or metric filters. The fields in the same FilterExpression need to be either all dimensions or all metrics.
-
and_group¶ The FilterExpressions in and_group have an AND relationship.
- Type
FilterExpressionList
-
or_group¶ The FilterExpressions in or_group have an OR relationship.
- Type
FilterExpressionList
-
not_expression¶ The FilterExpression is NOT of not_expression.
- Type
FilterExpression
-
filter¶ A primitive filter. All fields in filter in same FilterExpression needs to be either all dimensions or metrics.
- Type
Filter
-
-
class
google.analytics.data_v1alpha.types.FilterExpressionList(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageA list of filter expressions.
-
expressions¶ A list of filter expressions.
- Type
Sequence[FilterExpression]
-
-
class
google.analytics.data_v1alpha.types.GetMetadataRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageRequest for a property’s dimension and metric metadata.
-
name¶ Required. The resource name of the metadata to retrieve. This name field is specified in the URL path and not URL parameters. Property is a numeric Google Analytics GA4 Property identifier. To learn more, see where to find your Property ID.
Example: properties/1234/metadata
Set the Property ID to 0 for dimensions and metrics common to all properties. In this special mode, this method will not return custom dimensions and metrics.
- Type
-
-
class
google.analytics.data_v1alpha.types.Metadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageThe dimensions and metrics currently accepted in reporting methods.
-
dimensions¶ The dimension descriptions.
- Type
Sequence[DimensionMetadata]
-
metrics¶ The metric descriptions.
- Type
Sequence[MetricMetadata]
-
-
class
google.analytics.data_v1alpha.types.Metric(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageThe quantitative measurements of a report. For example, the metric
eventCountis the total number of events. Requests are allowed up to 10 metrics.-
name¶ The name of the metric. See the API Metrics for the list of metric names.
If
expressionis specified,namecan be any string that you would like. For example ifexpressionisscreenPageViews/sessions, you could call that metric’s name =viewsPerSession.Metrics are referenced by
nameinmetricFilter,orderBys, and metricexpression.- Type
-
expression¶ A mathematical expression for derived metrics. For example, the metric Event count per user is
eventCount/totalUsers.- Type
-
-
class
google.analytics.data_v1alpha.types.MetricHeader(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageDescribes a metric column in the report. Visible metrics requested in a report produce column entries within rows and MetricHeaders. However, metrics used exclusively within filters or expressions do not produce columns in a report; correspondingly, those metrics do not produce headers.
-
type_¶ The metric’s data type.
- Type
MetricType
-
-
class
google.analytics.data_v1alpha.types.MetricMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageExplains a metric.
-
ui_name¶ This metric’s name within the Google Analytics user interface. For example,
Event count.- Type
-
deprecated_api_names¶ Still usable but deprecated names for this metric. If populated, this metric is available by either
apiNameor one ofdeprecatedApiNamesfor a period of time. After the deprecation period, the metric will be available only byapiName.- Type
Sequence[str]
-
type_¶ The type of this metric.
- Type
MetricType
-
-
class
google.analytics.data_v1alpha.types.MetricValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageThe value of a metric.
-
class
google.analytics.data_v1alpha.types.NumericValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageTo represent a number.
-
class
google.analytics.data_v1alpha.types.OrderBy(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageThe sort options.
-
metric¶ Sorts results by a metric’s values.
- Type
MetricOrderBy
-
dimension¶ Sorts results by a dimension’s values.
- Type
DimensionOrderBy
-
pivot¶ Sorts results by a metric’s values within a pivot column group.
- Type
PivotOrderBy
-
class
DimensionOrderBy(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageSorts by dimension values.
-
order_type¶ Controls the rule for dimension value ordering.
- Type
OrderType
-
class
OrderType(value)[source]¶ Bases:
proto.enums.EnumRule to order the string dimension values by.
-
-
class
MetricOrderBy(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageSorts by metric values.
-
class
PivotOrderBy(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageSorts by a pivot column group.
-
metric_name¶ In the response to order by, order rows by this column. Must be a metric name from the request.
- Type
-
pivot_selections¶ Used to select a dimension name and value pivot. If multiple pivot selections are given, the sort occurs on rows where all pivot selection dimension name and value pairs match the row’s dimension name and value pair.
- Type
Sequence[PivotSelection]
-
class
PivotSelection(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageA pair of dimension names and values. Rows with this dimension pivot pair are ordered by the metric’s value.
For example if pivots = {{“browser”, “Chrome”}} and metric_name = “Sessions”, then the rows will be sorted based on Sessions in Chrome.
---------|----------|----------------|----------|---------------- | Chrome | Chrome | Safari | Safari ---------|----------|----------------|----------|---------------- Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions ---------|----------|----------------|----------|---------------- US | 2 | 2 | 3 | 1 ---------|----------|----------------|----------|---------------- Canada | 3 | 1 | 4 | 1 ---------|----------|----------------|----------|----------------
-
-
-
class
google.analytics.data_v1alpha.types.Pivot(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageDescribes the visible dimension columns and rows in the report response.
-
field_names¶ Dimension names for visible columns in the report response. Including “dateRange” produces a date range column; for each row in the response, dimension values in the date range column will indicate the corresponding date range from the request.
- Type
Sequence[str]
-
order_bys¶ Specifies how dimensions are ordered in the pivot. In the first Pivot, the OrderBys determine Row and PivotDimensionHeader ordering; in subsequent Pivots, the OrderBys determine only PivotDimensionHeader ordering. Dimensions specified in these OrderBys must be a subset of Pivot.field_names.
- Type
Sequence[OrderBy]
-
limit¶ The number of rows to return in this pivot. If unspecified, 10 rows are returned. If -1, all rows are returned.
- Type
-
metric_aggregations¶ Aggregate the metrics by dimensions in this pivot using the specified metric_aggregations.
- Type
Sequence[MetricAggregation]
-
-
class
google.analytics.data_v1alpha.types.PivotDimensionHeader(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageSummarizes dimension values from a row for this pivot.
-
dimension_values¶ Values of multiple dimensions in a pivot.
- Type
Sequence[DimensionValue]
-
-
class
google.analytics.data_v1alpha.types.PivotHeader(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageDimensions’ values in a single pivot.
-
pivot_dimension_headers¶ The size is the same as the cardinality of the corresponding dimension combinations.
- Type
Sequence[PivotDimensionHeader]
-
-
class
google.analytics.data_v1alpha.types.PropertyQuota(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageCurrent state of all quotas for this Analytics Property. If any quota for a property is exhausted, all requests to that property will return Resource Exhausted errors.
-
tokens_per_day¶ Standard Analytics Properties can use up to 25,000 tokens per day; Analytics 360 Properties can use 250,000 tokens per day. Most requests consume fewer than 10 tokens.
- Type
QuotaStatus
-
tokens_per_hour¶ Standard Analytics Properties can use up to 5,000 tokens per day; Analytics 360 Properties can use 50,000 tokens per day. An API request consumes a single number of tokens, and that number is deducted from both the hourly and daily quotas.
- Type
QuotaStatus
-
concurrent_requests¶ Standard Analytics Properties can send up to 10 concurrent requests; Analytics 360 Properties can use up to 50 concurrent requests.
- Type
QuotaStatus
-
server_errors_per_project_per_hour¶ Standard Analytics Properties and cloud project pairs can have up to 10 server errors per hour; Analytics 360 Properties and cloud project pairs can have up to 50 server errors per hour.
- Type
QuotaStatus
-
-
class
google.analytics.data_v1alpha.types.QuotaStatus(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageCurrent state for a particular quota group.
-
class
google.analytics.data_v1alpha.types.ResponseMetaData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageResponse’s metadata carrying additional information about the report content.
-
class
google.analytics.data_v1alpha.types.Row(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageReport data for each row. For example if RunReportRequest contains:
"dimensions": [ { "name": "eventName" }, { "name": "countryId" } ], "metrics": [ { "name": "eventCount" } ]One row with ‘in_app_purchase’ as the eventName, ‘JP’ as the countryId, and 15 as the eventCount, would be:
"dimensionValues": [ { "value": "in_app_purchase" }, { "value": "JP" } ], "metricValues": [ { "value": "15" } ]-
dimension_values¶ List of requested dimension values. In a PivotReport, dimension_values are only listed for dimensions included in a pivot.
- Type
Sequence[DimensionValue]
-
metric_values¶ List of requested visible metric values.
- Type
Sequence[MetricValue]
-
-
class
google.analytics.data_v1alpha.types.RunPivotReportRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageThe request to generate a pivot report.
-
entity¶ A property whose events are tracked. Within a batch request, this entity should either be unspecified or consistent with the batch-level entity.
- Type
Entity
-
dimensions¶ The dimensions requested. All defined dimensions must be used by one of the following: dimension_expression, dimension_filter, pivots, order_bys.
- Type
Sequence[Dimension]
-
metrics¶ The metrics requested, at least one metric needs to be specified. All defined metrics must be used by one of the following: metric_expression, metric_filter, order_bys.
- Type
Sequence[Metric]
-
dimension_filter¶ The filter clause of dimensions. Dimensions must be requested to be used in this filter. Metrics cannot be used in this filter.
- Type
FilterExpression
-
metric_filter¶ The filter clause of metrics. Applied at post aggregation phase, similar to SQL having-clause. Metrics must be requested to be used in this filter. Dimensions cannot be used in this filter.
- Type
FilterExpression
-
pivots¶ Describes the visual format of the report’s dimensions in columns or rows. The union of the fieldNames (dimension names) in all pivots must be a subset of dimension names defined in Dimensions. No two pivots can share a dimension. A dimension is only visible if it appears in a pivot.
- Type
Sequence[Pivot]
-
date_ranges¶ The date range to retrieve event data for the report. If multiple date ranges are specified, event data from each date range is used in the report. A special dimension with field name “dateRange” can be included in a Pivot’s field names; if included, the report compares between date ranges. In a cohort request, this
dateRangesmust be unspecified.- Type
Sequence[DateRange]
-
currency_code¶ A currency code in ISO4217 format, such as “AED”, “USD”, “JPY”. If the field is empty, the report uses the entity’s default currency.
- Type
-
cohort_spec¶ Cohort group associated with this request. If there is a cohort group in the request the ‘cohort’ dimension must be present.
- Type
CohortSpec
-
keep_empty_rows¶ If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter.
- Type
-
return_property_quota¶ Toggles whether to return the current state of this Analytics Property’s quota. Quota is returned in PropertyQuota.
- Type
-
-
class
google.analytics.data_v1alpha.types.RunPivotReportResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageThe response pivot report table corresponding to a pivot request.
-
pivot_headers¶ Summarizes the columns and rows created by a pivot. Each pivot in the request produces one header in the response. If we have a request like this:
"pivots": [{ "fieldNames": ["country", "city"] }, { "fieldNames": "eventName" }]
We will have the following
pivotHeadersin the response:"pivotHeaders" : [{ "dimensionHeaders": [{ "dimensionValues": [ { "value": "United Kingdom" }, { "value": "London" } ] }, { "dimensionValues": [ { "value": "Japan" }, { "value": "Osaka" } ] }] }, { "dimensionHeaders": [{ "dimensionValues": [{ "value": "session_start" }] }, { "dimensionValues": [{ "value": "scroll" }] }] }]
- Type
Sequence[PivotHeader]
-
dimension_headers¶ Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.
- Type
Sequence[DimensionHeader]
-
metric_headers¶ Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.
- Type
Sequence[MetricHeader]
-
rows¶ Rows of dimension value combinations and metric values in the report.
- Type
Sequence[Row]
-
aggregates¶ Aggregation of metric values. Can be totals, minimums, or maximums. The returned aggregations are controlled by the metric_aggregations in the pivot. The type of aggregation returned in each row is shown by the dimension_values which are set to “RESERVED_”.
- Type
Sequence[Row]
-
metadata¶ Metadata for the report.
- Type
ResponseMetaData
-
property_quota¶ This Analytics Property’s quota state including this request.
- Type
PropertyQuota
-
-
class
google.analytics.data_v1alpha.types.RunRealtimeReportRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageThe request to generate a realtime report.
-
property¶ A Google Analytics GA4 property identifier whose events are tracked. Specified in the URL path and not the body. To learn more, see where to find your Property ID.
Example: properties/1234
- Type
-
dimensions¶ The dimensions requested and displayed.
- Type
Sequence[Dimension]
-
metrics¶ The metrics requested and displayed.
- Type
Sequence[Metric]
-
limit¶ The number of rows to return. If unspecified, 10 rows are returned. If -1, all rows are returned.
- Type
-
dimension_filter¶ The filter clause of dimensions. Dimensions must be requested to be used in this filter. Metrics cannot be used in this filter.
- Type
FilterExpression
-
metric_filter¶ The filter clause of metrics. Applied at post aggregation phase, similar to SQL having-clause. Metrics must be requested to be used in this filter. Dimensions cannot be used in this filter.
- Type
FilterExpression
-
metric_aggregations¶ Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to “RESERVED_(MetricAggregation)”.
- Type
Sequence[MetricAggregation]
-
order_bys¶ Specifies how rows are ordered in the response.
- Type
Sequence[OrderBy]
-
return_property_quota¶ Toggles whether to return the current state of this Analytics Property’s Realtime quota. Quota is returned in PropertyQuota.
- Type
-
-
class
google.analytics.data_v1alpha.types.RunRealtimeReportResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageThe response realtime report table corresponding to a request.
-
dimension_headers¶ Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.
- Type
Sequence[DimensionHeader]
-
metric_headers¶ Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.
- Type
Sequence[MetricHeader]
-
rows¶ Rows of dimension value combinations and metric values in the report.
- Type
Sequence[Row]
-
totals¶ If requested, the totaled values of metrics.
- Type
Sequence[Row]
-
maximums¶ If requested, the maximum values of metrics.
- Type
Sequence[Row]
-
minimums¶ If requested, the minimum values of metrics.
- Type
Sequence[Row]
-
row_count¶ The total number of rows in the query result, regardless of the number of rows returned in the response. For example if a query returns 175 rows and includes limit = 50 in the API request, the response will contain row_count = 175 but only 50 rows.
- Type
-
property_quota¶ This Analytics Property’s Realtime quota state including this request.
- Type
PropertyQuota
-
-
class
google.analytics.data_v1alpha.types.RunReportRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageThe request to generate a report.
-
entity¶ A property whose events are tracked. Within a batch request, this entity should either be unspecified or consistent with the batch-level entity.
- Type
Entity
-
dimensions¶ The dimensions requested and displayed.
- Type
Sequence[Dimension]
-
metrics¶ The metrics requested and displayed.
- Type
Sequence[Metric]
-
date_ranges¶ Date ranges of data to read. If multiple date ranges are requested, each response row will contain a zero based date range index. If two date ranges overlap, the event data for the overlapping days is included in the response rows for both date ranges. In a cohort request, this
dateRangesmust be unspecified.- Type
Sequence[DateRange]
-
offset¶ The row count of the start row. The first row is counted as row 0.
To learn more about this pagination parameter, see Pagination.
- Type
-
limit¶ The number of rows to return. If unspecified, 10 rows are returned. If -1, all rows are returned.
To learn more about this pagination parameter, see Pagination.
- Type
-
metric_aggregations¶ Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to “RESERVED_(MetricAggregation)”.
- Type
Sequence[MetricAggregation]
-
dimension_filter¶ The filter clause of dimensions. Dimensions must be requested to be used in this filter. Metrics cannot be used in this filter.
- Type
FilterExpression
-
metric_filter¶ The filter clause of metrics. Applied at post aggregation phase, similar to SQL having-clause. Metrics must be requested to be used in this filter. Dimensions cannot be used in this filter.
- Type
FilterExpression
-
order_bys¶ Specifies how rows are ordered in the response.
- Type
Sequence[OrderBy]
-
currency_code¶ A currency code in ISO4217 format, such as “AED”, “USD”, “JPY”. If the field is empty, the report uses the entity’s default currency.
- Type
-
cohort_spec¶ Cohort group associated with this request. If there is a cohort group in the request the ‘cohort’ dimension must be present.
- Type
CohortSpec
-
keep_empty_rows¶ If false or unspecified, each row with all metrics equal to 0 will not be returned. If true, these rows will be returned if they are not separately removed by a filter.
- Type
-
return_property_quota¶ Toggles whether to return the current state of this Analytics Property’s quota. Quota is returned in PropertyQuota.
- Type
-
-
class
google.analytics.data_v1alpha.types.RunReportResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶ Bases:
proto.message.MessageThe response report table corresponding to a request.
-
dimension_headers¶ Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.
- Type
Sequence[DimensionHeader]
-
metric_headers¶ Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.
- Type
Sequence[MetricHeader]
-
rows¶ Rows of dimension value combinations and metric values in the report.
- Type
Sequence[Row]
-
totals¶ If requested, the totaled values of metrics.
- Type
Sequence[Row]
-
maximums¶ If requested, the maximum values of metrics.
- Type
Sequence[Row]
-
minimums¶ If requested, the minimum values of metrics.
- Type
Sequence[Row]
-
row_count¶ The total number of rows in the query result, regardless of the number of rows returned in the response. For example if a query returns 175 rows and includes limit = 50 in the API request, the response will contain row_count = 175 but only 50 rows.
To learn more about this pagination parameter, see Pagination.
- Type
-
metadata¶ Metadata for the report.
- Type
ResponseMetaData
-
property_quota¶ This Analytics Property’s quota state including this request.
- Type
PropertyQuota
-