Types for Google Analytics Data v1alpha API¶
- class google.analytics.data_v1alpha.types.AudienceDimension(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
An audience dimension is a user attribute. Specific user attributed are requested and then later returned in the
QueryAudienceListResponse
.- dimension_name¶
Optional. The API name of the dimension. See the API Dimensions for the list of dimension names.
- Type
- class google.analytics.data_v1alpha.types.AudienceDimensionValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The value of a dimension.
- class google.analytics.data_v1alpha.types.AudienceList(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
An audience list is a list of users in an audience at the time of the list’s creation. One audience may have multiple audience lists created for different days.
- name¶
Output only. Identifier. The audience list resource name assigned during creation. This resource name identifies this
AudienceList
.Format:
properties/{property}/audienceLists/{audience_list}
- Type
- audience¶
Required. The audience resource name. This resource name identifies the audience being listed and is shared between the Analytics Data & Admin APIs.
Format:
properties/{property}/audiences/{audience}
- Type
- audience_display_name¶
Output only. The descriptive display name for this audience. For example, “Purchasers”.
- Type
- dimensions¶
Required. The dimensions requested and displayed in the query response.
- Type
MutableSequence[google.analytics.data_v1alpha.types.AudienceDimension]
- state¶
Output only. The current state for this AudienceList.
This field is a member of oneof
_state
.
- begin_creating_time¶
Output only. The time when CreateAudienceList was called and the AudienceList began the
CREATING
state.This field is a member of oneof
_begin_creating_time
.
- creation_quota_tokens_charged¶
Output only. The total quota tokens charged during creation of the AudienceList. Because this token count is based on activity from the
CREATING
state, this tokens charged will be fixed once an AudienceList enters theACTIVE
orFAILED
states.- Type
- row_count¶
Output only. The total number of rows in the AudienceList result.
This field is a member of oneof
_row_count
.- Type
- error_message¶
Output only. Error message is populated when an audience list fails during creation. A common reason for such a failure is quota exhaustion.
This field is a member of oneof
_error_message
.- Type
- percentage_completed¶
Output only. The percentage completed for this audience export ranging between 0 to 100.
This field is a member of oneof
_percentage_completed
.- Type
- recurring_audience_list¶
Output only. The recurring audience list that created this audience list. Recurring audience lists create audience lists daily.
If audience lists are created directly, they will have no associated recurring audience list, and this field will be blank.
This field is a member of oneof
_recurring_audience_list
.- Type
- webhook_notification¶
Optional. Configures webhook notifications to be sent from the Google Analytics Data API to your webhook server. Use of webhooks is optional. If unused, you’ll need to poll this API to determine when an audience list is ready to be used. Webhooks allow a notification to be sent to your servers & avoid the need for polling.
Either one or two POST requests will be sent to the webhook. The first POST request will be sent immediately showing the newly created audience list in its CREATING state. The second POST request will be sent after the audience list completes creation (either the ACTIVE or FAILED state).
If identical audience lists are requested in quick succession, the second & subsequent audience lists can be served from cache. In that case, the audience list create method can return an audience list is already ACTIVE. In this scenario, only one POST request will be sent to the webhook.
This field is a member of oneof
_webhook_notification
.
- class State(value)[source]¶
Bases:
proto.enums.Enum
The AudienceList currently exists in this state.
- Values:
- STATE_UNSPECIFIED (0):
Unspecified state will never be used.
- CREATING (1):
The AudienceList is currently creating and will be available in the future. Creating occurs immediately after the CreateAudienceList call.
- ACTIVE (2):
The AudienceList is fully created and ready for querying. An AudienceList is updated to active asynchronously from a request; this occurs some time (for example 15 minutes) after the initial create call.
- FAILED (3):
The AudienceList failed to be created. It is possible that re-requesting this audience list will succeed.
- class google.analytics.data_v1alpha.types.AudienceListMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
This metadata is currently blank.
- class google.analytics.data_v1alpha.types.AudienceRow(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Dimension value attributes for the audience user row.
- dimension_values¶
Each dimension value attribute for an audience user. One dimension value will be added for each dimension column requested.
- Type
MutableSequence[google.analytics.data_v1alpha.types.AudienceDimensionValue]
- class google.analytics.data_v1alpha.types.BetweenFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
To express that the result needs to be between two numbers (inclusive).
- from_value¶
Begins with this number.
- to_value¶
Ends with this number.
- class google.analytics.data_v1alpha.types.Cohort(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Defines a cohort selection criteria. A cohort is a group of users who share a common characteristic. For example, users with the same
firstSessionDate
belong to the same cohort.- name¶
Assigns a name to this cohort. The dimension
cohort
is 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
- date_range¶
The cohort selects users whose first touch date is between start date and end date defined in the
dateRange
. ThisdateRange
does not specify the full date range of event data that is present in a cohort report. In a cohort report, thisdateRange
is extended by the granularity and offset present in thecohortsRange
; event data for the extended reporting date range is present in a cohort report.In a cohort request, this
dateRange
is required and thedateRanges
in theRunReportRequest
orRunPivotReportRequest
must be unspecified.This
dateRange
should generally be aligned with the cohort’s granularity. IfCohortsRange
uses daily granularity, thisdateRange
can be a single day. IfCohortsRange
uses weekly granularity, thisdateRange
can be aligned to a week boundary, starting at Sunday and ending Saturday. IfCohortsRange
uses monthly granularity, thisdateRange
can be aligned to a month, starting at the first and ending on the last day of the month.
- class google.analytics.data_v1alpha.types.CohortReportSettings(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Optional settings of a cohort report.
- class google.analytics.data_v1alpha.types.CohortSpec(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The specification of cohorts for a cohort report.
Cohort reports create a time series of user retention for the cohort. For example, you could select the cohort of users that were acquired in the first week of September and follow that cohort for the next six weeks. Selecting the users acquired in the first week of September cohort is specified in the
cohort
object. Following that cohort for the next six weeks is specified in thecohortsRange
object.For examples, see Cohort Report Examples.
The report response could show a weekly time series where say your app has retained 60% of this cohort after three weeks and 25% of this cohort after six weeks. These two percentages can be calculated by the metric
cohortActiveUsers/cohortTotalUsers
and will be separate rows in the report.- cohorts¶
Defines the selection criteria to group users into cohorts. Most cohort reports define only a single cohort. If multiple cohorts are specified, each cohort can be recognized in the report by their name.
- Type
MutableSequence[google.analytics.data_v1alpha.types.Cohort]
- cohorts_range¶
Cohort reports follow cohorts over an extended reporting date range. This range specifies an offset duration to follow the cohorts over.
- cohort_report_settings¶
Optional settings for a cohort report.
- class google.analytics.data_v1alpha.types.CohortsRange(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Configures the extended reporting date range for a cohort report. Specifies an offset duration to follow the cohorts over.
- granularity¶
Required. The granularity used to interpret the
startOffset
andendOffset
for the extended reporting date range for a cohort report.
- start_offset¶
startOffset
specifies the start date of the extended reporting date range for a cohort report.startOffset
is commonly set to 0 so that reports contain data from the acquisition of the cohort forward.If
granularity
isDAILY
, thestartDate
of the extended reporting date range isstartDate
of the cohort plusstartOffset
days.If
granularity
isWEEKLY
, thestartDate
of the extended reporting date range isstartDate
of the cohort plusstartOffset * 7
days.If
granularity
isMONTHLY
, thestartDate
of the extended reporting date range isstartDate
of the cohort plusstartOffset * 30
days.- Type
- end_offset¶
Required.
endOffset
specifies the end date of the extended reporting date range for a cohort report.endOffset
can be any positive integer but is commonly set to 5 to 10 so that reports contain data on the cohort for the next several granularity time periods.If
granularity
isDAILY
, theendDate
of the extended reporting date range isendDate
of the cohort plusendOffset
days.If
granularity
isWEEKLY
, theendDate
of the extended reporting date range isendDate
of the cohort plusendOffset * 7
days.If
granularity
isMONTHLY
, theendDate
of the extended reporting date range isendDate
of the cohort plusendOffset * 30
days.- Type
- class Granularity(value)[source]¶
Bases:
proto.enums.Enum
The granularity used to interpret the
startOffset
andendOffset
for the extended reporting date range for a cohort report.- Values:
- GRANULARITY_UNSPECIFIED (0):
Should never be specified.
- DAILY (1):
Daily granularity. Commonly used if the cohort’s
dateRange
is a single day and the request containscohortNthDay
.- WEEKLY (2):
Weekly granularity. Commonly used if the cohort’s
dateRange
is a week in duration (starting on Sunday and ending on Saturday) and the request containscohortNthWeek
.- MONTHLY (3):
Monthly granularity. Commonly used if the cohort’s
dateRange
is a month in duration and the request containscohortNthMonth
.
- class google.analytics.data_v1alpha.types.CreateAudienceListRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A request to create a new audience list.
- parent¶
Required. The parent resource where this audience list will be created. Format:
properties/{property}
- Type
- audience_list¶
Required. The audience list to create.
- class google.analytics.data_v1alpha.types.CreateRecurringAudienceListRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A request to create a new recurring audience list.
- parent¶
Required. The parent resource where this recurring audience list will be created. Format:
properties/{property}
- Type
- recurring_audience_list¶
Required. The recurring audience list to create.
- class google.analytics.data_v1alpha.types.CreateReportTaskRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A request to create a report task.
- parent¶
Required. The parent resource where this report task will be created. Format:
properties/{propertyId}
- Type
- report_task¶
Required. The report task configuration to create.
- class google.analytics.data_v1alpha.types.DateRange(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A 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
, ortoday
is 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
, ortoday
is 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.Message
Dimensions 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, the city could be “Paris” or “New York”.
- name¶
The name of the dimension. See the API Dimensions for the list of dimension names supported by core reporting methods such as
runReport
andbatchRunReports
. See Realtime Dimensions for the list of dimension names supported by therunRealtimeReport
method. See Funnel Dimensions for the list of dimension names supported by therunFunnelReport
method.If
dimensionExpression
is specified,name
can be any string that you would like within the allowed character set. For example if adimensionExpression
concatenatescountry
andcity
, you could call that dimensioncountryAndCity
. Dimension names that you choose must match the regular expression^[a-zA-Z0-9_]$
.Dimensions are referenced by
name
indimensionFilter
,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).
- class google.analytics.data_v1alpha.types.DimensionExpression(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Used to express a dimension which is the result of a formula of multiple dimensions. Example usages:
lower_case(dimension)
concatenate(dimension1, symbol, dimension2).
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- lower_case¶
Used to convert a dimension value to lower case.
This field is a member of oneof
one_expression
.
- upper_case¶
Used to convert a dimension value to upper case.
This field is a member of oneof
one_expression
.
- concatenate¶
Used to combine dimension values to a single dimension. For example, dimension “country, city”: concatenate(country, “, “, city).
This field is a member of oneof
one_expression
.
- class CaseExpression(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Used to convert a dimension value to a single case.
- class ConcatenateExpression(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Used 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
MutableSequence[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.Message
Describes 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.DimensionValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The value of a dimension.
- class google.analytics.data_v1alpha.types.EventCriteriaScoping(value)[source]¶
Bases:
proto.enums.Enum
Scoping specifies which events are considered when evaluating if an event meets a criteria.
- Values:
- EVENT_CRITERIA_SCOPING_UNSPECIFIED (0):
Unspecified criteria scoping. Do not specify.
- EVENT_CRITERIA_WITHIN_SAME_EVENT (1):
If the criteria is satisfied within one event, the event matches the criteria.
- class google.analytics.data_v1alpha.types.EventExclusionDuration(value)[source]¶
Bases:
proto.enums.Enum
Enumerates options for how long an exclusion will last if an event matches the
eventExclusionCriteria
.- Values:
- EVENT_EXCLUSION_DURATION_UNSPECIFIED (0):
Unspecified exclusion duration. Do not specify.
- EVENT_EXCLUSION_PERMANENT (1):
Permanently exclude events from the segment if the event ever meets the
eventExclusionCriteria
condition.
- class google.analytics.data_v1alpha.types.EventSegment(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Event segments are subsets of events that were triggered on your site or app. for example, all purchase events made in a particular location; app_exception events that occurred on a specific operating system.
- event_inclusion_criteria¶
Defines which events are included in this segment. Optional.
- exclusion¶
Defines which events are excluded in this segment. Optional.
- class google.analytics.data_v1alpha.types.EventSegmentConditionGroup(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Conditions tell Analytics what data to include in or exclude from the segment.
- condition_scoping¶
conditionScoping
should always beEVENT_CRITERIA_WITHIN_SAME_EVENT
.Optional. If unspecified, a
conditionScoping
ofEVENT_CRITERIA_WITHIN_SAME_EVENT
is used.
- segment_filter_expression¶
Data is included or excluded from the segment based on if it matches this expression. Expressions express criteria on dimension, metrics, and/or parameters.
- class google.analytics.data_v1alpha.types.EventSegmentCriteria(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
An event matches a criteria if the event meet the conditions in the criteria.
- and_condition_groups¶
An event matches this criteria if the event matches each of these
andConditionGroups
.- Type
MutableSequence[google.analytics.data_v1alpha.types.EventSegmentConditionGroup]
- class google.analytics.data_v1alpha.types.EventSegmentExclusion(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Specifies which events are excluded in this segment.
- event_exclusion_duration¶
eventExclusionDuration
should always bePERMANENTLY_EXCLUDE
.Optional. If unspecified, an
eventExclusionDuration
ofEVENT_EXCLUSION_PERMANENT
is used.
- event_exclusion_criteria¶
If an event meets this condition, the event is excluded from membership in the segment for the
eventExclusionDuration
.
- class google.analytics.data_v1alpha.types.Filter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
An expression to filter dimension or metric values.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- field_name¶
The dimension name or metric name. Must be a name defined in dimensions or metrics.
- Type
- class google.analytics.data_v1alpha.types.FilterExpression(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
To express dimension or metric filters. The fields in the same FilterExpression need to be either all dimensions or all metrics.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- and_group¶
The FilterExpressions in and_group have an AND relationship.
This field is a member of oneof
expr
.
- or_group¶
The FilterExpressions in or_group have an OR relationship.
This field is a member of oneof
expr
.
- not_expression¶
The FilterExpression is NOT of not_expression.
This field is a member of oneof
expr
.
- class google.analytics.data_v1alpha.types.FilterExpressionList(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A list of filter expressions.
- expressions¶
A list of filter expressions.
- Type
MutableSequence[google.analytics.data_v1alpha.types.FilterExpression]
- class google.analytics.data_v1alpha.types.Funnel(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Configures the funnel in a funnel report request. A funnel reports on users as they pass through a sequence of steps.
Funnel exploration lets you visualize the steps your users take to complete a task and quickly see how well they are succeeding or failing at each step. For example, how do prospects become shoppers and then become buyers? How do one time buyers become repeat buyers? With this information, you can improve inefficient or abandoned customer journeys.
- is_open_funnel¶
In an open funnel, users can enter the funnel in any step, and in a closed funnel, users must enter the funnel in the first step. Optional. If unspecified, a closed funnel is used.
- Type
- steps¶
The sequential steps of this funnel.
- Type
MutableSequence[google.analytics.data_v1alpha.types.FunnelStep]
- class google.analytics.data_v1alpha.types.FunnelBreakdown(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Breakdowns add a dimension to the funnel table sub report response.
- breakdown_dimension¶
The dimension column added to the funnel table sub report response. The breakdown dimension breaks down each funnel step. A valid
breakdownDimension
is required iffunnelBreakdown
is specified.
- class google.analytics.data_v1alpha.types.FunnelEventFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Creates a filter that matches events of a single event name. If a parameter filter expression is specified, only the subset of events that match both the single event name and the parameter filter expressions match this event filter.
- event_name¶
This filter matches events of this single event name. Event name is required.
This field is a member of oneof
_event_name
.- Type
- class google.analytics.data_v1alpha.types.FunnelFieldFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
An expression to filter dimension or metric values.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- class google.analytics.data_v1alpha.types.FunnelFilterExpression(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Expresses combinations of funnel filters.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- and_group¶
The FunnelFilterExpression in
andGroup
have an AND relationship.This field is a member of oneof
expr
.
- or_group¶
The FunnelFilterExpression in
orGroup
have an OR relationship.This field is a member of oneof
expr
.
- not_expression¶
The FunnelFilterExpression is NOT of
notExpression
.This field is a member of oneof
expr
.
- funnel_field_filter¶
A funnel filter for a dimension or metric.
This field is a member of oneof
expr
.
- class google.analytics.data_v1alpha.types.FunnelFilterExpressionList(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A list of funnel filter expressions.
- expressions¶
The list of funnel filter expressions.
- Type
MutableSequence[google.analytics.data_v1alpha.types.FunnelFilterExpression]
- class google.analytics.data_v1alpha.types.FunnelNextAction(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Next actions state the value for a dimension after the user has achieved a step but before the same user has achieved the next step. For example if the
nextActionDimension
iseventName
, thennextActionDimension
in thei
th funnel step row will return first event after the event that qualified the user into thei
th funnel step but before the user achieved thei+1
th funnel step.- next_action_dimension¶
The dimension column added to the funnel visualization sub report response. The next action dimension returns the next dimension value of this dimension after the user has attained the
i
th funnel step.nextActionDimension
currently only supportseventName
and most Page / Screen dimensions likepageTitle
andpagePath
.nextActionDimension
cannot be a dimension expression.
- class google.analytics.data_v1alpha.types.FunnelParameterFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
An expression to filter parameter values in a funnel.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- event_parameter_name¶
This filter will be evaluated on the specified event parameter. Event parameters are logged as parameters of the event. Event parameters include fields like “firebase_screen” & “currency”.
Event parameters can only be used in segments & funnels and can only be used in a descendent filter from an EventFilter. In a descendent filter from an EventFilter either event or item parameters should be used.
This field is a member of oneof
one_parameter
.- Type
- item_parameter_name¶
This filter will be evaluated on the specified item parameter. Item parameters are logged as parameters in the item array. Item parameters include fields like “item_name” & “item_category”.
Item parameters can only be used in segments & funnels and can only be used in a descendent filter from an EventFilter. In a descendent filter from an EventFilter either event or item parameters should be used.
Item parameters are only available in ecommerce events. To learn more about ecommerce events, see the [Measure ecommerce] (https://developers.google.com/analytics/devguides/collection/ga4/ecommerce) guide.
This field is a member of oneof
one_parameter
.- Type
- class google.analytics.data_v1alpha.types.FunnelParameterFilterExpression(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Expresses combinations of funnel filters on parameters.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- and_group¶
The FunnelParameterFilterExpression in
andGroup
have an AND relationship.This field is a member of oneof
expr
.
- or_group¶
The FunnelParameterFilterExpression in
orGroup
have an OR relationship.This field is a member of oneof
expr
.
- not_expression¶
The FunnelParameterFilterExpression is NOT of
notExpression
.This field is a member of oneof
expr
.
- class google.analytics.data_v1alpha.types.FunnelParameterFilterExpressionList(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A list of funnel parameter filter expressions.
- expressions¶
The list of funnel parameter filter expressions.
- Type
MutableSequence[google.analytics.data_v1alpha.types.FunnelParameterFilterExpression]
- class google.analytics.data_v1alpha.types.FunnelResponseMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The funnel report’s response metadata carries additional information about the funnel report.
- sampling_metadatas¶
If funnel report results are sampled, this describes what percentage of events were used in this funnel report. One
samplingMetadatas
is populated for each date range. EachsamplingMetadatas
corresponds to a date range in order that date ranges were specified in the request.However if the results are not sampled, this field will not be defined.
- Type
MutableSequence[google.analytics.data_v1alpha.types.SamplingMetadata]
- class google.analytics.data_v1alpha.types.FunnelStep(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Steps define the user journey you want to measure. Steps contain one or more conditions that your users must meet to be included in that step of the funnel journey.
- name¶
The distinctive name for this step. If unspecified, steps will be named by a 1 based indexed name (for example “0. “, “1. “, etc.). This name defines string value returned by the
funnelStepName
dimension. For example, specifyingname = Purchase
in the request’s third funnel step will produce3. Purchase
in the funnel report response.- Type
- is_directly_followed_by¶
If true, this step must directly follow the previous step. If false, there can be events between the previous step and this step. If unspecified,
isDirectlyFollowedBy
is treated as false.- Type
- within_duration_from_prior_step¶
If specified, this step must complete within this duration of the completion of the prior step.
withinDurationFromPriorStep
is inclusive of the endpoint at the microsecond granularity. For example a duration of 5 seconds can be completed at 4.9 or 5.0 seconds, but not 5 seconds and 1 microsecond.withinDurationFromPriorStep
is optional, and if unspecified, steps may be separated by any time duration.This field is a member of oneof
_within_duration_from_prior_step
.
- filter_expression¶
The condition that your users must meet to be included in this step of the funnel journey.
- class google.analytics.data_v1alpha.types.FunnelSubReport(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Funnel sub reports contain the dimension and metric data values. For example, 12 users reached the second step of the funnel.
- dimension_headers¶
Describes dimension columns. Funnel reports always include the funnel step dimension in sub report responses. Additional dimensions like breakdowns, dates, and next actions may be present in the response if requested.
- Type
MutableSequence[google.analytics.data_v1alpha.types.DimensionHeader]
- metric_headers¶
Describes metric columns. Funnel reports always include active users in sub report responses. The funnel table includes additional metrics like completion rate, abandonments, and abandonments rate.
- Type
MutableSequence[google.analytics.data_v1alpha.types.MetricHeader]
- rows¶
Rows of dimension value combinations and metric values in the report.
- Type
MutableSequence[google.analytics.data_v1alpha.types.Row]
- metadata¶
Metadata for the funnel report.
- class google.analytics.data_v1alpha.types.GetAudienceListRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A request to retrieve configuration metadata about a specific audience list.
- class google.analytics.data_v1alpha.types.GetPropertyQuotasSnapshotRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A request to return the PropertyQuotasSnapshot for a given category.
- class google.analytics.data_v1alpha.types.GetRecurringAudienceListRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A request to retrieve configuration metadata about a specific recurring audience list.
- class google.analytics.data_v1alpha.types.GetReportTaskRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A request to retrieve configuration metadata about a specific report task.
- class google.analytics.data_v1alpha.types.InListFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The result needs to be in a list of string values.
- class google.analytics.data_v1alpha.types.ListAudienceListsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A request to list all audience lists for a property.
- parent¶
Required. All audience lists for this property will be listed in the response. Format:
properties/{property}
- Type
- page_size¶
Optional. The maximum number of audience lists to return. The service may return fewer than this value. If unspecified, at most 200 audience lists will be returned. The maximum value is 1000 (higher values will be coerced to the maximum).
- Type
- class google.analytics.data_v1alpha.types.ListAudienceListsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A list of all audience lists for a property.
- audience_lists¶
Each audience list for a property.
- Type
MutableSequence[google.analytics.data_v1alpha.types.AudienceList]
- class google.analytics.data_v1alpha.types.ListRecurringAudienceListsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A request to list all recurring audience lists for a property.
- parent¶
Required. All recurring audience lists for this property will be listed in the response. Format:
properties/{property}
- Type
- page_size¶
Optional. The maximum number of recurring audience lists to return. The service may return fewer than this value. If unspecified, at most 200 recurring audience lists will be returned. The maximum value is 1000 (higher values will be coerced to the maximum).
- Type
- class google.analytics.data_v1alpha.types.ListRecurringAudienceListsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A list of all recurring audience lists for a property.
- recurring_audience_lists¶
Each recurring audience list for a property.
- Type
MutableSequence[google.analytics.data_v1alpha.types.RecurringAudienceList]
- class google.analytics.data_v1alpha.types.ListReportTasksRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A request to list all report tasks for a property.
- parent¶
Required. All report tasks for this property will be listed in the response. Format:
properties/{property}
- Type
- class google.analytics.data_v1alpha.types.ListReportTasksResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A list of all report tasks for a property.
- report_tasks¶
Each report task for a property.
- Type
MutableSequence[google.analytics.data_v1alpha.types.ReportTask]
- class google.analytics.data_v1alpha.types.Metric(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The quantitative measurements of a report. For example, the metric
eventCount
is 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 supported by core reporting methods such as
runReport
andbatchRunReports
. See Realtime Metrics for the list of metric names supported by therunRealtimeReport
method. See Funnel Metrics for the list of metric names supported by therunFunnelReport
method.If
expression
is specified,name
can be any string that you would like within the allowed character set. For example ifexpression
isscreenPageViews/sessions
, you could call that metric’s name =viewsPerSession
. Metric names that you choose must match the regular expression^[a-zA-Z0-9_]$
.Metrics are referenced by
name
inmetricFilter
,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.MetricAggregation(value)[source]¶
Bases:
proto.enums.Enum
Represents aggregation of metrics.
- Values:
- METRIC_AGGREGATION_UNSPECIFIED (0):
Unspecified operator.
- TOTAL (1):
SUM operator.
- MINIMUM (5):
Minimum operator.
- MAXIMUM (6):
Maximum operator.
- COUNT (4):
Count operator.
- class google.analytics.data_v1alpha.types.MetricHeader(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Describes 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.
- class google.analytics.data_v1alpha.types.MetricType(value)[source]¶
Bases:
proto.enums.Enum
A metric’s value type.
- Values:
- METRIC_TYPE_UNSPECIFIED (0):
Unspecified type.
- TYPE_INTEGER (1):
Integer type.
- TYPE_FLOAT (2):
Floating point type.
- TYPE_SECONDS (4):
A duration of seconds; a special floating point type.
- TYPE_MILLISECONDS (5):
A duration in milliseconds; a special floating point type.
- TYPE_MINUTES (6):
A duration in minutes; a special floating point type.
- TYPE_HOURS (7):
A duration in hours; a special floating point type.
- TYPE_STANDARD (8):
A custom metric of standard type; a special floating point type.
- TYPE_CURRENCY (9):
An amount of money; a special floating point type.
- TYPE_FEET (10):
A length in feet; a special floating point type.
- TYPE_MILES (11):
A length in miles; a special floating point type.
- TYPE_METERS (12):
A length in meters; a special floating point type.
- TYPE_KILOMETERS (13):
A length in kilometers; a special floating point type.
- class google.analytics.data_v1alpha.types.MetricValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The value of a metric.
- class google.analytics.data_v1alpha.types.NumericFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Filters for numeric or date values.
- operation¶
The operation type for this filter.
- value¶
A numeric value or a date value.
- class Operation(value)[source]¶
Bases:
proto.enums.Enum
The operation applied to a numeric filter
- Values:
- OPERATION_UNSPECIFIED (0):
Unspecified.
- EQUAL (1):
Equal
- LESS_THAN (2):
Less than
- LESS_THAN_OR_EQUAL (3):
Less than or equal
- GREATER_THAN (4):
Greater than
- GREATER_THAN_OR_EQUAL (5):
Greater than or equal
- class google.analytics.data_v1alpha.types.NumericValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
To represent a number.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- class google.analytics.data_v1alpha.types.OrderBy(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Order bys define how rows will be sorted in the response. For example, ordering rows by descending event count is one ordering, and ordering rows by the event name string is a different ordering.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- class DimensionOrderBy(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Sorts by dimension values.
- order_type¶
Controls the rule for dimension value ordering.
- class OrderType(value)[source]¶
Bases:
proto.enums.Enum
Rule to order the string dimension values by.
- Values:
- ORDER_TYPE_UNSPECIFIED (0):
Unspecified.
- ALPHANUMERIC (1):
Alphanumeric sort by Unicode code point. For example, “2” < “A” < “X” < “b” < “z”.
- CASE_INSENSITIVE_ALPHANUMERIC (2):
Case insensitive alphanumeric sort by lower case Unicode code point. For example, “2” < “A” < “b” < “X” < “z”.
- NUMERIC (3):
Dimension values are converted to numbers before sorting. For example in NUMERIC sort, “25” < “100”, and in
ALPHANUMERIC
sort, “100” < “25”. Non-numeric dimension values all have equal ordering value below all numeric values.
- class MetricOrderBy(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Sorts by metric values.
- class google.analytics.data_v1alpha.types.PropertyQuota(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Current 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 200,000 tokens per day; Analytics 360 Properties can use 2,000,000 tokens per day. Most requests consume fewer than 10 tokens.
- tokens_per_hour¶
Standard Analytics Properties can use up to 40,000 tokens per hour; Analytics 360 Properties can use 400,000 tokens per hour. An API request consumes a single number of tokens, and that number is deducted from all of the hourly, daily, and per project hourly quotas.
- concurrent_requests¶
Standard Analytics Properties can send up to 10 concurrent requests; Analytics 360 Properties can use up to 50 concurrent requests.
- 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.
- potentially_thresholded_requests_per_hour¶
Analytics Properties can send up to 120 requests with potentially thresholded dimensions per hour. In a batch request, each report request is individually counted for this quota if the request contains potentially thresholded dimensions.
- tokens_per_project_per_hour¶
Analytics Properties can use up to 35% of their tokens per project per hour. This amounts to standard Analytics Properties can use up to 14,000 tokens per project per hour, and Analytics 360 Properties can use 140,000 tokens per project per hour. An API request consumes a single number of tokens, and that number is deducted from all of the hourly, daily, and per project hourly quotas.
- class google.analytics.data_v1alpha.types.PropertyQuotasSnapshot(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Current state of all Property Quotas organized by quota category.
- core_property_quota¶
Property Quota for core property tokens
- realtime_property_quota¶
Property Quota for realtime property tokens
- funnel_property_quota¶
Property Quota for funnel property tokens
- class google.analytics.data_v1alpha.types.QueryAudienceListRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A request to list users in an audience list.
- name¶
Required. The name of the audience list to retrieve users from. Format:
properties/{property}/audienceLists/{audience_list}
- Type
- offset¶
Optional. The row count of the start row. The first row is counted as row 0.
When paging, the first request does not specify offset; or equivalently, sets offset to 0; the first request returns the first
limit
of rows. The second request sets offset to thelimit
of the first request; the second request returns the secondlimit
of rows.To learn more about this pagination parameter, see Pagination.
- Type
- limit¶
Optional. The number of rows to return. If unspecified, 10,000 rows are returned. The API returns a maximum of 250,000 rows per request, no matter how many you ask for.
limit
must be positive.The API can also return fewer rows than the requested
limit
, if there aren’t as many dimension values as thelimit
.To learn more about this pagination parameter, see Pagination.
- Type
- class google.analytics.data_v1alpha.types.QueryAudienceListResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A list of users in an audience list.
- audience_list¶
Configuration data about AudienceList being queried. Returned to help interpret the audience rows in this response. For example, the dimensions in this AudienceList correspond to the columns in the AudienceRows.
This field is a member of oneof
_audience_list
.
- audience_rows¶
Rows for each user in an audience list. The number of rows in this response will be less than or equal to request’s page size.
- Type
MutableSequence[google.analytics.data_v1alpha.types.AudienceRow]
- row_count¶
The total number of rows in the AudienceList result.
rowCount
is independent of the number of rows returned in the response, thelimit
request parameter, and theoffset
request parameter. For example if a query returns 175 rows and includeslimit
of 50 in the API request, the response will containrowCount
of 175 but only 50 rows.To learn more about this pagination parameter, see Pagination.
This field is a member of oneof
_row_count
.- Type
- class google.analytics.data_v1alpha.types.QueryReportTaskRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A request to fetch the report content for a report task.
- offset¶
Optional. The row count of the start row in the report. The first row is counted as row 0.
When paging, the first request does not specify offset; or equivalently, sets offset to 0; the first request returns the first
limit
of rows. The second request sets offset to thelimit
of the first request; the second request returns the secondlimit
of rows.To learn more about this pagination parameter, see Pagination.
- Type
- limit¶
Optional. The number of rows to return from the report. If unspecified, 10,000 rows are returned. The API returns a maximum of 250,000 rows per request, no matter how many you ask for.
limit
must be positive.The API can also return fewer rows than the requested
limit
, if there aren’t as many dimension values as thelimit
. The number of rows available to a QueryReportTaskRequest is further limited by the limit of the associated ReportTask. A query can retrieve at most ReportTask.limit rows. For example, if the ReportTask has a limit of 1,000, then a QueryReportTask request with offset=900 and limit=500 will return at most 100 rows.To learn more about this pagination parameter, see Pagination.
- Type
- class google.analytics.data_v1alpha.types.QueryReportTaskResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The report content corresponding to a report task.
- dimension_headers¶
Describes dimension columns. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.
- Type
MutableSequence[google.analytics.data_v1alpha.types.DimensionHeader]
- metric_headers¶
Describes metric columns. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.
- Type
MutableSequence[google.analytics.data_v1alpha.types.MetricHeader]
- rows¶
Rows of dimension value combinations and metric values in the report.
- Type
MutableSequence[google.analytics.data_v1alpha.types.Row]
- totals¶
If requested, the totaled values of metrics.
- Type
MutableSequence[google.analytics.data_v1alpha.types.Row]
- maximums¶
If requested, the maximum values of metrics.
- Type
MutableSequence[google.analytics.data_v1alpha.types.Row]
- minimums¶
If requested, the minimum values of metrics.
- Type
MutableSequence[google.analytics.data_v1alpha.types.Row]
- metadata¶
Metadata for the report.
- class google.analytics.data_v1alpha.types.QuotaStatus(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Current state for a particular quota group.
- class google.analytics.data_v1alpha.types.RecurringAudienceList(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A recurring audience list produces new audience lists each day. Audience lists are users in an audience at the time of the list’s creation. A recurring audience list ensures that you have audience list based on the most recent data available for use each day.
- name¶
Output only. Identifier. The recurring audience list resource name assigned during creation. This resource name identifies this
RecurringAudienceList
.Format:
properties/{property}/recurringAudienceLists/{recurring_audience_list}
- Type
- audience¶
Required. The audience resource name. This resource name identifies the audience being listed and is shared between the Analytics Data & Admin APIs.
Format:
properties/{property}/audiences/{audience}
- Type
- audience_display_name¶
Output only. The descriptive display name for this audience. For example, “Purchasers”.
- Type
- dimensions¶
Required. The dimensions requested and displayed in the audience list response.
- Type
MutableSequence[google.analytics.data_v1alpha.types.AudienceDimension]
- active_days_remaining¶
Optional. The number of remaining days that a recurring audience export will produce an audience list instance. This counter decreases by one each day, and when it reaches zero, no new audience lists will be created.
Recurring audience list request for Analytics 360 properties default to 180 days and have a maximum of 365 days. Requests for standard Analytics properties default to 14 days and have a maximum of 30 days.
The minimum value allowed during creation is 1. Requests above their respective maximum will be coerced to their maximum.
This field is a member of oneof
_active_days_remaining
.- Type
- audience_lists¶
Output only. Audience list resource names for audience list instances created for this recurring audience list. One audience list is created for each day, and the audience list will be listed here.
This list is ordered with the most recently created audience list first.
- Type
MutableSequence[str]
- webhook_notification¶
Optional. Configures webhook notifications to be sent from the Google Analytics Data API to your webhook server. Use of webhooks is optional. If unused, you’ll need to poll this API to determine when a recurring audience list creates new audience lists. Webhooks allow a notification to be sent to your servers & avoid the need for polling.
Two POST requests will be sent each time a recurring audience list creates an audience list. This happens once per day until a recurring audience list reaches 0 active days remaining. The first request will be sent showing a newly created audience list in its CREATING state. The second request will be sent after the audience list completes creation (either the ACTIVE or FAILED state).
This field is a member of oneof
_webhook_notification
.
- class google.analytics.data_v1alpha.types.ReportTask(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A specific report task configuration.
- name¶
Output only. Identifier. The report task resource name assigned during creation. Format: “properties/{property}/reportTasks/{report_task}”.
- Type
- report_definition¶
Optional. A report definition to fetch report data, which describes the structure of a report. It typically includes the fields that will be included in the report and the criteria that will be used to filter the data.
- report_metadata¶
Output only. The report metadata for a specific report task, which provides information about a report. It typically includes the following information: the resource name of the report, the state of the report, the timestamp the report was created, etc,
- class ReportDefinition(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The definition of how a report should be run.
- dimensions¶
Optional. The dimensions requested and displayed.
- Type
MutableSequence[google.analytics.data_v1alpha.types.Dimension]
- metrics¶
Optional. The metrics requested and displayed.
- Type
MutableSequence[google.analytics.data_v1alpha.types.Metric]
- date_ranges¶
Optional. 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
dateRanges
must be unspecified.- Type
MutableSequence[google.analytics.data_v1alpha.types.DateRange]
- dimension_filter¶
Optional. Dimension filters let you ask for only specific dimension values in the report. To learn more, see Fundamentals of Dimension Filters for examples. Metrics cannot be used in this filter.
- metric_filter¶
Optional. The filter clause of metrics. Applied after aggregating the report’s rows, similar to SQL having-clause. Dimensions cannot be used in this filter.
- offset¶
Optional. The row count of the start row from Google Analytics Storage. The first row is counted as row 0.
When creating a report task, the
offset
andlimit
parameters define the subset of data rows from Google Analytics storage to be included in the generated report. For example, if there are a total of 300,000 rows in Google Analytics storage, the initial report task may have the first 10,000 rows with a limit of 10,000 and an offset of 0. Subsequently, another report task could cover the next 10,000 rows with a limit of 10,000 and an offset of 10,000.- Type
- limit¶
Optional. The number of rows to return in the Report. If unspecified, 10,000 rows are returned. The API returns a maximum of 250,000 rows per request, no matter how many you ask for.
limit
must be positive.The API can also return fewer rows than the requested
limit
, if there aren’t as many dimension values as thelimit
. For instance, there are fewer than 300 possible values for the dimensioncountry
, so when reporting on onlycountry
, you can’t get more than 300 rows, even if you setlimit
to a higher value.- Type
- metric_aggregations¶
Optional. Aggregation of metrics. Aggregated metric values will be shown in rows where the dimension_values are set to “RESERVED_(MetricAggregation)”.
- Type
MutableSequence[google.analytics.data_v1alpha.types.MetricAggregation]
- order_bys¶
Optional. Specifies how rows are ordered in the response.
- Type
MutableSequence[google.analytics.data_v1alpha.types.OrderBy]
- currency_code¶
Optional. A currency code in ISO4217 format, such as “AED”, “USD”, “JPY”. If the field is empty, the report uses the property’s default currency.
- Type
- cohort_spec¶
Optional. Cohort group associated with this request. If there is a cohort group in the request the ‘cohort’ dimension must be present.
- keep_empty_rows¶
Optional. 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.
Regardless of this
keep_empty_rows
setting, only data recorded by the Google Analytics property can be displayed in a report.For example if a property never logs a
purchase
event, then a query for theeventName
dimension andeventCount
metric will not have a row containing eventName: “purchase” and eventCount: 0.- Type
- class ReportMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The report metadata for a specific report task.
- begin_creating_time¶
Output only. The time when
CreateReportTask
was called and the report began theCREATING
state.This field is a member of oneof
_begin_creating_time
.
- creation_quota_tokens_charged¶
Output only. The total quota tokens charged during creation of the report. Because this token count is based on activity from the
CREATING
state, this tokens charge will be fixed once a report task enters theACTIVE
orFAILED
state.- Type
- task_row_count¶
Output only. The total number of rows in the report result. This field will be populated when the state is active. You can utilize
task_row_count
for pagination within the confines of their existing report.This field is a member of oneof
_task_row_count
.- Type
- error_message¶
Output only. Error message is populated if a report task fails during creation.
This field is a member of oneof
_error_message
.- Type
- total_row_count¶
Output only. The total number of rows in Google Analytics storage. If you want to query additional data rows beyond the current report, they can initiate a new report task based on the
total_row_count
.The
task_row_count
represents the number of rows specifically pertaining to the current report, whereastotal_row_count
encompasses the total count of rows across all data retrieved from Google Analytics storage.For example, suppose the current report’s
task_row_count
is 20, displaying the data from the first 20 rows. Simultaneously, thetotal_row_count
is 30, indicating the presence of data for all 30 rows. Thetask_row_count
can be utilizated to paginate through the initial 20 rows. To expand the report and include data from all 30 rows, a new report task can be created using the total_row_count to access the full set of 30 rows’ worth of data.This field is a member of oneof
_total_row_count
.- Type
- class State(value)[source]¶
Bases:
proto.enums.Enum
The processing state.
- Values:
- STATE_UNSPECIFIED (0):
Unspecified state will never be used.
- CREATING (1):
The report is currently creating and will be available in the future. Creating occurs immediately after the CreateReport call.
- ACTIVE (2):
The report is fully created and ready for querying.
- FAILED (3):
The report failed to be created.
- class google.analytics.data_v1alpha.types.ReportTaskMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Represents the metadata of a long-running operation. Currently, this metadata is blank.
- class google.analytics.data_v1alpha.types.ResponseMetaData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response’s metadata carrying additional information about the report content.
- data_loss_from_other_row¶
If true, indicates some buckets of dimension combinations are rolled into “(other)” row. This can happen for high cardinality reports.
The metadata parameter dataLossFromOtherRow is populated based on the aggregated data table used in the report. The parameter will be accurately populated regardless of the filters and limits in the report.
For example, the (other) row could be dropped from the report because the request contains a filter on sessionSource = google. This parameter will still be populated if data loss from other row was present in the input aggregate data used to generate this report.
To learn more, see About the (other) row and data sampling.
- Type
- schema_restriction_response¶
Describes the schema restrictions actively enforced in creating this report. To learn more, see Access and data-restriction management.
This field is a member of oneof
_schema_restriction_response
.
- currency_code¶
The currency code used in this report. Intended to be used in formatting currency metrics like
purchaseRevenue
for visualization. If currency_code was specified in the request, this response parameter will echo the request parameter; otherwise, this response parameter is the property’s current currency_code.Currency codes are string encodings of currency types from the ISO 4217 standard (https://en.wikipedia.org/wiki/ISO_4217); for example “USD”, “EUR”, “JPY”. To learn more, see https://support.google.com/analytics/answer/9796179.
This field is a member of oneof
_currency_code
.- Type
- time_zone¶
The property’s current timezone. Intended to be used to interpret time-based dimensions like
hour
andminute
. Formatted as strings from the IANA Time Zone database (https://www.iana.org/time-zones); for example “America/New_York” or “Asia/Tokyo”.This field is a member of oneof
_time_zone
.- Type
- empty_reason¶
If empty reason is specified, the report is empty for this reason.
This field is a member of oneof
_empty_reason
.- Type
- subject_to_thresholding¶
If
subjectToThresholding
is true, this report is subject to thresholding and only returns data that meets the minimum aggregation thresholds. It is possible for a request to be subject to thresholding thresholding and no data is absent from the report, and this happens when all data is above the thresholds. To learn more, see Data thresholds and About Demographics and Interests.This field is a member of oneof
_subject_to_thresholding
.- Type
- class SchemaRestrictionResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The schema restrictions actively enforced in creating this report. To learn more, see Access and data-restriction management.
- active_metric_restrictions¶
All restrictions actively enforced in creating the report. For example,
purchaseRevenue
always has the restriction typeREVENUE_DATA
. However, this active response restriction is only populated if the user’s custom role disallows access toREVENUE_DATA
.
- class ActiveMetricRestriction(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A metric actively restricted in creating the report.
- restricted_metric_types¶
The reason for this metric’s restriction.
- Type
MutableSequence[google.analytics.data_v1alpha.types.RestrictedMetricType]
- class google.analytics.data_v1alpha.types.RestrictedMetricType(value)[source]¶
Bases:
proto.enums.Enum
Categories of data that you may be restricted from viewing on certain Google Analytics properties.
- Values:
- RESTRICTED_METRIC_TYPE_UNSPECIFIED (0):
Unspecified type.
- COST_DATA (1):
Cost metrics such as
adCost
.- REVENUE_DATA (2):
Revenue metrics such as
purchaseRevenue
.
- class google.analytics.data_v1alpha.types.Row(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Report 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
MutableSequence[google.analytics.data_v1alpha.types.DimensionValue]
- metric_values¶
List of requested visible metric values.
- Type
MutableSequence[google.analytics.data_v1alpha.types.MetricValue]
- class google.analytics.data_v1alpha.types.RunFunnelReportRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The request for a funnel report.
- property¶
Optional. A Google Analytics 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. Within a batch request, this property should either be unspecified or consistent with the batch-level property.
Example: properties/1234
- Type
- date_ranges¶
Optional. 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.
- Type
MutableSequence[google.analytics.data_v1alpha.types.DateRange]
- funnel¶
Optional. The configuration of this request’s funnel. This funnel configuration is required.
- funnel_breakdown¶
Optional. If specified, this breakdown adds a dimension to the funnel table sub report response. This breakdown dimension expands each funnel step to the unique values of the breakdown dimension. For example, a breakdown by the
deviceCategory
dimension will create rows formobile
,tablet
,desktop
, and the total.
- funnel_next_action¶
Optional. If specified, next action adds a dimension to the funnel visualization sub report response. This next action dimension expands each funnel step to the unique values of the next action. For example a next action of the
eventName
dimension will create rows for several events (for examplesession_start
&click
) and the total.Next action only supports
eventName
and most Page / Screen dimensions likepageTitle
andpagePath
.
- funnel_visualization_type¶
Optional. The funnel visualization type controls the dimensions present in the funnel visualization sub report response. If not specified,
STANDARD_FUNNEL
is used.
- segments¶
Optional. The configurations of segments. Segments are subsets of a property’s data. In a funnel report with segments, the funnel is evaluated in each segment.
Each segment specified in this request produces a separate row in the response; in the response, each segment identified by its name.
The segments parameter is optional. Requests are limited to 4 segments.
- Type
MutableSequence[google.analytics.data_v1alpha.types.Segment]
- limit¶
Optional. The number of rows to return. If unspecified, 10,000 rows are returned. The API returns a maximum of 250,000 rows per request, no matter how many you ask for.
limit
must be positive.The API can also return fewer rows than the requested
limit
, if there aren’t as many dimension values as thelimit
.- Type
- dimension_filter¶
Optional. Dimension filters allow you to ask for only specific dimension values in the report. To learn more, see Creating a Report: Dimension Filters for examples. Metrics cannot be used in this filter.
- return_property_quota¶
Optional. Toggles whether to return the current state of this Analytics Property’s quota. Quota is returned in PropertyQuota.
- Type
- class FunnelVisualizationType(value)[source]¶
Bases:
proto.enums.Enum
Controls the dimensions present in the funnel visualization sub report response.
- Values:
- FUNNEL_VISUALIZATION_TYPE_UNSPECIFIED (0):
Unspecified type.
- STANDARD_FUNNEL (1):
A standard (stepped) funnel. The funnel visualization sub report in the response will not contain date.
- TRENDED_FUNNEL (2):
A trended (line chart) funnel. The funnel visualization sub report in the response will contain the date dimension.
- class google.analytics.data_v1alpha.types.RunFunnelReportResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The funnel report response contains two sub reports. The two sub reports are different combinations of dimensions and metrics.
- funnel_table¶
The funnel table is a report with the funnel step, segment, breakdown dimension, active users, completion rate, abandonments, and abandonments rate.
The segment dimension is only present in this response if a segment was requested. The breakdown dimension is only present in this response if it was requested.
- funnel_visualization¶
The funnel visualization is a report with the funnel step, segment, date, next action dimension, and active users.
The segment dimension is only present in this response if a segment was requested. The date dimension is only present in this response if it was requested through the
TRENDED_FUNNEL
funnel type. The next action dimension is only present in the response if it was requested.
- property_quota¶
This Analytics Property’s quota state including this request.
- class google.analytics.data_v1alpha.types.SamplingLevel(value)[source]¶
Bases:
proto.enums.Enum
Categories of sampling levels for the requests.
- Values:
- SAMPLING_LEVEL_UNSPECIFIED (0):
Unspecified type.
- LOW (1):
Applies a sampling level of 10 million to standard properties and 100 million to Google Analytics 360 properties.
- MEDIUM (2):
Exclusive to Google Analytics 360 properties with a sampling level of 1 billion.
- UNSAMPLED (3):
Exclusive to Google Analytics 360 properties. Unsampled explorations are more accurate and can reveal insights that aren’t visible in standard explorations. To learn more, see https://support.google.com/analytics/answer/10896953.
- class google.analytics.data_v1alpha.types.SamplingMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
If funnel report results are sampled, this metadata describes what percentage of events were used in this funnel report for a date range. Sampling is the practice of analyzing a subset of all data in order to uncover the meaningful information in the larger data set.
- samples_read_count¶
The total number of events read in this sampled report for a date range. This is the size of the subset this property’s data that was analyzed in this funnel report.
- Type
- sampling_space_size¶
The total number of events present in this property’s data that could have been analyzed in this funnel report for a date range. Sampling uncovers the meaningful information about the larger data set, and this is the size of the larger data set.
To calculate the percentage of available data that was used in this funnel report, compute
samplesReadCount/samplingSpaceSize
.- Type
- class google.analytics.data_v1alpha.types.Segment(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A segment is a subset of your Analytics data. For example, of your entire set of users, one segment might be users from a particular country or city. Another segment might be users who purchase a particular line of products or who visit a specific part of your site or trigger certain events in your app.
To learn more, see Segment Builder.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- name¶
The name for this segment. If unspecified, segments are named “Segment”. This name defines string value returned by the
segment
dimension. Thesegment
dimension prefixes segment names by the 1-based index number of the segment in the request (for example “1. Segment”, “2. Segment”, etc.).- Type
- user_segment¶
User segments are subsets of users who engaged with your site or app.
This field is a member of oneof
one_segment_scope
.
- session_segment¶
Session segments are subsets of the sessions that occurred on your site or app.
This field is a member of oneof
one_segment_scope
.
- class google.analytics.data_v1alpha.types.SegmentEventFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Creates a filter that matches events of a single event name. If a parameter filter expression is specified, only the subset of events that match both the single event name and the parameter filter expressions match this event filter.
- event_name¶
This filter matches events of this single event name. Event name is required.
This field is a member of oneof
_event_name
.- Type
- segment_parameter_filter_expression¶
If specified, this filter matches events that match both the single event name and the parameter filter expressions.
Inside the parameter filter expression, only parameter filters are available.
This field is a member of oneof
_segment_parameter_filter_expression
.
- class google.analytics.data_v1alpha.types.SegmentFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
An expression to filter dimension or metric values.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- filter_scoping¶
Specifies the scope for the filter.
- class google.analytics.data_v1alpha.types.SegmentFilterExpression(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Expresses combinations of segment filters.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- and_group¶
The SegmentFilterExpression in
andGroup
have an AND relationship.This field is a member of oneof
expr
.
- or_group¶
The SegmentFilterExpression in
orGroup
have an OR relationship.This field is a member of oneof
expr
.
- not_expression¶
The SegmentFilterExpression is NOT of
notExpression
.This field is a member of oneof
expr
.
- class google.analytics.data_v1alpha.types.SegmentFilterExpressionList(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A list of segment filter expressions.
- expressions¶
The list of segment filter expressions
- Type
MutableSequence[google.analytics.data_v1alpha.types.SegmentFilterExpression]
- class google.analytics.data_v1alpha.types.SegmentFilterScoping(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Scopings specify how the dimensions & metrics of multiple events should be considered when evaluating a segment filter.
- at_any_point_in_time¶
If
atAnyPointInTime
is true, this filter evaluates to true for all events if it evaluates to true for any event in the date range of the request.This
atAnyPointInTime
parameter does not extend the date range of events in the report. IfatAnyPointInTime
is true, only events within the report’s date range are considered when evaluating this filter.This
atAnyPointInTime
is only able to be specified if the criteria scoping isACROSS_ALL_SESSIONS
and is not able to be specified in sequences.If the criteria scoping is
ACROSS_ALL_SESSIONS
,atAnyPointInTime
= false is used if unspecified.This field is a member of oneof
_at_any_point_in_time
.- Type
- class google.analytics.data_v1alpha.types.SegmentParameterFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
An expression to filter parameter values in a segment.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- event_parameter_name¶
This filter will be evaluated on the specified event parameter. Event parameters are logged as parameters of the event. Event parameters include fields like “firebase_screen” & “currency”.
Event parameters can only be used in segments & funnels and can only be used in a descendent filter from an EventFilter. In a descendent filter from an EventFilter either event or item parameters should be used.
This field is a member of oneof
one_parameter
.- Type
- item_parameter_name¶
This filter will be evaluated on the specified item parameter. Item parameters are logged as parameters in the item array. Item parameters include fields like “item_name” & “item_category”.
Item parameters can only be used in segments & funnels and can only be used in a descendent filter from an EventFilter. In a descendent filter from an EventFilter either event or item parameters should be used.
Item parameters are only available in ecommerce events. To learn more about ecommerce events, see the [Measure ecommerce] (https://developers.google.com/analytics/devguides/collection/ga4/ecommerce) guide.
This field is a member of oneof
one_parameter
.- Type
- filter_scoping¶
Specifies the scope for the filter.
- class google.analytics.data_v1alpha.types.SegmentParameterFilterExpression(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Expresses combinations of segment filter on parameters.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- and_group¶
The SegmentParameterFilterExpression in
andGroup
have an AND relationship.This field is a member of oneof
expr
.
- or_group¶
The SegmentParameterFilterExpression in
orGroup
have an OR relationship.This field is a member of oneof
expr
.
- not_expression¶
The SegmentParameterFilterExpression is NOT of
notExpression
.This field is a member of oneof
expr
.
- class google.analytics.data_v1alpha.types.SegmentParameterFilterExpressionList(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A list of segment parameter filter expressions.
- expressions¶
The list of segment parameter filter expressions.
- Type
MutableSequence[google.analytics.data_v1alpha.types.SegmentParameterFilterExpression]
- class google.analytics.data_v1alpha.types.SegmentParameterFilterScoping(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Scopings specify how multiple events should be considered when evaluating a segment parameter filter.
- in_any_n_day_period¶
Accumulates the parameter over the specified period of days before applying the filter. Only supported if criteria scoping is
ACROSS_ALL_SESSIONS
orWITHIN_SAME_SESSION
. Only supported if the parameter isevent_count
.For example if
inAnyNDayPeriod
is 3, the event_name is “purchase”, the event parameter is “event_count”, and the Filter’s criteria is greater than 5, this filter will accumulate the event count of purchase events over every 3 consecutive day period in the report’s date range; a user will pass this Filter’s criteria to be included in this segment if their count of purchase events exceeds 5 in any 3 consecutive day period. For example, the periods 2021-11-01 to 2021-11-03, 2021-11-02 to 2021-11-04, 2021-11-03 to 2021-11-05, and etc. will be considered.The date range is not extended for the purpose of having a full N day window near the start of the date range. For example if a report is for 2021-11-01 to 2021-11-10 and
inAnyNDayPeriod
= 3, the first two day period will be effectively shortened because no event data outside the report’s date range will be read. For example, the first four periods will effectively be: 2021-11-01 to 2021-11-01, 2021-11-01 to 2021-11-02, 2021-11-01 to 2021-11-03, and 2021-11-02 to 2021-11-04.inAnyNDayPeriod
is optional. If not specified, thesegmentParameterFilter
is applied to each event individually.This field is a member of oneof
_in_any_n_day_period
.- Type
- class google.analytics.data_v1alpha.types.SessionCriteriaScoping(value)[source]¶
Bases:
proto.enums.Enum
Scoping specifies which events are considered when evaluating if a session meets a criteria.
- Values:
- SESSION_CRITERIA_SCOPING_UNSPECIFIED (0):
Unspecified criteria scoping. Do not specify.
- SESSION_CRITERIA_WITHIN_SAME_EVENT (1):
If the criteria is satisfied within one event, the session matches the criteria.
- SESSION_CRITERIA_WITHIN_SAME_SESSION (2):
If the criteria is satisfied within one session, the session matches the criteria.
- class google.analytics.data_v1alpha.types.SessionExclusionDuration(value)[source]¶
Bases:
proto.enums.Enum
Enumerates options for how long an exclusion will last if a session matches the
sessionExclusionCriteria
.- Values:
- SESSION_EXCLUSION_DURATION_UNSPECIFIED (0):
Unspecified exclusion duration. Do not specify.
- SESSION_EXCLUSION_TEMPORARY (1):
Temporarily exclude sessions from the segment during periods when the session meets the
sessionExclusionCriteria
condition.- SESSION_EXCLUSION_PERMANENT (2):
Permanently exclude sessions from the segment if the session ever meets the
sessionExclusionCriteria
condition.
- class google.analytics.data_v1alpha.types.SessionSegment(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Session segments are subsets of the sessions that occurred on your site or app: for example, all the sessions that originated from a particular advertising campaign.
- session_inclusion_criteria¶
Defines which sessions are included in this segment. Optional.
- exclusion¶
Defines which sessions are excluded in this segment. Optional.
- class google.analytics.data_v1alpha.types.SessionSegmentConditionGroup(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Conditions tell Analytics what data to include in or exclude from the segment.
- condition_scoping¶
Data is included or excluded from the segment based on if it matches the condition group. This scoping defines how many events the
segmentFilterExpression
is evaluated on before the condition group is determined to be matched or not. For example ifconditionScoping = SESSION_CRITERIA_WITHIN_SAME_SESSION
, the expression is evaluated on all events in a session, and then, the condition group is determined to be matched or not for this session. For example ifconditionScoping = SESSION_CRITERIA_WITHIN_SAME_EVENT
, the expression is evaluated on a single event, and then, the condition group is determined to be matched or not for this session.Optional. If unspecified, a
conditionScoping
ofWITHIN_SAME_SESSION
is used.
- segment_filter_expression¶
Data is included or excluded from the segment based on if it matches this expression. Expressions express criteria on dimension, metrics, and/or parameters.
- class google.analytics.data_v1alpha.types.SessionSegmentCriteria(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A session matches a criteria if the session’s events meet the conditions in the criteria.
- and_condition_groups¶
A session matches this criteria if the session matches each of these
andConditionGroups
.- Type
MutableSequence[google.analytics.data_v1alpha.types.SessionSegmentConditionGroup]
- class google.analytics.data_v1alpha.types.SessionSegmentExclusion(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Specifies which sessions are excluded in this segment.
- session_exclusion_duration¶
Specifies how long an exclusion will last if a session matches the
sessionExclusionCriteria
.Optional. If unspecified, a
sessionExclusionDuration
ofSESSION_EXCLUSION_TEMPORARY
is used.
- session_exclusion_criteria¶
If a session meets this condition, the session is excluded from membership in the segment for the
sessionExclusionDuration
.
- class google.analytics.data_v1alpha.types.SheetExportAudienceListRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A request to export users in an audience list to a Google Sheet.
- name¶
Required. The name of the audience list to retrieve users from. Format:
properties/{property}/audienceLists/{audience_list}
- Type
- offset¶
Optional. The row count of the start row. The first row is counted as row 0.
When paging, the first request does not specify offset; or equivalently, sets offset to 0; the first request returns the first
limit
of rows. The second request sets offset to thelimit
of the first request; the second request returns the secondlimit
of rows.To learn more about this pagination parameter, see Pagination.
- Type
- limit¶
Optional. The number of rows to return. If unspecified, 10,000 rows are returned. The API returns a maximum of 250,000 rows per request, no matter how many you ask for.
limit
must be positive.The API can also return fewer rows than the requested
limit
, if there aren’t as many dimension values as thelimit
.To learn more about this pagination parameter, see Pagination.
- Type
- class google.analytics.data_v1alpha.types.SheetExportAudienceListResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The created Google Sheet with the list of users in an audience list.
- spreadsheet_uri¶
A uri for you to visit in your browser to view the Google Sheet.
This field is a member of oneof
_spreadsheet_uri
.- Type
- spreadsheet_id¶
An ID that identifies the created Google Sheet resource.
This field is a member of oneof
_spreadsheet_id
.- Type
- row_count¶
The total number of rows in the AudienceList result.
rowCount
is independent of the number of rows returned in the response, thelimit
request parameter, and theoffset
request parameter. For example if a query returns 175 rows and includeslimit
of 50 in the API request, the response will containrowCount
of 175 but only 50 rows.To learn more about this pagination parameter, see Pagination.
This field is a member of oneof
_row_count
.- Type
- audience_list¶
Configuration data about AudienceList being exported. Returned to help interpret the AudienceList in the Google Sheet of this response.
For example, the AudienceList may have more rows than are present in the Google Sheet, and in that case, you may want to send an additional sheet export request with a different
offset
value to retrieve the next page of rows in an additional Google Sheet.This field is a member of oneof
_audience_list
.
- class google.analytics.data_v1alpha.types.StringFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The filter for string
- match_type¶
The match type for this filter.
- class MatchType(value)[source]¶
Bases:
proto.enums.Enum
The match type of a string filter
- Values:
- MATCH_TYPE_UNSPECIFIED (0):
Unspecified
- EXACT (1):
Exact match of the string value.
- BEGINS_WITH (2):
Begins with the string value.
- ENDS_WITH (3):
Ends with the string value.
- CONTAINS (4):
Contains the string value.
- FULL_REGEXP (5):
Full match for the regular expression with the string value.
- PARTIAL_REGEXP (6):
Partial match for the regular expression with the string value.
- class google.analytics.data_v1alpha.types.UserCriteriaScoping(value)[source]¶
Bases:
proto.enums.Enum
Scoping specifies which events are considered when evaluating if a user meets a criteria.
- Values:
- USER_CRITERIA_SCOPING_UNSPECIFIED (0):
Unspecified criteria scoping. Do not specify.
- USER_CRITERIA_WITHIN_SAME_EVENT (1):
If the criteria is satisfied within one event, the user matches the criteria.
- USER_CRITERIA_WITHIN_SAME_SESSION (2):
If the criteria is satisfied within one session, the user matches the criteria.
- USER_CRITERIA_ACROSS_ALL_SESSIONS (3):
If the criteria is satisfied by any events for the user, the user matches the criteria.
- class google.analytics.data_v1alpha.types.UserExclusionDuration(value)[source]¶
Bases:
proto.enums.Enum
Enumerates options for how long an exclusion will last if a user matches the
userExclusionCriteria
.- Values:
- USER_EXCLUSION_DURATION_UNSPECIFIED (0):
Unspecified exclusion duration. Do not specify.
- USER_EXCLUSION_TEMPORARY (1):
Temporarily exclude users from the segment during periods when the user meets the
userExclusionCriteria
condition.- USER_EXCLUSION_PERMANENT (2):
Permanently exclude users from the segment if the user ever meets the
userExclusionCriteria
condition.
- class google.analytics.data_v1alpha.types.UserSegment(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
User segments are subsets of users who engaged with your site or app. For example, users who have previously purchased; users who added items to their shopping carts, but didn’t complete a purchase.
- user_inclusion_criteria¶
Defines which users are included in this segment. Optional.
- exclusion¶
Defines which users are excluded in this segment. Optional.
- class google.analytics.data_v1alpha.types.UserSegmentConditionGroup(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Conditions tell Analytics what data to include in or exclude from the segment.
- condition_scoping¶
Data is included or excluded from the segment based on if it matches the condition group. This scoping defines how many events the
segmentFilterExpression
is evaluated on before the condition group is determined to be matched or not. For example ifconditionScoping = USER_CRITERIA_WITHIN_SAME_SESSION
, the expression is evaluated on all events in a session, and then, the condition group is determined to be matched or not for this user. For example ifconditionScoping = USER_CRITERIA_WITHIN_SAME_EVENT
, the expression is evaluated on a single event, and then, the condition group is determined to be matched or not for this user.Optional. If unspecified,
conditionScoping = ACROSS_ALL_SESSIONS
is used.
- segment_filter_expression¶
Data is included or excluded from the segment based on if it matches this expression. Expressions express criteria on dimension, metrics, and/or parameters.
- class google.analytics.data_v1alpha.types.UserSegmentCriteria(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A user matches a criteria if the user’s events meet the conditions in the criteria.
- and_condition_groups¶
A user matches this criteria if the user matches each of these
andConditionGroups
and each of theandSequenceGroups
.andConditionGroups
may be empty ifandSequenceGroups
are specified.- Type
MutableSequence[google.analytics.data_v1alpha.types.UserSegmentConditionGroup]
- and_sequence_groups¶
A user matches this criteria if the user matches each of these
andSequenceGroups
and each of theandConditionGroups
.andSequenceGroups
may be empty ifandConditionGroups
are specified.- Type
MutableSequence[google.analytics.data_v1alpha.types.UserSegmentSequenceGroup]
- class google.analytics.data_v1alpha.types.UserSegmentExclusion(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Specifies which users are excluded in this segment.
- user_exclusion_duration¶
Specifies how long an exclusion will last if a user matches the
userExclusionCriteria
.Optional. If unspecified,
userExclusionDuration
ofUSER_EXCLUSION_TEMPORARY
is used.
- user_exclusion_criteria¶
If a user meets this condition, the user is excluded from membership in the segment for the
userExclusionDuration
.
- class google.analytics.data_v1alpha.types.UserSegmentSequenceGroup(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Define conditions that must occur in a specific order for the user to be a member of the segment.
- sequence_scoping¶
All sequence steps must be satisfied in the scoping for the user to match the sequence. For example if
sequenceScoping = USER_CRITERIA_WITHIN_SAME_SESSION
, all sequence steps must complete within one session for the user to match the sequence.sequenceScoping = USER_CRITERIA_WITHIN_SAME_EVENT
is not supported.Optional. If unspecified,
conditionScoping = ACROSS_ALL_SESSIONS
is used.
- sequence_maximum_duration¶
Defines the time period in which the whole sequence must occur; for example, 30 Minutes.
sequenceMaximumDuration
is inclusive of the endpoint at the microsecond granularity. For example a sequence with a maximum duration of 5 seconds can be completed at 4.9 or 5.0 seconds, but not 5 seconds and 1 microsecond.sequenceMaximumDuration
is optional, and if unspecified, sequences can be completed in any time duration.
- user_sequence_steps¶
An ordered sequence of condition steps. A user’s events must complete each step in order for the user to match the
UserSegmentSequenceGroup
.- Type
MutableSequence[google.analytics.data_v1alpha.types.UserSequenceStep]
- class google.analytics.data_v1alpha.types.UserSequenceStep(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A condition that must occur in the specified step order for this user to match the sequence.
- is_directly_followed_by¶
If true, the event satisfying this step must be the very next event after the event satifying the last step. If false, this step indirectly follows the prior step; for example, there may be events between the prior step and this step.
isDirectlyFollowedBy
must be false for the first step.- Type
- step_scoping¶
This sequence step must be satisfied in the scoping for the user to match the sequence. For example if
sequenceScoping = WITHIN_SAME_SESSION
, this sequence steps must complete within one session for the user to match the sequence.stepScoping = ACROSS_ALL_SESSIONS
is only allowed if thesequenceScoping = ACROSS_ALL_SESSIONS
.Optional. If unspecified,
stepScoping
uses the sameUserCriteriaScoping
as thesequenceScoping
.
- segment_filter_expression¶
A user matches this sequence step if their events match this expression. Expressions express criteria on dimension, metrics, and/or parameters.
- class google.analytics.data_v1alpha.types.WebhookNotification(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Configures a long-running operation resource to send a webhook notification from the Google Analytics Data API to your webhook server when the resource updates.
Notification configurations contain private values & are only visible to your GCP project. Different GCP projects may attach different webhook notifications to the same long-running operation resource.
- uri¶
Optional. The web address that will receive the webhook notification. This address will receive POST requests as the state of the long running operation resource changes. The POST request will contain both a JSON version of the long running operation resource in the body and a
sentTimestamp
field. The sent timestamp will specify the unix microseconds since the epoch that the request was sent; this lets you identify replayed notifications.An example URI is
https://us-central1-example-project-id.cloudfunctions.net/example-function-1
.The URI must use HTTPS and point to a site with a valid SSL certificate on the web server. The URI must have a maximum string length of 128 characters & use only the allowlisted characters from RFC 1738.
When your webhook server receives a notification, it is expected to reply with an HTTP response status code of 200 within 5 seconds.
A URI is required to use webhook notifications.
Requests to this webhook server will contain an ID token authenticating the service account
google-analytics-audience-export@system.gserviceaccount.com
. To learn more about ID tokens, see https://cloud.google.com/docs/authentication/token-types#id. For Google Cloud Functions, this lets you configure your function to require authentication. In Cloud IAM, you will need to grant the service account permissions to the Cloud Run Invoker (roles/run.invoker
) & Cloud Functions Invoker (roles/cloudfunctions.invoker
) roles for the webhook post request to pass Google Cloud Functions authentication. This API can send webhook notifications to arbitrary URIs; for webhook servers other than Google Cloud Functions, this ID token in the authorization bearer header should be ignored if it is not needed.This field is a member of oneof
_uri
.- Type
- channel_token¶
Optional. The channel token is an arbitrary string value and must have a maximum string length of 64 characters. Channel tokens allow you to verify the source of a webhook notification. This guards against the message being spoofed. The channel token will be specified in the
X-Goog-Channel-Token
HTTP header of the webhook POST request.A channel token is not required to use webhook notifications.
This field is a member of oneof
_channel_token
.- Type