Overview
what is Google Analytics MCP Server?
Google Analytics MCP Server is an implementation that allows users to access Google Analytics 4 (GA4) data using the Model Context Protocol TypeScript SDK.
how to use Google Analytics MCP Server?
To use the server, set up a Google Cloud project, enable the Analytics Data API, create a service account, and configure the server with your credentials. Start the server using the provided commands.
key features of Google Analytics MCP Server?
- Retrieve page view metrics with customizable dimensions.
- Track active and new users over time.
- Analyze specific events and their metrics.
- Monitor user behavior metrics such as session duration and bounce rate.
- Flexible date range selection for all queries.
use cases of Google Analytics MCP Server?
- Analyzing website traffic and user engagement metrics.
- Monitoring user behavior to improve website performance.
- Tracking specific events like purchases or sign-ups.
FAQ from Google Analytics MCP Server?
- What are the prerequisites for using this server?
You need Node.js 20 or higher, a Google Analytics 4 property, and a Google Cloud project with the Analytics Data API enabled.
- How do I install the server?
You can install it using the command
pnpm install mcp-server-google-analytics.
- Is it secure to use service account credentials?
Yes, but always use environment variables for sensitive information and follow security best practices.