Package google.analytics.admin.v1beta

Index

AnalyticsAdminService

Service Interface for the Analytics Admin API (GA4).

AcknowledgeUserDataCollection

rpc AcknowledgeUserDataCollection(AcknowledgeUserDataCollectionRequest) returns (AcknowledgeUserDataCollectionResponse)

Acknowledges the terms of user data collection for the specified property.

This acknowledgement must be completed (either in the Google Analytics UI or through this API) before MeasurementProtocolSecret resources may be created.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
ArchiveCustomDimension

rpc ArchiveCustomDimension(ArchiveCustomDimensionRequest) returns (Empty)

Archives a CustomDimension on a property.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
ArchiveCustomMetric

rpc ArchiveCustomMetric(ArchiveCustomMetricRequest) returns (Empty)

Archives a CustomMetric on a property.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
CreateConversionEvent

rpc CreateConversionEvent(CreateConversionEventRequest) returns (ConversionEvent)

Creates a conversion event with the specified attributes.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
CreateCustomDimension

rpc CreateCustomDimension(CreateCustomDimensionRequest) returns (CustomDimension)

Creates a CustomDimension.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
CreateCustomMetric

rpc CreateCustomMetric(CreateCustomMetricRequest) returns (CustomMetric)

Creates a CustomMetric.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
CreateDataStream

rpc CreateDataStream(CreateDataStreamRequest) returns (DataStream)

Creates a DataStream.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
CreateMeasurementProtocolSecret

rpc CreateMeasurementProtocolSecret(CreateMeasurementProtocolSecretRequest) returns (MeasurementProtocolSecret)

Creates a measurement protocol secret.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
CreateProperty

rpc CreateProperty(CreatePropertyRequest) returns (Property)

Creates an "GA4" property with the specified location and attributes.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
DeleteAccount

rpc DeleteAccount(DeleteAccountRequest) returns (Empty)

Marks target Account as soft-deleted (ie: "trashed") and returns it.

This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI.

If the accounts are not restored before the expiration time, the account and all child resources (eg: Properties, GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772

Returns an error if the target is not found.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
DeleteConversionEvent

rpc DeleteConversionEvent(DeleteConversionEventRequest) returns (Empty)

Deletes a conversion event in a property.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
DeleteDataStream

rpc DeleteDataStream(DeleteDataStreamRequest) returns (Empty)

Deletes a DataStream on a property.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
DeleteMeasurementProtocolSecret

rpc DeleteMeasurementProtocolSecret(DeleteMeasurementProtocolSecretRequest) returns (Empty)

Deletes target MeasurementProtocolSecret.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
DeleteProperty

rpc DeleteProperty(DeletePropertyRequest) returns (Property)

Marks target Property as soft-deleted (ie: "trashed") and returns it.

This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI.

If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772

Returns an error if the target is not found, or is not a GA4 Property.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
GetAccount

rpc GetAccount(GetAccountRequest) returns (Account)

Lookup for a single Account.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics.edit
GetConversionEvent

rpc GetConversionEvent(GetConversionEventRequest) returns (ConversionEvent)

Retrieve a single conversion event.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics.edit
GetCustomDimension

rpc GetCustomDimension(GetCustomDimensionRequest) returns (CustomDimension)

Lookup for a single CustomDimension.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics.edit
GetCustomMetric

rpc GetCustomMetric(GetCustomMetricRequest) returns (CustomMetric)

Lookup for a single CustomMetric.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics.edit
GetDataRetentionSettings

rpc GetDataRetentionSettings(GetDataRetentionSettingsRequest) returns (DataRetentionSettings)

Returns the singleton data retention settings for this property.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics.edit
GetDataSharingSettings

rpc GetDataSharingSettings(GetDataSharingSettingsRequest) returns (DataSharingSettings)

Get data sharing settings on an account. Data sharing settings are singletons.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics.edit
GetDataStream

rpc GetDataStream(GetDataStreamRequest) returns (DataStream)

Lookup for a single DataStream.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics.edit
GetMeasurementProtocolSecret

rpc GetMeasurementProtocolSecret(GetMeasurementProtocolSecretRequest) returns (MeasurementProtocolSecret)

Lookup for a single "GA4" MeasurementProtocolSecret.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics.edit
GetProperty

rpc GetProperty(GetPropertyRequest) returns (Property)

Lookup for a single "GA4" Property.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics.edit
ListAccountSummaries

rpc ListAccountSummaries(ListAccountSummariesRequest) returns (ListAccountSummariesResponse)

Returns summaries of all accounts accessible by the caller.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics.edit
ListAccounts

rpc ListAccounts(ListAccountsRequest) returns (ListAccountsResponse)

Returns all accounts accessible by the caller.

Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: "trashed") accounts are excluded by default. Returns an empty list if no relevant accounts are found.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics.edit
ListConversionEvents

