Module api

Source

Structs§

ActiveMetricRestriction
A metric actively restricted in creating the report.
AnalyticsData
Central instance to access all AnalyticsData related resource activities
AudienceExport
An audience export is a list of users in an audience at the time of the list’s creation. One audience may have multiple audience exports created for different days.
BatchRunPivotReportsRequest
The batch request containing multiple pivot report requests.
BatchRunPivotReportsResponse
The batch response containing multiple pivot reports.
BatchRunReportsRequest
The batch request containing multiple report requests.
BatchRunReportsResponse
The batch response containing multiple reports.
BetweenFilter
To express that the result needs to be between two numbers (inclusive).
CaseExpression
Used to convert a dimension value to a single case.
CheckCompatibilityRequest
The request for compatibility information for a report’s dimensions and metrics. Check compatibility provides a preview of the compatibility of a report; fields shared with the runReport request should be the same values as in your runReport request.
CheckCompatibilityResponse
The compatibility response with the compatibility of each dimension & metric.
Cohort
Defines a cohort selection criteria. A cohort is a group of users who share a common characteristic. For example, users with the same firstSessionDate belong to the same cohort.
CohortReportSettings
Optional settings of a cohort report.
CohortSpec
The specification of cohorts for a cohort report. Cohort reports create a time series of user retention for the cohort. For example, you could select the cohort of users that were acquired in the first week of September and follow that cohort for the next six weeks. Selecting the users acquired in the first week of September cohort is specified in the cohort object. Following that cohort for the next six weeks is specified in the cohortsRange object. For examples, see Cohort Report Examples. The report response could show a weekly time series where say your app has retained 60% of this cohort after three weeks and 25% of this cohort after six weeks. These two percentages can be calculated by the metric cohortActiveUsers/cohortTotalUsers and will be separate rows in the report.
CohortsRange
Configures the extended reporting date range for a cohort report. Specifies an offset duration to follow the cohorts over.
Comparison
Defines an individual comparison. Most requests will include multiple comparisons so that the report compares between the comparisons.
ComparisonMetadata
The metadata for a single comparison.
ConcatenateExpression
Used to combine dimension values to a single dimension.
DateRange
A contiguous set of days: startDate, startDate + 1, …, endDate. Requests are allowed up to 4 date ranges.
Dimension
Dimensions are attributes of your data. For example, the dimension city indicates the city from which an event originates. Dimension values in report responses are strings; for example, the city could be “Paris” or “New York”. Requests are allowed up to 9 dimensions.
DimensionCompatibility
The compatibility for a single dimension.
DimensionExpression
Used to express a dimension which is the result of a formula of multiple dimensions. Example usages: 1) lower_case(dimension) 2) concatenate(dimension1, symbol, dimension2).
DimensionHeader
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.
DimensionMetadata
Explains a dimension.
DimensionOrderBy
Sorts by dimension values.
DimensionValue
The value of a dimension.
Filter
An expression to filter dimension or metric values.
FilterExpression
To express dimension or metric filters. The fields in the same FilterExpression need to be either all dimensions or all metrics.
FilterExpressionList
A list of filter expressions.
InListFilter
The result needs to be in a list of string values.
ListAudienceExportsResponse
A list of all audience exports for a property.
Metadata
The dimensions, metrics and comparisons currently accepted in reporting methods.
Metric
The quantitative measurements of a report. For example, the metric eventCount is the total number of events. Requests are allowed up to 10 metrics.
MetricCompatibility
The compatibility for a single metric.
MetricHeader
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.
MetricMetadata
Explains a metric.
MetricOrderBy
Sorts by metric values.
MetricValue
The value of a metric.
MinuteRange
A contiguous set of minutes: startMinutesAgo, startMinutesAgo + 1, …, endMinutesAgo. Requests are allowed up to 2 minute ranges.
NumericFilter
Filters for numeric or date values.
NumericValue
To represent a number.
Operation
This resource represents a long-running operation that is the result of a network API call.
OrderBy
Order bys define how rows will be sorted in the response. For example, ordering rows by descending event count is one ordering, and ordering rows by the event name string is a different ordering.
Pivot
Describes the visible dimension columns and rows in the report response.
PivotDimensionHeader
Summarizes dimension values from a row for this pivot.
PivotHeader
Dimensions’ values in a single pivot.
PivotOrderBy
Sorts by a pivot column group.
PivotSelection
A pair of dimension names and values. Rows with this dimension pivot pair are ordered by the metric’s value. For example if pivots = {{“browser”, “Chrome”}} and metric_name = “Sessions”, then the rows will be sorted based on Sessions in Chrome. ———|–––––|––––––––|–––––|–––––––– | Chrome | Chrome | Safari | Safari ———|–––––|––––––––|–––––|–––––––– Country | Sessions | Pages/Sessions | Sessions | Pages/Sessions ———|–––––|––––––––|–––––|–––––––– US | 2 | 2 | 3 | 1 ———|–––––|––––––––|–––––|–––––––– Canada | 3 | 1 | 4 | 1 ———|–––––|––––––––|–––––|––––––––
PropertyAudienceExportCreateCall
Creates an audience export for later retrieval. This method quickly returns the audience export’s resource name and initiates a long running asynchronous request to form an audience export. To export the users in an audience export, first create the audience export through this method and then send the audience resource name to the QueryAudienceExport method. See Creating an Audience Export for an introduction to Audience Exports with examples. An audience export is a snapshot of the users currently in the audience at the time of audience export creation. Creating audience exports for one audience on different days will return different results as users enter and exit the audience. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience exports contain the users in each audience. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the Google Analytics Audience Export API Feedback form.
PropertyAudienceExportGetCall
Gets configuration metadata about a specific audience export. This method can be used to understand an audience export after it has been created. See Creating an Audience Export for an introduction to Audience Exports with examples. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the Google Analytics Audience Export API Feedback form.
PropertyAudienceExportListCall
Lists all audience exports for a property. This method can be used for you to find and reuse existing audience exports rather than creating unnecessary new audience exports. The same audience can have multiple audience exports that represent the export of users that were in an audience on different days. See Creating an Audience Export for an introduction to Audience Exports with examples. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the Google Analytics Audience Export API Feedback form.
PropertyAudienceExportQueryCall
Retrieves an audience export of users. After creating an audience, the users are not immediately available for exporting. First, a request to CreateAudienceExport is necessary to create an audience export of users, and then second, this method is used to retrieve the users in the audience export. See Creating an Audience Export for an introduction to Audience Exports with examples. Audiences in Google Analytics 4 allow you to segment your users in the ways that are important to your business. To learn more, see https://support.google.com/analytics/answer/9267572. Audience Export APIs have some methods at alpha and other methods at beta stability. The intention is to advance methods to beta stability after some feedback and adoption. To give your feedback on this API, complete the Google Analytics Audience Export API Feedback form.
PropertyBatchRunPivotReportCall
Returns multiple pivot reports in a batch. All reports must be for the same GA4 Property.
PropertyBatchRunReportCall
Returns multiple reports in a batch. All reports must be for the same GA4 Property.
PropertyCheckCompatibilityCall
This compatibility method lists dimensions and metrics that can be added to a report request and maintain compatibility. This method fails if the request’s dimensions and metrics are incompatible. In Google Analytics, reports fail if they request incompatible dimensions and/or metrics; in that case, you will need to remove dimensions and/or metrics from the incompatible report until the report is compatible. The Realtime and Core reports have different compatibility rules. This method checks compatibility for Core reports.
PropertyGetMetadataCall
Returns metadata for dimensions and metrics available in reporting methods. Used to explore the dimensions and metrics. In this method, a Google Analytics GA4 Property Identifier is specified in the request, and the metadata response includes Custom dimensions and metrics as well as Universal metadata. For example if a custom metric with parameter name levels_unlocked is registered to a property, the Metadata response will contain customEvent:levels_unlocked. Universal metadata are dimensions and metrics applicable to any property such as country and totalUsers.
PropertyMethods
A builder providing access to all methods supported on property resources. It is not used directly, but through the AnalyticsData hub.
PropertyQuota
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.
PropertyRunPivotReportCall
Returns a customized pivot report of your Google Analytics event data. Pivot reports are more advanced and expressive formats than regular reports. In a pivot report, dimensions are only visible if they are included in a pivot. Multiple pivots can be specified to further dissect your data.
PropertyRunRealtimeReportCall
Returns a customized report of realtime event data for your property. Events appear in realtime reports seconds after they have been sent to the Google Analytics. Realtime reports show events and usage data for the periods of time ranging from the present moment to 30 minutes ago (up to 60 minutes for Google Analytics 360 properties). For a guide to constructing realtime requests & understanding responses, see Creating a Realtime Report.
PropertyRunReportCall
Returns a customized report of your Google Analytics event data. Reports contain statistics derived from data collected by the Google Analytics tracking code. The data returned from the API is as a table with columns for the requested dimensions and metrics. Metrics are individual measurements of user activity on your property, such as active users or event count. Dimensions break down metrics across some common criteria, such as country or event name. For a guide to constructing requests & understanding responses, see Creating a Report.
QueryAudienceExportRequest
A request to list users in an audience export.
QueryAudienceExportResponse
A list of users in an audience export.
QuotaStatus
Current state for a particular quota group.
ResponseMetaData
Response’s metadata carrying additional information about the report content.
Row
Report data for each row. For example if RunReportRequest contains: none "dimensions": [ { "name": "eventName" }, { "name": "countryId" } ], "metrics": [ { "name": "eventCount" } ] One row with ‘in_app_purchase’ as the eventName, ‘JP’ as the countryId, and 15 as the eventCount, would be: none "dimensionValues": [ { "value": "in_app_purchase" }, { "value": "JP" } ], "metricValues": [ { "value": "15" } ]
RunPivotReportRequest
The request to generate a pivot report.
RunPivotReportResponse
The response pivot report table corresponding to a pivot request.
RunRealtimeReportRequest
The request to generate a realtime report.
RunRealtimeReportResponse
The response realtime report table corresponding to a request.
RunReportRequest
The request to generate a report.
RunReportResponse
The response report table corresponding to a request.
SamplingMetadata
If this report results is sampled, this describes the percentage of events used in this report. Sampling is the practice of analyzing a subset of all data in order to uncover the meaningful information in the larger data set.
SchemaRestrictionResponse
The schema restrictions actively enforced in creating this report. To learn more, see Access and data-restriction management.
Status
The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.
StringFilter
The filter for string
V1betaAudienceDimension
An audience dimension is a user attribute. Specific user attributed are requested and then later returned in the QueryAudienceExportResponse.
V1betaAudienceDimensionValue
The value of a dimension.
V1betaAudienceRow
Dimension value attributes for the audience user row.

Enums§

Scope
Identifies the an OAuth2 authorization scope. A scope is needed when requesting an authorization token.