google-analytics

v1.0.3
com.mcparmory/google-analytics Checked 6 hours ago Published 6 months ago

Query GA4 analytics data with custom reports, pivot tables, and audience exports

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

run_pivot_reports_batch Run Pivot Reports Batch

Execute multiple pivot reports in a single batch request for a Google Analytics property. All reports must belong to the same property, with support for up to 5 requests per batch.

run_reports_batch Run Reports Batch

Execute multiple analytics reports in a single batch request for a Google Analytics property. All reports must belong to the same property, with support for up to 5 requests per batch.

validate_report_compatibility Validate Report Compatibility

Validates whether a set of dimensions and metrics can be used together in a Core report, and returns compatible or incompatible dimensions and metrics. Use this to identify which dimensions and metrics need to be removed to create a valid report.

get_audience_export Get Audience Export

Retrieves configuration metadata for a specific audience export, including its status and settings. Use this to inspect an audience export after creation or to monitor its progress.

ParameterTypeDescription
name *stringThe resource identifier for the audience export in the format properties/{property}/audienceExports/{audience_export}, where property is your Google Analytics property ID and audience_export is the un…

generate_pivot_report Generate Pivot Report

Generate a customized pivot report of Google Analytics event data with advanced dimensional analysis. Pivot reports allow dimensions to be organized in rows or columns, with support for multiple pivots to further segment and analyze your data.

get_realtime_report Get Realtime Report

Retrieve a customized report of real-time event data for a Google Analytics property, showing events and usage from the present moment up to 30 minutes ago (60 minutes for GA360). Data appears in reports within seconds of being sent to Google Analytics.

run_report Run Report

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](https://developers.google.com/analytics/devguides/repor…

list_audience_exports List Audience Exports

Lists all audience exports for a property, allowing you to find and reuse existing exports rather than creating duplicates. The same audience can have multiple exports representing user snapshots from different dates.

ParameterTypeDescription
parent *stringThe property for which to list audience exports. Format: properties/{property}
pageSizeintegerMaximum number of audience exports to return per page. The service may return fewer than specified. Higher values are coerced to the maximum allowed.
pageTokenstringPage token from a previous ListAudienceExports call to retrieve the next page of results. When paginating, all other parameters must match the original request.

create_audience_export Create Audience Export

Creates a snapshot of users currently in an audience and initiates an asynchronous export process. Use QueryAudienceExport to retrieve the exported audience data after creation.

ParameterTypeDescription
parent *stringThe parent property resource where this audience export will be created. Format: properties/{property}
audiencestringThe audience resource to export. This identifies which audience's users will be included in the export. Format: properties/{property}/audiences/{audience}
dimensionsarrayThe dimensions to include in the audience export response. Specifies which user attributes or characteristics will be returned in the exported data.

query_audience_export Query Audience Export

Retrieves user data from a previously created audience export. Users must first be exported via CreateAudienceExport before they can be queried using this method.

ParameterTypeDescription
name *stringThe resource name of the audience export to query. Format: properties/{property}/audienceExports/{audience_export}
limitstringMaximum number of rows to return per request. Defaults to 10,000 if unspecified. The API returns a maximum of 250,000 rows regardless of the requested limit. Must be a positive integer.
offsetstringThe zero-indexed row number to start from for pagination. Omit or set to 0 for the first request. For subsequent requests, set to the limit value from the previous response to retrieve the next batch…