Skip to main content
Glama
burhan29ee

ga4-mcp-server

by burhan29ee

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GOOGLE_APPLICATION_CREDENTIALSYesThe absolute path to your Google service account JSON key file.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_account_summariesA

List every GA4 account and its properties the service account can see. Returns account name/id plus each property's display name and numeric id. Call this first to discover property ids for the other tools.

get_property_detailsA

Get configuration details for one GA4 property (name, time zone, currency, industry, create time).

list_data_streamsA

List the data streams (web/app) on a GA4 property. The stream id (last path segment of 'name') is needed by the Measurement Protocol secret tools.

run_reportB

Run a GA4 report. metrics/dimensions are GA4 API names (e.g. metrics ['activeUsers','conversions'], dimensions ['date','sessionDefaultChannelGroup']). Dates accept YYYY-MM-DD or relative forms like '28daysAgo' / 'today'.

run_realtime_reportA

Run a GA4 realtime report (last ~30 minutes). Example: metrics ['activeUsers'], dimensions ['country','unifiedScreenName'].

list_custom_dimensionsB

List custom dimensions defined on a GA4 property.

create_custom_dimensionB

Create a custom dimension. parameter_name is the event parameter / user property key; scope is 'EVENT', 'USER' or 'ITEM'. display_name may contain only letters, numbers, underscores and spaces.

archive_custom_dimensionA

Archive (delete) a custom dimension. custom_dimension_id may be the numeric id or the full 'properties/NNN/customDimensions/MMM' name.

list_custom_metricsC

List custom metrics defined on a GA4 property.

create_custom_metricC

Create a custom metric. measurement_unit is one of STANDARD, CURRENCY, FEET, METERS, KILOMETERS, MILES, MILLISECONDS, SECONDS, MINUTES, HOURS.

list_key_eventsB

List key events (conversions) on a GA4 property.

create_key_eventC

Mark an event as a key event (conversion). counting_method is 'ONCE_PER_EVENT' or 'ONCE_PER_SESSION'.

list_audiencesB

List audiences defined on a GA4 property.

create_event_audienceA

Create a GA4 audience of users who triggered a given event (e.g. 'purchase', 'generate_lead') — useful for remarketing lists that can be shared to Google Ads. membership_duration_days is how long a user stays in the audience (max 540).

archive_audienceB

Archive a GA4 audience. audience_id may be the numeric id or the full 'properties/NNN/audiences/MMM' name.

list_measurement_protocol_secretsA

List Measurement Protocol API secrets for a data stream. stream_id is the numeric id from list_data_streams.

create_measurement_protocol_secretA

Create a Measurement Protocol API secret on a data stream. Returns the secret_value (api_secret) needed by send_ga4_event. Treat it as sensitive.

delete_measurement_protocol_secretB

Delete a Measurement Protocol API secret. secret_id may be the numeric id or the full resource name.

send_ga4_eventA

Send an event into a GA4 property via the Measurement Protocol. measurement_id is the stream's 'G-XXXXXXX'; api_secret comes from a Measurement Protocol secret; client_id identifies the user/device. Set validate=True to hit GA4's debug/validation endpoint (checks the payload WITHOUT ingesting it) — recommended before real sends.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/burhan29ee/ga4-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server