rpc ListConversionEvents(ListConversionEventsRequest) returns (ListConversionEventsResponse)

Returns a list of conversion events in the specified parent property.

Returns an empty list if no conversion events are found.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics.edit
ListCustomDimensions

rpc ListCustomDimensions(ListCustomDimensionsRequest) returns (ListCustomDimensionsResponse)

Lists CustomDimensions on a property.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics.edit
ListCustomMetrics

rpc ListCustomMetrics(ListCustomMetricsRequest) returns (ListCustomMetricsResponse)

Lists CustomMetrics on a property.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics.edit
ListDataStreams

rpc ListDataStreams(ListDataStreamsRequest) returns (ListDataStreamsResponse)

Lists DataStreams on a property.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics.edit
ListMeasurementProtocolSecrets

rpc ListMeasurementProtocolSecrets(ListMeasurementProtocolSecretsRequest) returns (ListMeasurementProtocolSecretsResponse)

Returns child MeasurementProtocolSecrets under the specified parent Property.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics.edit
ListProperties

rpc ListProperties(ListPropertiesRequest) returns (ListPropertiesResponse)

Returns child Properties under the specified parent Account.

Only "GA4" properties will be returned. Properties will be excluded if the caller does not have access. Soft-deleted (ie: "trashed") properties are excluded by default. Returns an empty list if no relevant properties are found.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics.edit
ProvisionAccountTicket

rpc ProvisionAccountTicket(ProvisionAccountTicketRequest) returns (ProvisionAccountTicketResponse)

Requests a ticket for creating an account.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
RunAccessReport

rpc RunAccessReport(RunAccessReportRequest) returns (RunAccessReportResponse)

Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years.

Data Access Reports can be requested for a property. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators.

These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase & Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see searchChangeHistoryEvents.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/analytics.readonly
  • https://www.googleapis.com/auth/analytics.edit
SearchChangeHistoryEvents

rpc SearchChangeHistoryEvents(SearchChangeHistoryEventsRequest) returns (SearchChangeHistoryEventsResponse)

Searches through all changes to an account or its children given the specified set of filters.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
UpdateAccount

rpc UpdateAccount(UpdateAccountRequest) returns (Account)

Updates an account.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
UpdateConversionEvent

rpc UpdateConversionEvent(UpdateConversionEventRequest) returns (ConversionEvent)

Updates a conversion event with the specified attributes.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
UpdateCustomDimension

rpc UpdateCustomDimension(UpdateCustomDimensionRequest) returns (CustomDimension)

Updates a CustomDimension on a property.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
UpdateCustomMetric

rpc UpdateCustomMetric(UpdateCustomMetricRequest) returns (CustomMetric)

Updates a CustomMetric on a property.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
UpdateDataRetentionSettings

rpc UpdateDataRetentionSettings(UpdateDataRetentionSettingsRequest) returns (DataRetentionSettings)

Updates the singleton data retention settings for this property.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
UpdateDataStream

rpc UpdateDataStream(UpdateDataStreamRequest) returns (DataStream)

Updates a DataStream on a property.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
UpdateMeasurementProtocolSecret

rpc UpdateMeasurementProtocolSecret(UpdateMeasurementProtocolSecretRequest) returns (MeasurementProtocolSecret)

Updates a measurement protocol secret.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit
UpdateProperty

rpc UpdateProperty(UpdatePropertyRequest) returns (Property)

Updates a property.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit

AccessBetweenFilter

To express that the result needs to be between two numbers (inclusive).

Fields
from_value

NumericValue

Begins with this number.

to_value

NumericValue

Ends with this number.

AccessDateRange

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

Fields
start_date

string

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.

end_date

string

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.

AccessDimension

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.

Fields
dimension_name

string

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.

