Analyze Google Analytics data, review website performance metrics, identify traffic patterns, and suggest data-driven improvements. Use when the user asks about analytics, website metrics, traffic analysis, conversion rates, user behavior, or performance optimization.
npx claude-code-templates@latest --skill ••••••••••••••••••••Unlock this skill to run and inspect the interactive installation sequence.
Analyze website performance using Google Analytics data to provide actionable insights and improvement recommendations.
This Skill requires Google Analytics API credentials. Set up environment variables:
export GOOGLE_ANALYTICS_PROPERTY_ID="your-property-id" export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account-key.json"
Or create a .env file in your project root:
GOOGLE_ANALYTICS_PROPERTY_ID=123456789 GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.json
Never commit credentials to version control. The service account JSON file should be stored securely outside your repository.
# Option 1: Install from requirements file (recommended) pip install -r cli-tool/components/skills/analytics/google-analytics/requirements.txt # Option 2: Install individually pip install google-analytics-data python-dotenv pandas
Once configured, I can:
Ask me questions like:
When you ask me to analyze Google Analytics data, I will:
- Traffic trends and patterns
- User behavior insights
- Performance bottlenecks
- Conversion opportunities
- Specific improvement suggestions
- Priority level (high/medium/low)
- Expected impact
- Implementation guidance
For detailed metric definitions and dimensions, see REFERENCE.md.
For complete analysis patterns and use cases, see EXAMPLES.md.
The Skill includes utility scripts for API interaction:
python scripts/ga_client.py --days 30 --metrics sessions,users,bounceRate
python scripts/analyze.py --period last-30-days --compare previous-period
The scripts handle API authentication, data fetching, and basic analysis. I'll interpret the results and provide actionable recommendations.
Authentication Error: Verify that:
GOOGLE_APPLICATION_CREDENTIALS points to a valid service account JSON fileGOOGLE_ANALYTICS_PROPERTY_ID matches your GA4 property ID (not the measurement ID)No Data Returned: Check that:
Import Errors: Install required packages:
pip install google-analytics-data python-dotenv pandas
.env files for configuration.env and credential files to .gitignoreThis Skill accesses aggregated analytics data only. It does not:
All data is processed locally and used only to generate recommendations during the conversation.
# Step 1: Initialize skill agent setup
npx skills add Google Analytics --install-production
python -m pip install -r requirements.txt
codex plugin install Google Analytics@latest
export API_KEY=secret_token_key_here
Unlock this skill to reveal complete step-by-step setup guides, terminal commands, configuration recipes, repository links, and interactive installation video walkthroughs.
Get instant access to complete setup guides, repository source code, and integration assets.
A world-famous collection of prompt engineering examples for researchers, developers, and creators working with LLMs including ChatGPT, Claude, and Gemini.
A curated list of Obsidian plugins, themes, templates, and Zettelkasten workflows for personal knowledge management and second-brain systems.
A curated list of AI-powered research platforms, paper analysis tools, automated literature search, and scientific discovery assistants.