As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Analytics Admin v1beta API

class google.analytics.admin_v1beta.types.AccessBetweenFilter(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.

Type

google.analytics.admin_v1beta.types.NumericValue

to_value

Ends with this number.

Type

google.analytics.admin_v1beta.types.NumericValue

class google.analytics.admin_v1beta.types.AccessDateRange(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A contiguous range of days: startDate, startDate + 1, …, endDate.

start_date

The inclusive start date for the query in the format YYYY-MM-DD. Cannot be after endDate. The format NdaysAgo, yesterday, or today is also accepted, and in that case, the date is inferred based on the current time in the request’s time zone.

Type

str

end_date

The inclusive end date for the query in the format YYYY-MM-DD. Cannot be before startDate. The format NdaysAgo, yesterday, or today is also accepted, and in that case, the date is inferred based on the current time in the request’s time zone.

Type

str

class google.analytics.admin_v1beta.types.AccessDimension(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Dimensions are attributes of your data. For example, the dimension userEmail indicates the email of the user that accessed reporting data. Dimension values in report responses are strings.

dimension_name

The API name of the dimension. See Data Access Schema for the list of dimensions supported in this API.

Dimensions are referenced by name in dimensionFilter and orderBys.

Type

str

class google.analytics.admin_v1beta.types.AccessDimensionHeader(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.

dimension_name

The dimension’s name; for example ‘userEmail’.

Type

str

class google.analytics.admin_v1beta.types.AccessDimensionValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The value of a dimension.

value

The dimension value. For example, this value may be ‘France’ for the ‘country’ dimension.

Type

str

class google.analytics.admin_v1beta.types.AccessFilter(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.

string_filter

Strings related filter.

This field is a member of oneof one_filter.

Type

google.analytics.admin_v1beta.types.AccessStringFilter

in_list_filter

A filter for in list values.

This field is a member of oneof one_filter.

Type

google.analytics.admin_v1beta.types.AccessInListFilter

numeric_filter

A filter for numeric or date values.

This field is a member of oneof one_filter.

Type

google.analytics.admin_v1beta.types.AccessNumericFilter

between_filter

A filter for two values.

This field is a member of oneof one_filter.

Type

google.analytics.admin_v1beta.types.AccessBetweenFilter

field_name

The dimension name or metric name.

Type

str

class google.analytics.admin_v1beta.types.AccessFilterExpression(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Expresses dimension or metric filters. The fields in the same expression 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

Each of the FilterExpressions in the and_group has an AND relationship.

This field is a member of oneof one_expression.

Type

google.analytics.admin_v1beta.types.AccessFilterExpressionList

or_group

Each of the FilterExpressions in the or_group has an OR relationship.

This field is a member of oneof one_expression.

Type

google.analytics.admin_v1beta.types.AccessFilterExpressionList

not_expression

The FilterExpression is NOT of not_expression.

This field is a member of oneof one_expression.

Type

google.analytics.admin_v1beta.types.AccessFilterExpression

access_filter

A primitive filter. In the same FilterExpression, all of the filter’s field names need to be either all dimensions or all metrics.

This field is a member of oneof one_expression.

Type

google.analytics.admin_v1beta.types.AccessFilter

class google.analytics.admin_v1beta.types.AccessFilterExpressionList(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.admin_v1beta.types.AccessFilterExpression]

class google.analytics.admin_v1beta.types.AccessInListFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The result needs to be in a list of string values.

values

The list of string values. Must be non-empty.

Type

MutableSequence[str]

case_sensitive

If true, the string value is case sensitive.

Type

bool

class google.analytics.admin_v1beta.types.AccessMetric(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The quantitative measurements of a report. For example, the metric accessCount is the total number of data access records.

metric_name

The API name of the metric. See Data Access Schema for the list of metrics supported in this API.

Metrics are referenced by name in metricFilter & orderBys.

Type

str

class google.analytics.admin_v1beta.types.AccessMetricHeader(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.

metric_name

The metric’s name; for example ‘accessCount’.

Type

str

class google.analytics.admin_v1beta.types.AccessMetricValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The value of a metric.

value

The measurement value. For example, this value may be ‘13’.

Type

str

class google.analytics.admin_v1beta.types.AccessNumericFilter(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.

Type

google.analytics.admin_v1beta.types.AccessNumericFilter.Operation

value

A numeric value or a date value.

Type

google.analytics.admin_v1beta.types.NumericValue

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.admin_v1beta.types.AccessOrderBy(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 access count is one ordering, and ordering rows by the country 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.

metric

Sorts results by a metric’s values.

This field is a member of oneof one_order_by.

Type

google.analytics.admin_v1beta.types.AccessOrderBy.MetricOrderBy

dimension

Sorts results by a dimension’s values.

This field is a member of oneof one_order_by.

Type

google.analytics.admin_v1beta.types.AccessOrderBy.DimensionOrderBy

desc

If true, sorts by descending order. If false or unspecified, sorts in ascending order.

Type

bool

class DimensionOrderBy(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Sorts by dimension values.

dimension_name

A dimension name in the request to order by.

Type

str

order_type

Controls the rule for dimension value ordering.

Type

google.analytics.admin_v1beta.types.AccessOrderBy.DimensionOrderBy.OrderType

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.

metric_name

A metric name in the request to order by.

Type

str

class google.analytics.admin_v1beta.types.AccessQuota(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

Properties can use 250,000 tokens per day. Most requests consume fewer than 10 tokens.

Type

google.analytics.admin_v1beta.types.AccessQuotaStatus

tokens_per_hour

Properties can use 50,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.

Type

google.analytics.admin_v1beta.types.AccessQuotaStatus

concurrent_requests

Properties can use up to 50 concurrent requests.

Type

google.analytics.admin_v1beta.types.AccessQuotaStatus

server_errors_per_project_per_hour

Properties and cloud project pairs can have up to 50 server errors per hour.

Type

google.analytics.admin_v1beta.types.AccessQuotaStatus

tokens_per_project_per_hour

Properties can use up to 25% of their tokens per project per hour. This amounts to Analytics 360 Properties can use 12,500 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.

Type

google.analytics.admin_v1beta.types.AccessQuotaStatus

class google.analytics.admin_v1beta.types.AccessQuotaStatus(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Current state for a particular quota group.

consumed

Quota consumed by this request.

Type

int

remaining

Quota remaining after this request.

Type

int

class google.analytics.admin_v1beta.types.AccessRow(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Access report data for each row.

dimension_values

List of dimension values. These values are in the same order as specified in the request.

Type

MutableSequence[google.analytics.admin_v1beta.types.AccessDimensionValue]

metric_values

List of metric values. These values are in the same order as specified in the request.

Type

MutableSequence[google.analytics.admin_v1beta.types.AccessMetricValue]

class google.analytics.admin_v1beta.types.AccessStringFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The filter for strings.

match_type

The match type for this filter.

Type

google.analytics.admin_v1beta.types.AccessStringFilter.MatchType

value

The string value used for the matching.

Type

str

case_sensitive

If true, the string value is case sensitive.

Type

bool

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.admin_v1beta.types.Account(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A resource message representing a Google Analytics account.

name

Output only. Resource name of this account. Format: accounts/{account} Example: “accounts/100”.

Type

str

create_time

Output only. Time when this account was originally created.

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Output only. Time when account payload fields were last updated.

Type

google.protobuf.timestamp_pb2.Timestamp

display_name

Required. Human-readable display name for this account.

Type

str

region_code

Country of business. Must be a Unicode CLDR region code.

Type

str

deleted

Output only. Indicates whether this Account is soft-deleted or not. Deleted accounts are excluded from List results unless specifically requested.

Type

bool

class google.analytics.admin_v1beta.types.AccountSummary(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A virtual resource representing an overview of an account and all its child GA4 properties.

name

Resource name for this account summary. Format: accountSummaries/{account_id} Example: “accountSummaries/1000”.

Type

str

account

Resource name of account referred to by this account summary Format: accounts/{account_id} Example: “accounts/1000”.

Type

str

display_name

Display name for the account referred to in this account summary.

Type

str

property_summaries

List of summaries for child accounts of this account.

Type

MutableSequence[google.analytics.admin_v1beta.types.PropertySummary]

class google.analytics.admin_v1beta.types.AcknowledgeUserDataCollectionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for AcknowledgeUserDataCollection RPC.

property

Required. The property for which to acknowledge user data collection.

Type

str

acknowledgement

Required. An acknowledgement that the caller of this method understands the terms of user data collection.

This field must contain the exact value:

“I acknowledge that I have the necessary privacy disclosures and rights from my end users for the collection and processing of their data, including the association of such data with the visitation information Google Analytics collects from my site and/or app property.”.

Type

str

class google.analytics.admin_v1beta.types.AcknowledgeUserDataCollectionResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for AcknowledgeUserDataCollection RPC.

class google.analytics.admin_v1beta.types.ActionType(value)[source]

Bases: proto.enums.Enum

Types of actions that may change a resource.

Values:
ACTION_TYPE_UNSPECIFIED (0):

Action type unknown or not specified.

CREATED (1):

Resource was created in this change.

UPDATED (2):

Resource was updated in this change.

DELETED (3):

Resource was deleted in this change.

class google.analytics.admin_v1beta.types.ActorType(value)[source]

Bases: proto.enums.Enum

Different kinds of actors that can make changes to Google Analytics resources.

Values:
ACTOR_TYPE_UNSPECIFIED (0):

Unknown or unspecified actor type.

USER (1):

Changes made by the user specified in actor_email.

SYSTEM (2):

Changes made by the Google Analytics system.

SUPPORT (3):

Changes made by Google Analytics support team staff.

class google.analytics.admin_v1beta.types.ArchiveCustomDimensionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ArchiveCustomDimension RPC.

name

Required. The name of the CustomDimension to archive. Example format: properties/1234/customDimensions/5678

Type

str

class google.analytics.admin_v1beta.types.ArchiveCustomMetricRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ArchiveCustomMetric RPC.

name

Required. The name of the CustomMetric to archive. Example format: properties/1234/customMetrics/5678

Type

str

class google.analytics.admin_v1beta.types.ChangeHistoryChange(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A description of a change to a single Google Analytics resource.

resource

Resource name of the resource whose changes are described by this entry.

Type

str

action

The type of action that changed this resource.

Type

google.analytics.admin_v1beta.types.ActionType

resource_before_change

Resource contents from before the change was made. If this resource was created in this change, this field will be missing.

Type

google.analytics.admin_v1beta.types.ChangeHistoryChange.ChangeHistoryResource

resource_after_change

Resource contents from after the change was made. If this resource was deleted in this change, this field will be missing.

Type

google.analytics.admin_v1beta.types.ChangeHistoryChange.ChangeHistoryResource

class ChangeHistoryResource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A snapshot of a resource as before or after the result of a change in change history.

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.

account

A snapshot of an Account resource in change history.

This field is a member of oneof resource.

Type

google.analytics.admin_v1beta.types.Account

property

A snapshot of a Property resource in change history.

This field is a member of oneof resource.

Type

google.analytics.admin_v1beta.types.Property

A snapshot of a FirebaseLink resource in change history.

This field is a member of oneof resource.

Type

google.analytics.admin_v1beta.types.FirebaseLink

A snapshot of a GoogleAdsLink resource in change history.

This field is a member of oneof resource.

Type

google.analytics.admin_v1beta.types.GoogleAdsLink

conversion_event

A snapshot of a ConversionEvent resource in change history.

This field is a member of oneof resource.

Type

google.analytics.admin_v1beta.types.ConversionEvent

measurement_protocol_secret

A snapshot of a MeasurementProtocolSecret resource in change history.

This field is a member of oneof resource.

Type

google.analytics.admin_v1beta.types.MeasurementProtocolSecret

data_retention_settings

A snapshot of a data retention settings resource in change history.

This field is a member of oneof resource.

Type

google.analytics.admin_v1beta.types.DataRetentionSettings

data_stream

A snapshot of a DataStream resource in change history.

This field is a member of oneof resource.

Type

google.analytics.admin_v1beta.types.DataStream

class google.analytics.admin_v1beta.types.ChangeHistoryEvent(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A set of changes within a Google Analytics account or its child properties that resulted from the same cause. Common causes would be updates made in the Google Analytics UI, changes from customer support, or automatic Google Analytics system changes.

id

ID of this change history event. This ID is unique across Google Analytics.

Type

str

change_time

Time when change was made.

Type

google.protobuf.timestamp_pb2.Timestamp

actor_type

The type of actor that made this change.

Type

google.analytics.admin_v1beta.types.ActorType

user_actor_email

Email address of the Google account that made the change. This will be a valid email address if the actor field is set to USER, and empty otherwise. Google accounts that have been deleted will cause an error.

Type

str

changes_filtered

If true, then the list of changes returned was filtered, and does not represent all changes that occurred in this event.

Type

bool

changes

A list of changes made in this change history event that fit the filters specified in SearchChangeHistoryEventsRequest.

Type

MutableSequence[google.analytics.admin_v1beta.types.ChangeHistoryChange]

class google.analytics.admin_v1beta.types.ChangeHistoryResourceType(value)[source]

Bases: proto.enums.Enum

Types of resources whose changes may be returned from change history.

Values:
CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED (0):

Resource type unknown or not specified.

ACCOUNT (1):

Account resource

PROPERTY (2):

Property resource

FIREBASE_LINK (6):

FirebaseLink resource

GOOGLE_ADS_LINK (7):

GoogleAdsLink resource

GOOGLE_SIGNALS_SETTINGS (8):

GoogleSignalsSettings resource

CONVERSION_EVENT (9):

ConversionEvent resource

MEASUREMENT_PROTOCOL_SECRET (10):

MeasurementProtocolSecret resource

DATA_RETENTION_SETTINGS (13):

DataRetentionSettings resource

DISPLAY_VIDEO_360_ADVERTISER_LINK (14):

DisplayVideo360AdvertiserLink resource

DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL (15):

DisplayVideo360AdvertiserLinkProposal resource

DATA_STREAM (18):

DataStream resource

ATTRIBUTION_SETTINGS (20):

AttributionSettings resource

class google.analytics.admin_v1beta.types.ConversionEvent(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A conversion event in a Google Analytics property.

name

Output only. Resource name of this conversion event. Format: properties/{property}/conversionEvents/{conversion_event}

Type

str

event_name

Immutable. The event name for this conversion event. Examples: ‘click’, ‘purchase’

Type

str

create_time

Output only. Time when this conversion event was created in the property.

Type

google.protobuf.timestamp_pb2.Timestamp

deletable

Output only. If set, this event can currently be deleted with DeleteConversionEvent.

Type

bool

custom

Output only. If set to true, this conversion event refers to a custom event. If set to false, this conversion event refers to a default event in GA. Default events typically have special meaning in GA. Default events are usually created for you by the GA system, but in some cases can be created by property admins. Custom events count towards the maximum number of custom conversion events that may be created per property.

Type

bool

counting_method

Optional. The method by which conversions will be counted across multiple events within a session. If this value is not provided, it will be set to ONCE_PER_EVENT.

Type

google.analytics.admin_v1beta.types.ConversionEvent.ConversionCountingMethod

class ConversionCountingMethod(value)[source]

Bases: proto.enums.Enum

The method by which conversions will be counted across multiple events within a session.

Values:
CONVERSION_COUNTING_METHOD_UNSPECIFIED (0):

Counting method not specified.

ONCE_PER_EVENT (1):

Each Event instance is considered a Conversion.

ONCE_PER_SESSION (2):

An Event instance is considered a Conversion at most once per session per user.

class google.analytics.admin_v1beta.types.CreateConversionEventRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for CreateConversionEvent RPC

conversion_event

Required. The conversion event to create.

Type

google.analytics.admin_v1beta.types.ConversionEvent

parent

Required. The resource name of the parent property where this conversion event will be created. Format: properties/123

Type

str

class google.analytics.admin_v1beta.types.CreateCustomDimensionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for CreateCustomDimension RPC.

parent

Required. Example format: properties/1234

Type

str

custom_dimension

Required. The CustomDimension to create.

Type

google.analytics.admin_v1beta.types.CustomDimension

class google.analytics.admin_v1beta.types.CreateCustomMetricRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for CreateCustomMetric RPC.

parent

Required. Example format: properties/1234

Type

str

custom_metric

Required. The CustomMetric to create.

Type

google.analytics.admin_v1beta.types.CustomMetric

class google.analytics.admin_v1beta.types.CreateDataStreamRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for CreateDataStream RPC.

parent

Required. Example format: properties/1234

Type

str

data_stream

Required. The DataStream to create.

Type

google.analytics.admin_v1beta.types.DataStream

class google.analytics.admin_v1beta.types.CreateFirebaseLinkRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for CreateFirebaseLink RPC

parent

Required. Format: properties/{property_id} Example: properties/1234

Type

str

Required. The Firebase link to create.

Type

google.analytics.admin_v1beta.types.FirebaseLink

class google.analytics.admin_v1beta.types.CreateGoogleAdsLinkRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for CreateGoogleAdsLink RPC

parent

Required. Example format: properties/1234

Type

str

Required. The GoogleAdsLink to create.

Type

google.analytics.admin_v1beta.types.GoogleAdsLink

class google.analytics.admin_v1beta.types.CreateMeasurementProtocolSecretRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for CreateMeasurementProtocolSecret RPC

parent

Required. The parent resource where this secret will be created. Format: properties/{property}/dataStreams/{dataStream}

Type

str

measurement_protocol_secret

Required. The measurement protocol secret to create.

Type

google.analytics.admin_v1beta.types.MeasurementProtocolSecret

class google.analytics.admin_v1beta.types.CreatePropertyRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for CreateProperty RPC.

property

Required. The property to create. Note: the supplied property must specify its parent.

Type

google.analytics.admin_v1beta.types.Property

class google.analytics.admin_v1beta.types.CustomDimension(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A definition for a CustomDimension.

name

Output only. Resource name for this CustomDimension resource. Format: properties/{property}/customDimensions/{customDimension}

Type

str

parameter_name

Required. Immutable. Tagging parameter name for this custom dimension. If this is a user-scoped dimension, then this is the user property name. If this is an event-scoped dimension, then this is the event parameter name.

If this is an item-scoped dimension, then this is the parameter name found in the eCommerce items array.

May only contain alphanumeric and underscore characters, starting with a letter. Max length of 24 characters for user-scoped dimensions, 40 characters for event-scoped dimensions.

Type

str

display_name

Required. Display name for this custom dimension as shown in the Analytics UI. Max length of 82 characters, alphanumeric plus space and underscore starting with a letter. Legacy system-generated display names may contain square brackets, but updates to this field will never permit square brackets.

Type

str

description

Optional. Description for this custom dimension. Max length of 150 characters.

Type

str

scope

Required. Immutable. The scope of this dimension.

Type

google.analytics.admin_v1beta.types.CustomDimension.DimensionScope

disallow_ads_personalization

Optional. If set to true, sets this dimension as NPA and excludes it from ads personalization.

This is currently only supported by user-scoped custom dimensions.

Type

bool

class DimensionScope(value)[source]

Bases: proto.enums.Enum

Valid values for the scope of this dimension.

Values:
DIMENSION_SCOPE_UNSPECIFIED (0):

Scope unknown or not specified.

EVENT (1):

Dimension scoped to an event.

USER (2):

Dimension scoped to a user.

ITEM (3):

Dimension scoped to eCommerce items

class google.analytics.admin_v1beta.types.CustomMetric(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A definition for a custom metric.

name

Output only. Resource name for this CustomMetric resource. Format: properties/{property}/customMetrics/{customMetric}

Type

str

parameter_name

Required. Immutable. Tagging name for this custom metric. If this is an event-scoped metric, then this is the event parameter name.

May only contain alphanumeric and underscore charactes, starting with a letter. Max length of 40 characters for event-scoped metrics.

Type

str

display_name

Required. Display name for this custom metric as shown in the Analytics UI. Max length of 82 characters, alphanumeric plus space and underscore starting with a letter. Legacy system-generated display names may contain square brackets, but updates to this field will never permit square brackets.

Type

str

description

Optional. Description for this custom dimension. Max length of 150 characters.

Type

str

measurement_unit

Required. The type for the custom metric’s value.

Type

google.analytics.admin_v1beta.types.CustomMetric.MeasurementUnit

scope

Required. Immutable. The scope of this custom metric.

Type

google.analytics.admin_v1beta.types.CustomMetric.MetricScope

restricted_metric_type

Optional. Types of restricted data that this metric may contain. Required for metrics with CURRENCY measurement unit. Must be empty for metrics with a non-CURRENCY measurement unit.

Type

MutableSequence[google.analytics.admin_v1beta.types.CustomMetric.RestrictedMetricType]

class MeasurementUnit(value)[source]

Bases: proto.enums.Enum

Possible types of representing the custom metric’s value.

Currency representation may change in the future, requiring a breaking API change.

Values:
MEASUREMENT_UNIT_UNSPECIFIED (0):

MeasurementUnit unspecified or missing.

STANDARD (1):

This metric uses default units.

CURRENCY (2):

This metric measures a currency.

FEET (3):

This metric measures feet.

METERS (4):

This metric measures meters.

KILOMETERS (5):

This metric measures kilometers.

MILES (6):

This metric measures miles.

MILLISECONDS (7):

This metric measures milliseconds.

SECONDS (8):

This metric measures seconds.

MINUTES (9):

This metric measures minutes.

HOURS (10):

This metric measures hours.

class MetricScope(value)[source]

Bases: proto.enums.Enum

The scope of this metric.

Values:
METRIC_SCOPE_UNSPECIFIED (0):

Scope unknown or not specified.

EVENT (1):

Metric scoped to an event.

class RestrictedMetricType(value)[source]

Bases: proto.enums.Enum

Labels that mark the data in this custom metric as data that should be restricted to specific users.

Values:
RESTRICTED_METRIC_TYPE_UNSPECIFIED (0):

Type unknown or unspecified.

COST_DATA (1):

Metric reports cost data.

REVENUE_DATA (2):

Metric reports revenue data.

class google.analytics.admin_v1beta.types.DataRetentionSettings(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Settings values for data retention. This is a singleton resource.

name

Output only. Resource name for this DataRetentionSetting resource. Format: properties/{property}/dataRetentionSettings

Type

str

event_data_retention

The length of time that event-level data is retained.

Type

google.analytics.admin_v1beta.types.DataRetentionSettings.RetentionDuration

reset_user_data_on_new_activity

If true, reset the retention period for the user identifier with every event from that user.

Type

bool

class RetentionDuration(value)[source]

Bases: proto.enums.Enum

Valid values for the data retention duration.

Values:
RETENTION_DURATION_UNSPECIFIED (0):

Data retention time duration is not specified.

TWO_MONTHS (1):

The data retention time duration is 2 months.

FOURTEEN_MONTHS (3):

The data retention time duration is 14 months.

TWENTY_SIX_MONTHS (4):

The data retention time duration is 26 months. Available to 360 properties only.

THIRTY_EIGHT_MONTHS (5):

The data retention time duration is 38 months. Available to 360 properties only.

FIFTY_MONTHS (6):

The data retention time duration is 50 months. Available to 360 properties only.

class google.analytics.admin_v1beta.types.DataSharingSettings(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A resource message representing data sharing settings of a Google Analytics account.

name

Output only. Resource name. Format: accounts/{account}/dataSharingSettings Example: “accounts/1000/dataSharingSettings”.

Type

str

sharing_with_google_support_enabled

Allows Google support to access the data in order to help troubleshoot issues.

Type

bool

sharing_with_google_assigned_sales_enabled

Allows Google sales teams that are assigned to the customer to access the data in order to suggest configuration changes to improve results. Sales team restrictions still apply when enabled.

Type

bool

sharing_with_google_any_sales_enabled

Allows any of Google sales to access the data in order to suggest configuration changes to improve results.

Type

bool

sharing_with_google_products_enabled

Allows Google to use the data to improve other Google products or services.

Type

bool

sharing_with_others_enabled

Allows Google to share the data anonymously in aggregate form with others.

Type

bool

class google.analytics.admin_v1beta.types.DataStream(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A resource message representing a data stream.

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.

web_stream_data

Data specific to web streams. Must be populated if type is WEB_DATA_STREAM.

This field is a member of oneof stream_data.

Type

google.analytics.admin_v1beta.types.DataStream.WebStreamData

android_app_stream_data

Data specific to Android app streams. Must be populated if type is ANDROID_APP_DATA_STREAM.

This field is a member of oneof stream_data.

Type

google.analytics.admin_v1beta.types.DataStream.AndroidAppStreamData

ios_app_stream_data

Data specific to iOS app streams. Must be populated if type is IOS_APP_DATA_STREAM.

This field is a member of oneof stream_data.

Type

google.analytics.admin_v1beta.types.DataStream.IosAppStreamData

name

Output only. Resource name of this Data Stream. Format: properties/{property_id}/dataStreams/{stream_id} Example: “properties/1000/dataStreams/2000”.

Type

str

type_

Required. Immutable. The type of this DataStream resource.

Type

google.analytics.admin_v1beta.types.DataStream.DataStreamType

display_name

Human-readable display name for the Data Stream. Required for web data streams.

The max allowed display name length is 255 UTF-16 code units.

Type

str

create_time

Output only. Time when this stream was originally created.

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Output only. Time when stream payload fields were last updated.

Type

google.protobuf.timestamp_pb2.Timestamp

class AndroidAppStreamData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Data specific to Android app streams.

firebase_app_id

Output only. ID of the corresponding Android app in Firebase, if any. This ID can change if the Android app is deleted and recreated.

Type

str

package_name

Immutable. The package name for the app being measured. Example: “com.example.myandroidapp”.

Type

str

class DataStreamType(value)[source]

Bases: proto.enums.Enum

The type of the data stream.

Values:
DATA_STREAM_TYPE_UNSPECIFIED (0):

Type unknown or not specified.

WEB_DATA_STREAM (1):

Web data stream.

ANDROID_APP_DATA_STREAM (2):

Android app data stream.

IOS_APP_DATA_STREAM (3):

iOS app data stream.

class IosAppStreamData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Data specific to iOS app streams.

firebase_app_id

Output only. ID of the corresponding iOS app in Firebase, if any. This ID can change if the iOS app is deleted and recreated.

Type

str

bundle_id

Required. Immutable. The Apple App Store Bundle ID for the app Example: “com.example.myiosapp”.

Type

str

class WebStreamData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Data specific to web streams.

measurement_id

Output only. Analytics Measurement ID.

Example: “G-1A2BCD345E”.

Type

str

firebase_app_id

Output only. ID of the corresponding web app in Firebase, if any. This ID can change if the web app is deleted and recreated.

Type

str

default_uri

Domain name of the web app being measured, or empty. Example: “http://www.google.com”, “https://www.google.com”.

Type

str

class google.analytics.admin_v1beta.types.DeleteAccountRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for DeleteAccount RPC.

name

Required. The name of the Account to soft-delete. Format: accounts/{account} Example: “accounts/100”.

Type

str

class google.analytics.admin_v1beta.types.DeleteConversionEventRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for DeleteConversionEvent RPC

name

Required. The resource name of the conversion event to delete. Format: properties/{property}/conversionEvents/{conversion_event} Example: “properties/123/conversionEvents/456”.

Type

str

class google.analytics.admin_v1beta.types.DeleteDataStreamRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for DeleteDataStream RPC.

name

Required. The name of the DataStream to delete. Example format: properties/1234/dataStreams/5678

Type

str

class google.analytics.admin_v1beta.types.DeleteFirebaseLinkRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for DeleteFirebaseLink RPC

name

Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} Example: properties/1234/firebaseLinks/5678

Type

str

class google.analytics.admin_v1beta.types.DeleteGoogleAdsLinkRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for DeleteGoogleAdsLink RPC.

name

Required. Example format: properties/1234/googleAdsLinks/5678

Type

str

class google.analytics.admin_v1beta.types.DeleteMeasurementProtocolSecretRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for DeleteMeasurementProtocolSecret RPC

name

Required. The name of the MeasurementProtocolSecret to delete. Format:

properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}

Type

str

class google.analytics.admin_v1beta.types.DeletePropertyRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for DeleteProperty RPC.

name

Required. The name of the Property to soft-delete. Format: properties/{property_id} Example: “properties/1000”.

Type

str

Bases: proto.message.Message

A link between a GA4 property and a Firebase project.

name

Output only. Example format: properties/1234/firebaseLinks/5678

Type

str

project

Immutable. Firebase project resource name. When creating a FirebaseLink, you may provide this resource name using either a project number or project ID. Once this resource has been created, returned FirebaseLinks will always have a project_name that contains a project number.

Format: ‘projects/{project number}’ Example: ‘projects/1234’

Type

str

create_time

Output only. Time when this FirebaseLink was originally created.

Type

google.protobuf.timestamp_pb2.Timestamp

class google.analytics.admin_v1beta.types.GetAccountRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for GetAccount RPC.

name

Required. The name of the account to lookup. Format: accounts/{account} Example: “accounts/100”.

Type

str

class google.analytics.admin_v1beta.types.GetConversionEventRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for GetConversionEvent RPC

name

Required. The resource name of the conversion event to retrieve. Format: properties/{property}/conversionEvents/{conversion_event} Example: “properties/123/conversionEvents/456”.

Type

str

class google.analytics.admin_v1beta.types.GetCustomDimensionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for GetCustomDimension RPC.

name

Required. The name of the CustomDimension to get. Example format: properties/1234/customDimensions/5678

Type

str

class google.analytics.admin_v1beta.types.GetCustomMetricRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for GetCustomMetric RPC.

name

Required. The name of the CustomMetric to get. Example format: properties/1234/customMetrics/5678

Type

str

class google.analytics.admin_v1beta.types.GetDataRetentionSettingsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for GetDataRetentionSettings RPC.

name

Required. The name of the settings to lookup. Format:

properties/{property}/dataRetentionSettings Example: “properties/1000/dataRetentionSettings”.

Type

str

class google.analytics.admin_v1beta.types.GetDataSharingSettingsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for GetDataSharingSettings RPC.

name

Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettings Example: “accounts/1000/dataSharingSettings”.

Type

str

class google.analytics.admin_v1beta.types.GetDataStreamRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for GetDataStream RPC.

name

Required. The name of the DataStream to get. Example format: properties/1234/dataStreams/5678

Type

str

class google.analytics.admin_v1beta.types.GetMeasurementProtocolSecretRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for GetMeasurementProtocolSecret RPC.

name

Required. The name of the measurement protocol secret to lookup. Format:

properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}

Type

str

class google.analytics.admin_v1beta.types.GetPropertyRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for GetProperty RPC.

name

Required. The name of the property to lookup. Format: properties/{property_id} Example: “properties/1000”.

Type

str

Bases: proto.message.Message

A link between a GA4 property and a Google Ads account.

name

Output only. Format:

properties/{propertyId}/googleAdsLinks/{googleAdsLinkId}

Note: googleAdsLinkId is not the Google Ads customer ID.

Type

str

customer_id

Immutable. Google Ads customer ID.

Type

str

can_manage_clients

Output only. If true, this link is for a Google Ads manager account.

Type

bool

ads_personalization_enabled

Enable personalized advertising features with this integration. Automatically publish my Google Analytics audience lists and Google Analytics remarketing events/parameters to the linked Google Ads account. If this field is not set on create/update, it will be defaulted to true.

Type

google.protobuf.wrappers_pb2.BoolValue

create_time

Output only. Time when this link was originally created.

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Output only. Time when this link was last updated.

Type

google.protobuf.timestamp_pb2.Timestamp

creator_email_address

Output only. Email address of the user that created the link. An empty string will be returned if the email address can’t be retrieved.

Type

str

class google.analytics.admin_v1beta.types.IndustryCategory(value)[source]

Bases: proto.enums.Enum

The category selected for this property, used for industry benchmarking.

Values:
INDUSTRY_CATEGORY_UNSPECIFIED (0):

Industry category unspecified

AUTOMOTIVE (1):

Automotive

BUSINESS_AND_INDUSTRIAL_MARKETS (2):

Business and industrial markets

FINANCE (3):

Finance

HEALTHCARE (4):

Healthcare

TECHNOLOGY (5):

Technology

TRAVEL (6):

Travel

OTHER (7):

Other

ARTS_AND_ENTERTAINMENT (8):

Arts and entertainment

BEAUTY_AND_FITNESS (9):

Beauty and fitness

BOOKS_AND_LITERATURE (10):

Books and literature

FOOD_AND_DRINK (11):

Food and drink

GAMES (12):

Games

HOBBIES_AND_LEISURE (13):

Hobbies and leisure

HOME_AND_GARDEN (14):

Home and garden

INTERNET_AND_TELECOM (15):

Internet and telecom

LAW_AND_GOVERNMENT (16):

Law and government

NEWS (17):

News

ONLINE_COMMUNITIES (18):

Online communities

PEOPLE_AND_SOCIETY (19):

People and society

PETS_AND_ANIMALS (20):

Pets and animals

REAL_ESTATE (21):

Real estate

REFERENCE (22):

Reference

SCIENCE (23):

Science

SPORTS (24):

Sports

JOBS_AND_EDUCATION (25):

Jobs and education

SHOPPING (26):

Shopping

class google.analytics.admin_v1beta.types.ListAccountSummariesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ListAccountSummaries RPC.

page_size

The maximum number of AccountSummary resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

Type

int

page_token

A page token, received from a previous ListAccountSummaries call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAccountSummaries must match the call that provided the page token.

Type

str

class google.analytics.admin_v1beta.types.ListAccountSummariesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for ListAccountSummaries RPC.

account_summaries

Account summaries of all accounts the caller has access to.

Type

MutableSequence[google.analytics.admin_v1beta.types.AccountSummary]

next_page_token

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Type

str

class google.analytics.admin_v1beta.types.ListAccountsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ListAccounts RPC.

page_size

The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

Type

int

page_token

A page token, received from a previous ListAccounts call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListAccounts must match the call that provided the page token.

Type

str

show_deleted

Whether to include soft-deleted (ie: “trashed”) Accounts in the results. Accounts can be inspected to determine whether they are deleted or not.

Type

bool

class google.analytics.admin_v1beta.types.ListAccountsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ListAccounts RPC.

accounts

Results that were accessible to the caller.

Type

MutableSequence[google.analytics.admin_v1beta.types.Account]

next_page_token

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Type

str

class google.analytics.admin_v1beta.types.ListConversionEventsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ListConversionEvents RPC

parent

Required. The resource name of the parent property. Example: ‘properties/123’

Type

str

page_size

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

Type

int

page_token

A page token, received from a previous ListConversionEvents call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListConversionEvents must match the call that provided the page token.

Type

str

class google.analytics.admin_v1beta.types.ListConversionEventsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for ListConversionEvents RPC.

conversion_events

The requested conversion events

Type

MutableSequence[google.analytics.admin_v1beta.types.ConversionEvent]

next_page_token

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Type

str

class google.analytics.admin_v1beta.types.ListCustomDimensionsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ListCustomDimensions RPC.

parent

Required. Example format: properties/1234

Type

str

page_size

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

Type

int

page_token

A page token, received from a previous ListCustomDimensions call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListCustomDimensions must match the call that provided the page token.

Type

str

class google.analytics.admin_v1beta.types.ListCustomDimensionsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for ListCustomDimensions RPC.

custom_dimensions

List of CustomDimensions.

Type

MutableSequence[google.analytics.admin_v1beta.types.CustomDimension]

next_page_token

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Type

str

class google.analytics.admin_v1beta.types.ListCustomMetricsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ListCustomMetrics RPC.

parent

Required. Example format: properties/1234

Type

str

page_size

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

Type

int

page_token

A page token, received from a previous ListCustomMetrics call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListCustomMetrics must match the call that provided the page token.

Type

str

class google.analytics.admin_v1beta.types.ListCustomMetricsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for ListCustomMetrics RPC.

custom_metrics

List of CustomMetrics.

Type

MutableSequence[google.analytics.admin_v1beta.types.CustomMetric]

next_page_token

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Type

str

class google.analytics.admin_v1beta.types.ListDataStreamsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ListDataStreams RPC.

parent

Required. Example format: properties/1234

Type

str

page_size

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

Type

int

page_token

A page token, received from a previous ListDataStreams call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListDataStreams must match the call that provided the page token.

Type

str

class google.analytics.admin_v1beta.types.ListDataStreamsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for ListDataStreams RPC.

data_streams

List of DataStreams.

Type

MutableSequence[google.analytics.admin_v1beta.types.DataStream]

next_page_token

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Type

str

class google.analytics.admin_v1beta.types.ListFirebaseLinksRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ListFirebaseLinks RPC

parent

Required. Format: properties/{property_id} Example: properties/1234

Type

str

page_size

The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

Type

int

page_token

A page token, received from a previous ListFirebaseLinks call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListFirebaseLinks must match the call that provided the page token.

Type

str

class google.analytics.admin_v1beta.types.ListFirebaseLinksResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for ListFirebaseLinks RPC

List of FirebaseLinks. This will have at most one value.

Type

MutableSequence[google.analytics.admin_v1beta.types.FirebaseLink]

next_page_token

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. Currently, Google Analytics supports only one FirebaseLink per property, so this will never be populated.

Type

str

class google.analytics.admin_v1beta.types.ListGoogleAdsLinksRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ListGoogleAdsLinks RPC.

parent

Required. Example format: properties/1234

Type

str

page_size

The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

Type

int

page_token

A page token, received from a previous ListGoogleAdsLinks call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListGoogleAdsLinks must match the call that provided the page token.

Type

str

class google.analytics.admin_v1beta.types.ListGoogleAdsLinksResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for ListGoogleAdsLinks RPC.

List of GoogleAdsLinks.

Type

MutableSequence[google.analytics.admin_v1beta.types.GoogleAdsLink]

next_page_token

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Type

str

class google.analytics.admin_v1beta.types.ListMeasurementProtocolSecretsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ListMeasurementProtocolSecret RPC

parent

Required. The resource name of the parent stream. Format:

properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets

Type

str

page_size

The maximum number of resources to return. If unspecified, at most 10 resources will be returned. The maximum value is 10. Higher values will be coerced to the maximum.

Type

int

page_token

A page token, received from a previous ListMeasurementProtocolSecrets call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListMeasurementProtocolSecrets must match the call that provided the page token.

Type

str

class google.analytics.admin_v1beta.types.ListMeasurementProtocolSecretsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for ListMeasurementProtocolSecret RPC

measurement_protocol_secrets

A list of secrets for the parent stream specified in the request.

Type

MutableSequence[google.analytics.admin_v1beta.types.MeasurementProtocolSecret]

next_page_token

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Type

str

class google.analytics.admin_v1beta.types.ListPropertiesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ListProperties RPC.

filter

Required. An expression for filtering the results of the request. Fields eligible for filtering are: parent:(The resource name of the parent account/property) or ancestor:(The resource name of the parent account) or firebase_project:(The id or number of the linked firebase project). Some examples of filters:

| Filter                      | Description                               |
|-----------------------------|-------------------------------------------|
| parent:accounts/123         | The account with account id: 123.       |
| parent:properties/123       | The property with property id: 123.       |
| ancestor:accounts/123       | The account with account id: 123.         |
| firebase_project:project-id | The firebase project with id: project-id. |
| firebase_project:123        | The firebase project with number: 123.    |
Type

str

page_size

The maximum number of resources to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 resources will be returned. The maximum value is 200; (higher values will be coerced to the maximum)

Type

int

page_token

A page token, received from a previous ListProperties call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListProperties must match the call that provided the page token.

Type

str

show_deleted

Whether to include soft-deleted (ie: “trashed”) Properties in the results. Properties can be inspected to determine whether they are deleted or not.

Type

bool

class google.analytics.admin_v1beta.types.ListPropertiesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for ListProperties RPC.

properties

Results that matched the filter criteria and were accessible to the caller.

Type

MutableSequence[google.analytics.admin_v1beta.types.Property]

next_page_token

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Type

str

class google.analytics.admin_v1beta.types.MeasurementProtocolSecret(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A secret value used for sending hits to Measurement Protocol.

name

Output only. Resource name of this secret. This secret may be a child of any type of stream. Format:

properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}

Type

str

display_name

Required. Human-readable display name for this secret.

Type

str

secret_value

Output only. The measurement protocol secret value. Pass this value to the api_secret field of the Measurement Protocol API when sending hits to this secret’s parent property.

Type

str

class google.analytics.admin_v1beta.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.

int64_value

Integer value

This field is a member of oneof one_value.

Type

int

double_value

Double value

This field is a member of oneof one_value.

Type

float

class google.analytics.admin_v1beta.types.Property(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A resource message representing a Google Analytics GA4 property.

name

Output only. Resource name of this property. Format: properties/{property_id} Example: “properties/1000”.

Type

str

property_type

Immutable. The property type for this Property resource. When creating a property, if the type is “PROPERTY_TYPE_UNSPECIFIED”, then “ORDINARY_PROPERTY” will be implied. “SUBPROPERTY” and “ROLLUP_PROPERTY” types cannot yet be created with the Google Analytics Admin API.

Type

google.analytics.admin_v1beta.types.PropertyType

create_time

Output only. Time when the entity was originally created.

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Output only. Time when entity payload fields were last updated.

Type

google.protobuf.timestamp_pb2.Timestamp

parent

Immutable. Resource name of this property’s logical parent. Note: The Property-Moving UI can be used to change the parent. Format: accounts/{account}, properties/{property} Example: “accounts/100”, “properties/101”.

Type

str

display_name

Required. Human-readable display name for this property. The max allowed display name length is 100 UTF-16 code units.

Type

str

industry_category

Industry associated with this property Example: AUTOMOTIVE, FOOD_AND_DRINK

Type

google.analytics.admin_v1beta.types.IndustryCategory

time_zone

Required. Reporting Time Zone, used as the day boundary for reports, regardless of where the data originates. If the time zone honors DST, Analytics will automatically adjust for the changes.

NOTE: Changing the time zone only affects data going forward, and is not applied retroactively.

Format: https://www.iana.org/time-zones Example: “America/Los_Angeles”.

Type

str

currency_code

The currency type used in reports involving monetary values.

Format: https://en.wikipedia.org/wiki/ISO_4217 Examples: “USD”, “EUR”, “JPY”.

Type

str

service_level

Output only. The Google Analytics service level that applies to this property.

Type

google.analytics.admin_v1beta.types.ServiceLevel

delete_time

Output only. If set, the time at which this property was trashed. If not set, then this property is not currently in the trash can.

Type

google.protobuf.timestamp_pb2.Timestamp

expire_time

Output only. If set, the time at which this trashed property will be permanently deleted. If not set, then this property is not currently in the trash can and is not slated to be deleted.

Type

google.protobuf.timestamp_pb2.Timestamp

account

Immutable. The resource name of the parent account Format: accounts/{account_id} Example: “accounts/123”.

Type

str

class google.analytics.admin_v1beta.types.PropertySummary(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A virtual resource representing metadata for a GA4 property.

property

Resource name of property referred to by this property summary Format: properties/{property_id} Example: “properties/1000”.

Type

str

display_name

Display name for the property referred to in this property summary.

Type

str

property_type

The property’s property type.

Type

google.analytics.admin_v1beta.types.PropertyType

parent

Resource name of this property’s logical parent. Note: The Property-Moving UI can be used to change the parent. Format: accounts/{account}, properties/{property} Example: “accounts/100”, “properties/200”.

Type

str

class google.analytics.admin_v1beta.types.PropertyType(value)[source]

Bases: proto.enums.Enum

Types of Property resources.

Values:
PROPERTY_TYPE_UNSPECIFIED (0):

Unknown or unspecified property type

PROPERTY_TYPE_ORDINARY (1):

Ordinary GA4 property

PROPERTY_TYPE_SUBPROPERTY (2):

GA4 subproperty

PROPERTY_TYPE_ROLLUP (3):

GA4 rollup property

class google.analytics.admin_v1beta.types.ProvisionAccountTicketRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ProvisionAccountTicket RPC.

account

The account to create.

Type

google.analytics.admin_v1beta.types.Account

redirect_uri

Redirect URI where the user will be sent after accepting Terms of Service. Must be configured in Cloud Console as a Redirect URI.

Type

str

class google.analytics.admin_v1beta.types.ProvisionAccountTicketResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for ProvisionAccountTicket RPC.

account_ticket_id

The param to be passed in the ToS link.

Type

str

class google.analytics.admin_v1beta.types.RunAccessReportRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The request for a Data Access Record Report.

entity

The Data Access Report supports requesting at the property level or account level. If requested at the account level, Data Access Reports include all access for all properties under that account.

To request at the property level, entity should be for example ‘properties/123’ if “123” is your GA4 property ID. To request at the account level, entity should be for example ‘accounts/1234’ if “1234” is your GA4 Account ID.

Type

str

dimensions

The dimensions requested and displayed in the response. Requests are allowed up to 9 dimensions.

Type

MutableSequence[google.analytics.admin_v1beta.types.AccessDimension]

metrics

The metrics requested and displayed in the response. Requests are allowed up to 10 metrics.

Type

MutableSequence[google.analytics.admin_v1beta.types.AccessMetric]

date_ranges

Date ranges of access records 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 access records for the overlapping days is included in the response rows for both date ranges. Requests are allowed up to 2 date ranges.

Type

MutableSequence[google.analytics.admin_v1beta.types.AccessDateRange]

dimension_filter

Dimension filters let you restrict report response to specific dimension values which match the filter. For example, filtering on access records of a single user. To learn more, see Fundamentals of Dimension Filters for examples. Metrics cannot be used in this filter.

Type

google.analytics.admin_v1beta.types.AccessFilterExpression

metric_filter

Metric filters allow you to restrict report response to specific metric values which match the filter. Metric filters are applied after aggregating the report’s rows, similar to SQL having-clause. Dimensions cannot be used in this filter.

Type

google.analytics.admin_v1beta.types.AccessFilterExpression

offset

The row count of the start row. The first row is counted as row 0. If offset is unspecified, it is treated as 0. If offset is zero, then this method will return the first page of results with limit entries.

To learn more about this pagination parameter, see Pagination.

Type

int

limit

The number of rows to return. If unspecified, 10,000 rows are returned. The API returns a maximum of 100,000 rows per request, no matter how many you ask for. limit must be positive.

The API may return fewer rows than the requested limit, if there aren’t as many remaining rows as the limit. For instance, there are fewer than 300 possible values for the dimension country, so when reporting on only country, you can’t get more than 300 rows, even if you set limit to a higher value.

To learn more about this pagination parameter, see Pagination.

Type

int

time_zone

This request’s time zone if specified. If unspecified, the property’s time zone is used. The request’s time zone is used to interpret the start & end dates of the report.

Formatted as strings from the IANA Time Zone database (https://www.iana.org/time-zones); for example “America/New_York” or “Asia/Tokyo”.

Type

str

order_bys

Specifies how rows are ordered in the response.

Type

MutableSequence[google.analytics.admin_v1beta.types.AccessOrderBy]

return_entity_quota

Toggles whether to return the current state of this Analytics Property’s quota. Quota is returned in AccessQuota. For account-level requests, this field must be false.

Type

bool

class google.analytics.admin_v1beta.types.RunAccessReportResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The customized Data Access Record Report response.

dimension_headers

The header for a column in the report that corresponds to a specific dimension. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.

Type

MutableSequence[google.analytics.admin_v1beta.types.AccessDimensionHeader]

metric_headers

The header for a column in the report that corresponds to a specific metric. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.

Type

MutableSequence[google.analytics.admin_v1beta.types.AccessMetricHeader]

rows

Rows of dimension value combinations and metric values in the report.

Type

MutableSequence[google.analytics.admin_v1beta.types.AccessRow]

row_count

The total number of rows in the query result. rowCount is independent of the number of rows returned in the response, the limit request parameter, and the offset request parameter. For example if a query returns 175 rows and includes limit of 50 in the API request, the response will contain rowCount of 175 but only 50 rows.

To learn more about this pagination parameter, see Pagination.

Type

int

quota

The quota state for this Analytics property including this request. This field doesn’t work with account-level requests.

Type

google.analytics.admin_v1beta.types.AccessQuota

class google.analytics.admin_v1beta.types.SearchChangeHistoryEventsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for SearchChangeHistoryEvents RPC.

account

Required. The account resource for which to return change history resources.

Type

str

property

Optional. Resource name for a child property. If set, only return changes made to this property or its child resources.

Type

str

resource_type

Optional. If set, only return changes if they are for a resource that matches at least one of these types.

Type

MutableSequence[google.analytics.admin_v1beta.types.ChangeHistoryResourceType]

action

Optional. If set, only return changes that match one or more of these types of actions.

Type

MutableSequence[google.analytics.admin_v1beta.types.ActionType]

actor_email

Optional. If set, only return changes if they are made by a user in this list.

Type

MutableSequence[str]

earliest_change_time

Optional. If set, only return changes made after this time (inclusive).

Type

google.protobuf.timestamp_pb2.Timestamp

latest_change_time

Optional. If set, only return changes made before this time (inclusive).

Type

google.protobuf.timestamp_pb2.Timestamp

page_size

Optional. The maximum number of ChangeHistoryEvent items to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 items will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

Type

int

page_token

Optional. A page token, received from a previous SearchChangeHistoryEvents call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchChangeHistoryEvents must match the call that provided the page token.

Type

str

class google.analytics.admin_v1beta.types.SearchChangeHistoryEventsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for SearchAccounts RPC.

change_history_events

Results that were accessible to the caller.

Type

MutableSequence[google.analytics.admin_v1beta.types.ChangeHistoryEvent]

next_page_token

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Type

str

class google.analytics.admin_v1beta.types.ServiceLevel(value)[source]

Bases: proto.enums.Enum

Various levels of service for Google Analytics.

Values:
SERVICE_LEVEL_UNSPECIFIED (0):

Service level not specified or invalid.

GOOGLE_ANALYTICS_STANDARD (1):

The standard version of Google Analytics.

GOOGLE_ANALYTICS_360 (2):

The paid, premium version of Google Analytics.

class google.analytics.admin_v1beta.types.UpdateAccountRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for UpdateAccount RPC.

account

Required. The account to update. The account’s name field is used to identify the account.

Type

google.analytics.admin_v1beta.types.Account

update_mask

Required. The list of fields to be updated. Field names must be in snake case (for example, “field_to_update”). Omitted fields will not be updated. To replace the entire entity, use one path with the string “*” to match all fields.

Type

google.protobuf.field_mask_pb2.FieldMask

class google.analytics.admin_v1beta.types.UpdateConversionEventRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for UpdateConversionEvent RPC

conversion_event

Required. The conversion event to update. The name field is used to identify the settings to be updated.

Type

google.analytics.admin_v1beta.types.ConversionEvent

update_mask

Required. The list of fields to be updated. Field names must be in snake case (e.g., “field_to_update”). Omitted fields will not be updated. To replace the entire entity, use one path with the string “*” to match all fields.

Type

google.protobuf.field_mask_pb2.FieldMask

class google.analytics.admin_v1beta.types.UpdateCustomDimensionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for UpdateCustomDimension RPC.

custom_dimension

The CustomDimension to update

Type

google.analytics.admin_v1beta.types.CustomDimension

update_mask

Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string “*” to match all fields.

Type

google.protobuf.field_mask_pb2.FieldMask

class google.analytics.admin_v1beta.types.UpdateCustomMetricRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for UpdateCustomMetric RPC.

custom_metric

The CustomMetric to update

Type

google.analytics.admin_v1beta.types.CustomMetric

update_mask

Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string “*” to match all fields.

Type

google.protobuf.field_mask_pb2.FieldMask

class google.analytics.admin_v1beta.types.UpdateDataRetentionSettingsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for UpdateDataRetentionSettings RPC.

data_retention_settings

Required. The settings to update. The name field is used to identify the settings to be updated.

Type

google.analytics.admin_v1beta.types.DataRetentionSettings

update_mask

Required. The list of fields to be updated. Field names must be in snake case (e.g., “field_to_update”). Omitted fields will not be updated. To replace the entire entity, use one path with the string “*” to match all fields.

Type

google.protobuf.field_mask_pb2.FieldMask

class google.analytics.admin_v1beta.types.UpdateDataStreamRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for UpdateDataStream RPC.

data_stream

The DataStream to update

Type

google.analytics.admin_v1beta.types.DataStream

update_mask

Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string “*” to match all fields.

Type

google.protobuf.field_mask_pb2.FieldMask

class google.analytics.admin_v1beta.types.UpdateGoogleAdsLinkRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for UpdateGoogleAdsLink RPC

The GoogleAdsLink to update

Type

google.analytics.admin_v1beta.types.GoogleAdsLink

update_mask

Required. The list of fields to be updated. Field names must be in snake case (e.g., “field_to_update”). Omitted fields will not be updated. To replace the entire entity, use one path with the string “*” to match all fields.

Type

google.protobuf.field_mask_pb2.FieldMask

class google.analytics.admin_v1beta.types.UpdateMeasurementProtocolSecretRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for UpdateMeasurementProtocolSecret RPC

measurement_protocol_secret

Required. The measurement protocol secret to update.

Type

google.analytics.admin_v1beta.types.MeasurementProtocolSecret

update_mask

Required. The list of fields to be updated. Omitted fields will not be updated.

Type

google.protobuf.field_mask_pb2.FieldMask

class google.analytics.admin_v1beta.types.UpdatePropertyRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for UpdateProperty RPC.

property

Required. The property to update. The property’s name field is used to identify the property to be updated.

Type

google.analytics.admin_v1beta.types.Property

update_mask

Required. The list of fields to be updated. Field names must be in snake case (e.g., “field_to_update”). Omitted fields will not be updated. To replace the entire entity, use one path with the string “*” to match all fields.

Type

google.protobuf.field_mask_pb2.FieldMask