AccessDimensionHeader

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.

Fields
dimension_name

string

The dimension's name; for example 'userEmail'.

AccessDimensionValue

The value of a dimension.

Fields
value

string

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

AccessFilter

An expression to filter dimension or metric values.

Fields
field_name

string

The dimension name or metric name.

Union field one_filter. Specify one type of filter for Filter. one_filter can be only one of the following:
string_filter

AccessStringFilter

Strings related filter.

in_list_filter

AccessInListFilter

A filter for in list values.

numeric_filter

AccessNumericFilter

A filter for numeric or date values.

between_filter

AccessBetweenFilter

A filter for two values.

AccessFilterExpression

Expresses dimension or metric filters. The fields in the same expression need to be either all dimensions or all metrics.

Fields
Union field one_expression. Specify one type of filter expression for FilterExpression. one_expression can be only one of the following:
and_group

AccessFilterExpressionList

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

or_group

AccessFilterExpressionList

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

not_expression

AccessFilterExpression

The FilterExpression is NOT of not_expression.

access_filter

AccessFilter

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

AccessFilterExpressionList

A list of filter expressions.

Fields
expressions[]

AccessFilterExpression

A list of filter expressions.

AccessInListFilter

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

Fields
values[]

string

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

case_sensitive

bool

If true, the string value is case sensitive.

AccessMetric

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

Fields
metric_name

string

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.

AccessMetricHeader

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.

Fields
metric_name

string

The metric's name; for example 'accessCount'.

AccessMetricValue

The value of a metric.

Fields
value

string

The measurement value. For example, this value may be '13'.

AccessNumericFilter

Filters for numeric or date values.

Fields
operation

Operation

The operation type for this filter.

value

NumericValue

A numeric value or a date value.

Operation

The operation applied to a numeric filter.

Enums
OPERATION_UNSPECIFIED Unspecified.
EQUAL Equal
LESS_THAN Less than
LESS_THAN_OR_EQUAL Less than or equal
GREATER_THAN Greater than
GREATER_THAN_OR_EQUAL Greater than or equal

AccessOrderBy

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.

Fields
desc

bool

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

Union field one_order_by. Specify one type of order by for OrderBy. one_order_by can be only one of the following:
metric

MetricOrderBy

Sorts results by a metric's values.

dimension

DimensionOrderBy

Sorts results by a dimension's values.

DimensionOrderBy

Sorts by dimension values.

Fields
dimension_name

string

A dimension name in the request to order by.

order_type

OrderType

Controls the rule for dimension value ordering.

OrderType

Rule to order the string dimension values by.

Enums
ORDER_TYPE_UNSPECIFIED Unspecified.
ALPHANUMERIC Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" < "b" < "z".
CASE_INSENSITIVE_ALPHANUMERIC Case insensitive alphanumeric sort by lower case Unicode code point. For example, "2" < "A" < "b" < "X" < "z".
NUMERIC 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.

MetricOrderBy

Sorts by metric values.

Fields
metric_name

string

A metric name in the request to order by.

AccessQuota

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.

Fields
tokens_per_day

AccessQuotaStatus

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

tokens_per_hour

AccessQuotaStatus

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.

concurrent_requests

AccessQuotaStatus

Properties can use up to 50 concurrent requests.

server_errors_per_project_per_hour

AccessQuotaStatus

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

tokens_per_project_per_hour

AccessQuotaStatus

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.

AccessQuotaStatus

Current state for a particular quota group.

Fields
consumed

int32

Quota consumed by this request.

remaining

int32

Quota remaining after this request.

AccessRow

Access report data for each row.

Fields
dimension_values[]

AccessDimensionValue

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

metric_values[]

AccessMetricValue

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

AccessStringFilter

The filter for strings.

Fields
match_type

MatchType

The match type for this filter.

value

string

The string value used for the matching.

case_sensitive

bool

If true, the string value is case sensitive.

MatchType

The match type of a string filter.

Enums
MATCH_TYPE_UNSPECIFIED Unspecified
EXACT Exact match of the string value.
BEGINS_WITH Begins with the string value.
ENDS_WITH Ends with the string value.
CONTAINS Contains the string value.
FULL_REGEXP Full match for the regular expression with the string value.
PARTIAL_REGEXP Partial match for the regular expression with the string value.

Account

A resource message representing a Google Analytics account.

