Google Analytics System
Enterprise-grade skill for analyze, google, analytics, data. Includes structured workflows, validation checks, and reusable patterns for analytics.
Google Analytics System
Analyze website performance using Google Analytics data — covering setup, key metrics interpretation, custom reports, event tracking, and actionable optimization recommendations.
When to Use
Use this system when:
- Need to understand website traffic patterns and user behavior
- Setting up Google Analytics for a new website or app
- Building custom reports and dashboards
- Optimizing conversion funnels and user journeys
Use other analytics tools when:
- Product analytics with cohort analysis → Mixpanel or Amplitude
- Privacy-first analytics without cookies → Plausible or Fathom
- Real-time server-side analytics → custom solutions
Quick Start
GA4 Setup
<!-- Google Analytics 4 tag --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-XXXXXXXXXX'); </script>
Custom Event Tracking
// Track button clicks gtag('event', 'click', { event_category: 'engagement', event_label: 'cta_button', value: 1 }); // Track form submissions gtag('event', 'form_submit', { event_category: 'conversion', event_label: 'signup_form', value: 1 }); // Track purchases gtag('event', 'purchase', { transaction_id: 'T_12345', value: 49.99, currency: 'USD', items: [ { item_id: 'SKU_123', item_name: 'Pro Plan', price: 49.99 } ] });
GA4 API Query
from google.analytics.data_v1beta import BetaAnalyticsDataClient from google.analytics.data_v1beta.types import RunReportRequest, DateRange, Dimension, Metric client = BetaAnalyticsDataClient() request = RunReportRequest( property=f"properties/123456789", dimensions=[ Dimension(name="date"), Dimension(name="sessionSource"), ], metrics=[ Metric(name="sessions"), Metric(name="conversions"), Metric(name="bounceRate"), ], date_ranges=[DateRange(start_date="30daysAgo", end_date="today")], ) response = client.run_report(request) for row in response.rows: print(f"{row.dimension_values[0].value}: {row.metric_values[0].value} sessions")
Core Concepts
Key Metrics
| Metric | Description | Healthy Range |
|---|---|---|
| Sessions | Total visits | Growing month-over-month |
| Users | Unique visitors | Growing, with returning users |
| Bounce Rate | Single-page sessions | 40-60% (varies by type) |
| Avg Session Duration | Time on site | > 2 minutes |
| Pages per Session | Engagement depth | > 2 pages |
| Conversion Rate | Goal completions / sessions | 2-5% (varies) |
Traffic Sources
| Channel | Description | Optimization |
|---|---|---|
| Organic Search | SEO traffic | Content, keywords, backlinks |
| Direct | Typed URL or bookmarks | Brand awareness |
| Referral | Links from other sites | Partnership, PR |
| Social | Social media platforms | Social content strategy |
| Paid Search | Google Ads, etc. | Ad optimization, ROAS |
| Newsletter clicks | Email campaign optimization |
Conversion Funnel Analysis
Landing Page (1000 visitors)
→ Product Page (600 visitors, 60% progression)
→ Add to Cart (200 visitors, 33% progression)
→ Checkout (100 visitors, 50% progression)
→ Purchase (40 visitors, 40% progression)
Overall conversion: 4%
Biggest drop-off: Product → Cart (67% drop)
Action: Optimize product page CTA and pricing display
Configuration
| Parameter | Description |
|---|---|
property_id | GA4 property identifier |
data_stream | Web or app data stream |
measurement_id | G-XXXXXXXXXX tag ID |
events | Custom event definitions |
conversions | Events marked as conversions |
audiences | User segment definitions |
custom_dimensions | Business-specific dimensions |
Best Practices
- Set up conversions first — define what success means before analyzing data
- Use UTM parameters for all campaign links to track traffic sources accurately
- Create custom events for key user actions (signup, purchase, feature usage)
- Build dashboards for daily monitoring — don't dig through raw data every time
- Segment your data — overall averages hide insights; compare by source, device, and user type
- Set up alerts for significant changes — traffic drops, conversion rate changes, error spikes
Common Issues
Data discrepancy with other tools: GA uses session-based counting; other tools may use event-based. Ad blockers prevent ~10-15% of users from being tracked. Check timezone and filter settings.
Low conversion tracking: Verify event firing with GA4 DebugView. Ensure conversion events are properly marked. Check for cross-domain tracking issues on multi-domain setups.
Bounce rate too high: Check page load speed (Core Web Vitals). Ensure content matches search intent. Improve above-the-fold content and clear CTAs.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Full-Stack Code Reviewer
Comprehensive code review skill that checks for security vulnerabilities, performance issues, accessibility, and best practices across frontend and backend code.
Test Suite Generator
Generates comprehensive test suites with unit tests, integration tests, and edge cases. Supports Jest, Vitest, Pytest, and Go testing.
Pro Architecture Workspace
Battle-tested skill for architectural, decision, making, framework. Includes structured workflows, validation checks, and reusable patterns for development.