Fields
name

string

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

create_time

Timestamp

Output only. Time when this account was originally created.

update_time

Timestamp

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

display_name

string

Required. Human-readable display name for this account.

region_code

string

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

deleted

bool

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

AccountSummary

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

Fields
name

string

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

account

string

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

display_name

string

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

property_summaries[]

PropertySummary

List of summaries for child accounts of this account.

AcknowledgeUserDataCollectionRequest

Request message for AcknowledgeUserDataCollection RPC.

Fields
property

string

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

acknowledgement

string

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."

AcknowledgeUserDataCollectionResponse

This type has no fields.

Response message for AcknowledgeUserDataCollection RPC.

ActionType

Types of actions that may change a resource.

Enums
ACTION_TYPE_UNSPECIFIED Action type unknown or not specified.
CREATED Resource was created in this change.
UPDATED Resource was updated in this change.
DELETED Resource was deleted in this change.

ActorType

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

Enums
ACTOR_TYPE_UNSPECIFIED Unknown or unspecified actor type.
USER Changes made by the user specified in actor_email.
SYSTEM Changes made by the Google Analytics system.
SUPPORT Changes made by Google Analytics support team staff.

ArchiveCustomDimensionRequest

Request message for ArchiveCustomDimension RPC.

Fields
name

string

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

ArchiveCustomMetricRequest

Request message for ArchiveCustomMetric RPC.

Fields
name

string

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

ChangeHistoryChange

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

Fields
resource

string

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

action

ActionType

The type of action that changed this resource.

resource_before_change

ChangeHistoryResource

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

resource_after_change

ChangeHistoryResource

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

ChangeHistoryResource

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

Fields

Union field resource.

resource can be only one of the following:

account

Account

A snapshot of an Account resource in change history.

property

Property

A snapshot of a Property resource in change history.

conversion_event

ConversionEvent

A snapshot of a ConversionEvent resource in change history.

measurement_protocol_secret

MeasurementProtocolSecret

A snapshot of a MeasurementProtocolSecret resource in change history.

data_retention_settings

DataRetentionSettings

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

data_stream

DataStream

A snapshot of a DataStream resource in change history.

ChangeHistoryEvent

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.

Fields
id

string

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

change_time

Timestamp

Time when change was made.

actor_type

ActorType

The type of actor that made this change.

user_actor_email

string

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.

changes_filtered

bool

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

changes[]

ChangeHistoryChange

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

ChangeHistoryResourceType

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

Enums
CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED Resource type unknown or not specified.
ACCOUNT Account resource
PROPERTY Property resource
GOOGLE_SIGNALS_SETTINGS GoogleSignalsSettings resource
CONVERSION_EVENT ConversionEvent resource
MEASUREMENT_PROTOCOL_SECRET MeasurementProtocolSecret resource
DATA_RETENTION_SETTINGS DataRetentionSettings resource
DATA_STREAM DataStream resource
ATTRIBUTION_SETTINGS AttributionSettings resource

ConversionEvent

A conversion event in a Google Analytics property.

Fields
name

string

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

event_name

string

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

create_time

Timestamp

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

deletable

bool

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

custom

bool

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.

counting_method

ConversionCountingMethod

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.

default_conversion_value

DefaultConversionValue

Optional. Defines a default value/currency for a conversion event.

ConversionCountingMethod

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

Enums
CONVERSION_COUNTING_METHOD_UNSPECIFIED Counting method not specified.
ONCE_PER_EVENT Each Event instance is considered a Conversion.
ONCE_PER_SESSION An Event instance is considered a Conversion at most once per session per user.

DefaultConversionValue

Defines a default value/currency for a conversion event. Both value and currency must be provided.

Fields
value

double

This value will be used to populate the value for all conversions of the specified event_name where the event "value" parameter is unset.

currency_code

string

When a conversion event for this event_name has no set currency, this currency will be applied as the default. Must be in ISO 4217 currency code format. See https://en.wikipedia.org/wiki/ISO_4217 for more information.

CreateConversionEventRequest

Request message for CreateConversionEvent RPC

Fields
conversion_event

ConversionEvent

Required. The conversion event to create.

parent

string

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

CreateCustomDimensionRequest

Request message for CreateCustomDimension RPC.

Fields
parent

string

Required. Example format: properties/1234

custom_dimension

CustomDimension

Required. The CustomDimension to create.

CreateCustomMetricRequest

Request message for CreateCustomMetric RPC.

Fields
parent

string

Required. Example format: properties/1234

custom_metric

CustomMetric

Required. The CustomMetric to create.

CreateDataStreamRequest

Request message for CreateDataStream RPC.

Fields
parent

string

Required. Example format: properties/1234

data_stream

DataStream

Required. The DataStream to create.

CreateFirebaseLinkRequest

Request message for CreateFirebaseLink RPC

Fields
parent

string

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

CreateGoogleAdsLinkRequest

Request message for CreateGoogleAdsLink RPC

Fields
parent

string

Required. Example format: properties/1234

CreateMeasurementProtocolSecretRequest

Request message for CreateMeasurementProtocolSecret RPC

Fields
parent

string

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

measurement_protocol_secret

MeasurementProtocolSecret

Required. The measurement protocol secret to create.

CreatePropertyRequest

Request message for CreateProperty RPC.

Fields
property

Property

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

CustomDimension

A definition for a CustomDimension.

Fields
name

string

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

parameter_name

string

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.

display_name

string

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.

description

string

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

scope

DimensionScope

Required. Immutable. The scope of this dimension.

disallow_ads_personalization

bool

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.

DimensionScope

Valid values for the scope of this dimension.

Enums
DIMENSION_SCOPE_UNSPECIFIED Scope unknown or not specified.
EVENT Dimension scoped to an event.
USER Dimension scoped to a user.
ITEM Dimension scoped to eCommerce items

CustomMetric

A definition for a custom metric.

Fields
name

string

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

parameter_name

string

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.

display_name

string

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.

description

string

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

measurement_unit

MeasurementUnit

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

scope

MetricScope

Required. Immutable. The scope of this custom metric.

restricted_metric_type[]

RestrictedMetricType

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.

MeasurementUnit

Possible types of representing the custom metric's value.

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

Enums
MEASUREMENT_UNIT_UNSPECIFIED MeasurementUnit unspecified or missing.
STANDARD This metric uses default units.
CURRENCY This metric measures a currency.
FEET This metric measures feet.
METERS This metric measures meters.
KILOMETERS This metric measures kilometers.
MILES This metric measures miles.
MILLISECONDS This metric measures milliseconds.
SECONDS This metric measures seconds.
MINUTES This metric measures minutes.
HOURS This metric measures hours.

MetricScope

The scope of this metric.

Enums
METRIC_SCOPE_UNSPECIFIED Scope unknown or not specified.
EVENT Metric scoped to an event.

RestrictedMetricType

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

Enums
RESTRICTED_METRIC_TYPE_UNSPECIFIED Type unknown or unspecified.
COST_DATA Metric reports cost data.
REVENUE_DATA Metric reports revenue data.

DataRetentionSettings

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

Fields
name

string

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

event_data_retention

RetentionDuration

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

reset_user_data_on_new_activity

bool

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

RetentionDuration

Valid values for the data retention duration.

Enums
RETENTION_DURATION_UNSPECIFIED Data retention time duration is not specified.
TWO_MONTHS The data retention time duration is 2 months.
FOURTEEN_MONTHS The data retention time duration is 14 months.
TWENTY_SIX_MONTHS The data retention time duration is 26 months. Available to 360 properties only.
THIRTY_EIGHT_MONTHS The data retention time duration is 38 months. Available to 360 properties only.
FIFTY_MONTHS The data retention time duration is 50 months. Available to 360 properties only.

DataSharingSettings

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

Fields
name

string

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

sharing_with_google_support_enabled

bool

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

sharing_with_google_assigned_sales_enabled

bool

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.

sharing_with_google_any_sales_enabled

bool

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

sharing_with_google_products_enabled

bool

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

sharing_with_others_enabled

bool

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

DataStream

A resource message representing a data stream.

Fields
name

string

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

type

DataStreamType

Required. Immutable. The type of this DataStream resource.

display_name

string

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.

create_time

Timestamp

Output only. Time when this stream was originally created.

update_time

Timestamp

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

Union field stream_data. Data for specific data stream types. The message that will be set corresponds to the type of this stream. stream_data can be only one of the following:
web_stream_data

WebStreamData

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

android_app_stream_data

AndroidAppStreamData

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

ios_app_stream_data

IosAppStreamData

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

AndroidAppStreamData

Data specific to Android app streams.

Fields
firebase_app_id

string

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

package_name

string

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

DataStreamType

The type of the data stream.

Enums
DATA_STREAM_TYPE_UNSPECIFIED Type unknown or not specified.
WEB_DATA_STREAM Web data stream.
ANDROID_APP_DATA_STREAM Android app data stream.
IOS_APP_DATA_STREAM iOS app data stream.

IosAppStreamData

Data specific to iOS app streams.

Fields
firebase_app_id

string

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

bundle_id

string

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

WebStreamData

Data specific to web streams.

Fields
measurement_id

string

Output only. Analytics Measurement ID.

Example: "G-1A2BCD345E"

firebase_app_id

string

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

default_uri

string

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

DeleteAccountRequest

Request message for DeleteAccount RPC.

Fields
name

string

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

DeleteConversionEventRequest

Request message for DeleteConversionEvent RPC

Fields
name

string

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

DeleteDataStreamRequest

Request message for DeleteDataStream RPC.

Fields
name

string

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

DeleteFirebaseLinkRequest

Request message for DeleteFirebaseLink RPC

Fields
name

string

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

DeleteGoogleAdsLinkRequest

Request message for DeleteGoogleAdsLink RPC.

Fields
name

string

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

DeleteMeasurementProtocolSecretRequest

Request message for DeleteMeasurementProtocolSecret RPC

Fields
name

string

Required. The name of the MeasurementProtocolSecret to delete. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}

DeletePropertyRequest

Request message for DeleteProperty RPC.

Fields
name

string

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

GetAccountRequest

Request message for GetAccount RPC.

Fields
name

string

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

GetConversionEventRequest

Request message for GetConversionEvent RPC

Fields
name

string

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

GetCustomDimensionRequest

Request message for GetCustomDimension RPC.

Fields
name

string

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

GetCustomMetricRequest

Request message for GetCustomMetric RPC.

Fields
name

string

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

GetDataRetentionSettingsRequest

Request message for GetDataRetentionSettings RPC.

Fields
name

string

Required. The name of the settings to lookup. Format: properties/{property}/dataRetentionSettings Example: "properties/1000/dataRetentionSettings"

GetDataSharingSettingsRequest

Request message for GetDataSharingSettings RPC.

Fields
name

string

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

GetDataStreamRequest

Request message for GetDataStream RPC.

Fields
name

string

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

GetMeasurementProtocolSecretRequest

Request message for GetMeasurementProtocolSecret RPC.

Fields
name

string

Required. The name of the measurement protocol secret to lookup. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret}

GetPropertyRequest

Request message for GetProperty RPC.

Fields
name

string

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

IndustryCategory

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

Enums
INDUSTRY_CATEGORY_UNSPECIFIED Industry category unspecified
AUTOMOTIVE Automotive
BUSINESS_AND_INDUSTRIAL_MARKETS Business and industrial markets
FINANCE Finance
HEALTHCARE Healthcare
TECHNOLOGY Technology
TRAVEL Travel
OTHER Other
ARTS_AND_ENTERTAINMENT Arts and entertainment
BEAUTY_AND_FITNESS Beauty and fitness
BOOKS_AND_LITERATURE Books and literature
FOOD_AND_DRINK Food and drink
GAMES Games
HOBBIES_AND_LEISURE Hobbies and leisure
HOME_AND_GARDEN Home and garden
INTERNET_AND_TELECOM Internet and telecom
LAW_AND_GOVERNMENT Law and government
NEWS News
ONLINE_COMMUNITIES Online communities
PEOPLE_AND_SOCIETY People and society
PETS_AND_ANIMALS Pets and animals
REAL_ESTATE Real estate
REFERENCE Reference
SCIENCE Science
SPORTS Sports
JOBS_AND_EDUCATION Jobs and education
SHOPPING Shopping

ListAccountSummariesRequest

Request message for ListAccountSummaries RPC.

Fields
page_size

int32

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)

page_token

string

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.

ListAccountSummariesResponse

Response message for ListAccountSummaries RPC.

Fields
account_summaries[]

AccountSummary

Account summaries of all accounts the caller has access to.

next_page_token

string

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

ListAccountsRequest

Request message for ListAccounts RPC.

Fields
page_size

int32

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)

page_token

string

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.

show_deleted

bool

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

ListAccountsResponse

Request message for ListAccounts RPC.

Fields
accounts[]

Account

Results that were accessible to the caller.

next_page_token

string

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

ListConversionEventsRequest

Request message for ListConversionEvents RPC

Fields
parent

string

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

page_size

int32

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)

page_token

string

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.

ListConversionEventsResponse

Response message for ListConversionEvents RPC.

Fields
conversion_events[]

ConversionEvent

The requested conversion events

next_page_token

string

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

ListCustomDimensionsRequest

Request message for ListCustomDimensions RPC.

Fields
parent

string

Required. Example format: properties/1234

page_size

int32

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).

page_token

string

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.

ListCustomDimensionsResponse

Response message for ListCustomDimensions RPC.

Fields
custom_dimensions[]

CustomDimension

List of CustomDimensions.

next_page_token

string

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

ListCustomMetricsRequest

Request message for ListCustomMetrics RPC.

Fields
parent

string

Required. Example format: properties/1234

page_size

int32

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).

page_token

string

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.

ListCustomMetricsResponse

Response message for ListCustomMetrics RPC.

Fields
custom_metrics[]

CustomMetric

List of CustomMetrics.

next_page_token

string

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

ListDataStreamsRequest

Request message for ListDataStreams RPC.

Fields
parent

string

Required. Example format: properties/1234

page_size

int32

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).

page_token

string

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.

ListDataStreamsResponse

Response message for ListDataStreams RPC.

Fields
data_streams[]

DataStream

List of DataStreams.

next_page_token

string

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

ListFirebaseLinksRequest

Request message for ListFirebaseLinks RPC

Fields
parent

string

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

page_size

int32

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)

page_token

string

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.

ListFirebaseLinksResponse

Response message for ListFirebaseLinks RPC

Fields
next_page_token

string

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.

ListGoogleAdsLinksRequest

Request message for ListGoogleAdsLinks RPC.

Fields
parent

string

Required. Example format: properties/1234

page_size

int32

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).

page_token

string

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.

ListGoogleAdsLinksResponse

Response message for ListGoogleAdsLinks RPC.

Fields
next_page_token

string

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

ListMeasurementProtocolSecretsRequest

Request message for ListMeasurementProtocolSecret RPC

Fields
parent

string

Required. The resource name of the parent stream. Format: properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets

page_size

int32

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.

page_token

string

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.

ListMeasurementProtocolSecretsResponse

Response message for ListMeasurementProtocolSecret RPC

Fields
measurement_protocol_secrets[]

MeasurementProtocolSecret

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

next_page_token

string

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

ListPropertiesRequest

Request message for ListProperties RPC.

Fields
filter

string

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.    |
page_size

int32

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)

page_token

string

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.

show_deleted

bool

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

ListPropertiesResponse

Response message for ListProperties RPC.

Fields
properties[]

Property

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

next_page_token

string

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

MeasurementProtocolSecret

A secret value used for sending hits to Measurement Protocol.

Fields
name

string

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}

display_name

string

Required. Human-readable display name for this secret.

secret_value

string

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.

NumericValue

To represent a number.

Fields
Union field one_value. One of a numeric value one_value can be only one of the following:
int64_value

int64

Integer value

double_value

double

Double value

Property

A resource message representing a Google Analytics GA4 property.

Fields
name

string

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

property_type

PropertyType

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.

create_time

Timestamp

Output only. Time when the entity was originally created.

update_time

Timestamp

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

parent

string

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"

display_name

string

Required. Human-readable display name for this property.

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

industry_category

IndustryCategory

Industry associated with this property Example: AUTOMOTIVE, FOOD_AND_DRINK

time_zone

string

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"

currency_code

string

The currency type used in reports involving monetary values.

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

service_level

ServiceLevel

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

delete_time

Timestamp

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.

expire_time

Timestamp

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.

account

string

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

PropertySummary

A virtual resource representing metadata for a GA4 property.

Fields
property

string

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

display_name

string

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

property_type

PropertyType

The property's property type.

parent

string

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"

PropertyType

Types of Property resources.

Enums
PROPERTY_TYPE_UNSPECIFIED Unknown or unspecified property type
PROPERTY_TYPE_ORDINARY Ordinary GA4 property
PROPERTY_TYPE_SUBPROPERTY GA4 subproperty
PROPERTY_TYPE_ROLLUP GA4 rollup property

ProvisionAccountTicketRequest

Request message for ProvisionAccountTicket RPC.

Fields
account

Account

The account to create.

redirect_uri

string

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

ProvisionAccountTicketResponse

Response message for ProvisionAccountTicket RPC.

Fields
account_ticket_id

string

The param to be passed in the ToS link.

RunAccessReportRequest

The request for a Data Access Record Report.

Fields
entity

string

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.

dimensions[]

AccessDimension

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

metrics[]

AccessMetric

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

date_ranges[]

AccessDateRange

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.

dimension_filter

AccessFilterExpression

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.

metric_filter

AccessFilterExpression

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.

offset

int64

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.

limit

int64

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.

time_zone

string

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".

order_bys[]

AccessOrderBy

Specifies how rows are ordered in the response.

return_entity_quota

bool

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.

include_all_users

bool

Optional. Determines whether to include users who have never made an API call in the response. If true, all users with access to the specified property or account are included in the response, regardless of whether they have made an API call or not. If false, only the users who have made an API call will be included.

expand_groups

bool

Optional. Decides whether to return the users within user groups. This field works only when include_all_users is set to true. If true, it will return all users with access to the specified property or account. If false, only the users with direct access will be returned.

RunAccessReportResponse

The customized Data Access Record Report response.

Fields
dimension_headers[]

AccessDimensionHeader

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.

metric_headers[]

AccessMetricHeader

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.

rows[]

AccessRow

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

row_count

int32

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.

quota

AccessQuota

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

SearchChangeHistoryEventsRequest

Request message for SearchChangeHistoryEvents RPC.

Fields
account

string

Required. The account resource for which to return change history resources. Format: accounts/{account} Example: "accounts/100"

property

string

Optional. Resource name for a child property. If set, only return changes made to this property or its child resources. Format: properties/{propertyId} Example: "properties/100"

resource_type[]

ChangeHistoryResourceType

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

action[]

ActionType

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

actor_email[]

string

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

earliest_change_time

Timestamp

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

latest_change_time

Timestamp

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

page_size

int32

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).

page_token

string

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.

SearchChangeHistoryEventsResponse

Response message for SearchAccounts RPC.

Fields
change_history_events[]

ChangeHistoryEvent

Results that were accessible to the caller.

next_page_token

string

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

ServiceLevel

Various levels of service for Google Analytics.

Enums
SERVICE_LEVEL_UNSPECIFIED Service level not specified or invalid.
GOOGLE_ANALYTICS_STANDARD The standard version of Google Analytics.
GOOGLE_ANALYTICS_360 The paid, premium version of Google Analytics.

UpdateAccountRequest

Request message for UpdateAccount RPC.

Fields
account

Account

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

update_mask

FieldMask

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.

UpdateConversionEventRequest

Request message for UpdateConversionEvent RPC

Fields
conversion_event

ConversionEvent

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

update_mask

FieldMask

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.

UpdateCustomDimensionRequest

Request message for UpdateCustomDimension RPC.

Fields
custom_dimension

CustomDimension

The CustomDimension to update

update_mask

FieldMask

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.

UpdateCustomMetricRequest

Request message for UpdateCustomMetric RPC.

Fields
custom_metric

CustomMetric

The CustomMetric to update

update_mask

FieldMask

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.

UpdateDataRetentionSettingsRequest

Request message for UpdateDataRetentionSettings RPC.

Fields
data_retention_settings

DataRetentionSettings

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

update_mask

FieldMask

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.

UpdateDataStreamRequest

Request message for UpdateDataStream RPC.

Fields
data_stream

DataStream

The DataStream to update

update_mask

FieldMask

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.

UpdateGoogleAdsLinkRequest

Request message for UpdateGoogleAdsLink RPC

Fields
update_mask

FieldMask

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.

UpdateMeasurementProtocolSecretRequest

Request message for UpdateMeasurementProtocolSecret RPC

Fields
measurement_protocol_secret

MeasurementProtocolSecret

Required. The measurement protocol secret to update.

update_mask

FieldMask

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

UpdatePropertyRequest

Request message for UpdateProperty RPC.

Fields
property

Property

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

update_mask

FieldMask

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.