Xpersona
G

google analytics and search improve

CLAWHUB · Unverified

Understand website goals and user journeys first, then analyze GSC/GA4 data and audit the live site to validate whether users behave as intended. Identify ga...

62
Rank
84
Safety
1.0k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17fvbpefjhhwa4k1dked7k0n984c73s:google-analytics-and-search-improve
  1. Install using `clawhub skill install s17fvbpefjhhwa4k1dked7k0n984c73s:google-analytics-and-search-improve` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/morvanzhou/google-analytics-and-search-improve before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-morvanzhou-google-analytics-and-search-improve/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

147,661 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: google-analytics-and-search-improve
description: Understand website goals and user journeys first, then analyze GSC/GA4 data and audit the live site to validate whether users behave as intended. Identify gaps between goals and reality, and produce actionable, goal-aligned improvement plans. Use when user wants to diagnose website problems, improve search rankings, optimize traffic, analyze Google Analytics or Search Console data, audit website performance, or create a data-backed improvement roadmap.
---

# Goal-Driven Website Analytics & Improvement

First understand what the site does and what it wants users to do, then use GSC/GA4 data combined with live-site auditing to verify whether users actually follow the intended journey. Identify the gap between goals and reality, and generate prioritized, actionable improvement plans.

## Data Storage

All runtime data is stored in `$DATA_DIR`, separated from skill code.

```
<project_root>/.skills-data/google-analytics-and-search-improve/
  .env        # Configuration (auth, URLs, etc.), auto-loaded by scripts
  data/       # Raw data only: API responses, user-uploaded CSVs (GSC/GA4/PSI JSON/CSV)
  analysis/   # Analysis outputs: reports, audit results, website profile, funnel analysis
  charts/     # Generated chart images (PNG) for embedding in analysis reports
  scripts/    # Analysis scripts: code that reads from data/ and writes to analysis/
  tmp/        # Screenshots and temporary files
  cache/      # API response cache
  configs/    # Config files (including Service Account JSON keys)
  logs/       # Execution logs
  venv/       # Python virtual environment (managed by uv)
```

**Directory separation principle**:
- `data/` = raw, unprocessed data from APIs or user exports (input)
- `analysis/` = processed results, reports, insights, audit findings (output)
- `charts/` = generated chart images (PNG) that are embedded in analysis reports via relative paths
- `scripts/` = analysis code that transforms `data/` → `analysis/`

## Core Principles

### Goal → Data → Gap → Action

Every analysis must start from the website's purpose and intended user journey. Data is only valuable when measured against a goal. The skill's job is to:

1. Understand what the site wants users to do (goal)
2. Use data to check if users actually do it (reality)
3. Find where the gap is (diagnosis)
4. Tell the developer what to do next (action)

### Code-Driven Data Analysis & Visualization

**All data analysis MUST be done through code, not by directly reading JSON and manually summarizing.**

When analyzing raw data from `$DATA_DIR/data/` (GSC JSON, GA4 JSON, PSI JSON, Bing JSON, etc.):

1. **Write a Python script** in `$DATA_DIR/scripts/` that reads the raw JSON, processes and aggregates the data, and outputs the structured results
2. **Execute the script** to produce accurate, reproducible results
3. **Generate charts** in the same script (or a companion script) — every analysis phase that produces quantitati

_meta.json

{
  "ownerId": "kn75t3m6ejw8mr4p70mscjtfq1820gd4",
  "slug": "google-analytics-and-search-improve",
  "version": "1.0.5",
  "publishedAt": 1776820800609
}

references/data-collection-reference.md

# Data Collection Reference

Complete reference for data collection: authentication setup, script usage, API details, CSV export instructions, and custom query guidance.

---

## 1. Authentication Setup (Shared by GSC & GA4)

GSC and GA4 share the same Google Service Account. Create it once to use for both.

### Step 1: Create a Google Cloud Project and Enable APIs

1. Open [Google Cloud Console](https://console.cloud.google.com/)
2. Click the project selector (top-left) → "New Project" → name it (e.g., "my-site-analytics") → "Create"
3. Confirm you've switched to the new project, then open the [API Library](https://console.cloud.google.com/apis/library)
4. Search for **"Google Search Console API"** → click into it → click "Enable"
5. Search for **"Google Analytics Data API"** → click into it → click "Enable"
6. Search for **"PageSpeed Insights API"** → click into it → click "Enable" (used for site performance auditing; without it you'll get 429 quota errors)

### Step 2: Create a Service Account and Download JSON Key

1. Open the [Service Accounts page](https://console.cloud.google.com/iam-admin/serviceaccounts)
2. Click "+ Create Service Account" at the top
3. Enter a name (e.g., "analytics-reader") → click "Create and Continue"
4. Skip role selection (no project-level role needed) → "Continue" → "Done"
5. Find the newly created Service Account in the list, click its email address to enter the details page
6. Click the "Keys" tab → "Add Key" → "Create new key" → select **JSON** → "Create"
7. Your browser will automatically download a `.json` file — this is the key file
8. Note the Service Account email address (format: `analytics-reader@my-site-analytics.iam.gserviceaccount.com`)

### Step 3: Place JSON Key in configs/

```bash
cp /path/to/downloaded/my-site-analytics-xxxx.json "$DATA_DIR/configs/"
```

All scripts (`gsc_query.py`, `ga4_query.py`, `ga4_funnel.py`) auto-discover the `*.json` key file from `$DATA_DIR/configs/` via the shared `utils.py` module — no need to configure the path in `.env` or set `GOOGLE_APPLICATION_CREDENTIALS`. If multiple JSON files exist, the first one (alphabetically) is used.

### Step 4: Authorize in Search Console (for GSC)

1. Open [Google Search Console](https://search.google.com/search-console/)
2. Select your site property
3. Click "Settings" at the bottom of the left menu → "Users and permissions"
4. Click "Add user" → paste the Service Account email → set permission to "Restricted" (read-only) → "Add"

### Step 5: Confirm GSC Property Type

GSC has two property types, and the `GSC_SITE_URL` value must match the actual type:

| GSC Property Type | GSC_SITE_URL Format | Example |
|-------------------|---------------------|---------|
| **Domain property** | `sc-domain:domain` | `sc-domain:example.com` |
| **URL-prefix property** | Full URL | `https://example.com` |

> How to check: In the [Search Console](https://search.google.com/search-console/) property selector (top-left), if it shows a bare domain name 

references/data-visualization-guide.md

# Data Visualization Guide

## Visualization Principles

1. **Chart-first reporting**: When presenting data findings, always generate a chart BEFORE writing the textual interpretation. The chart is the primary evidence; the text explains the insight.
2. **One chart, one insight**: Each chart should communicate a single clear message. Use the chart title to state the insight (e.g., "Mobile bounce rate is 2x desktop" instead of "Bounce rate by device").
3. **Goal-aligned visualization**: Highlight goal-relevant thresholds, targets, or benchmarks in charts using reference lines or color coding.
4. **Consistent style**: Use a consistent color palette and style across all charts in a single report.

## Chart Generation Method

Use Python with `matplotlib` to generate charts. Each analysis script should combine **data processing and chart generation in one script** — read raw JSON from `$DATA_DIR/data/`, process/aggregate the data, output structured results, and generate charts in the same execution. This ensures charts are always consistent with the analysis data.

**Standard pattern** (data analysis + chart generation in one script):

```python
import matplotlib
matplotlib.use('Agg')  # Non-interactive backend, MUST be set before importing pyplot
import matplotlib.pyplot as plt
import json
import os
import platform

# ── Configuration ──────────────────────────────────────────
DATA_DIR = os.environ.get("DATA_DIR", ".skills-data/google-analytics-and-search-improve")
CHARTS_DIR = os.path.join(DATA_DIR, "charts")
os.makedirs(CHARTS_DIR, exist_ok=True)

# ── CJK font support (Chinese / Japanese / Korean) ────────
_system = platform.system()
if _system == "Darwin":
    _cjk_fonts = ["Arial Unicode MS", "PingFang SC", "Heiti SC", "STHeiti"]
elif _system == "Linux":
    _cjk_fonts = ["WenQuanYi Micro Hei", "Noto Sans CJK SC", "DejaVu Sans"]
else:  # Windows
    _cjk_fonts = ["Microsoft YaHei", "SimHei", "SimSun"]

# ── Style defaults ─────────────────────────────────────────
plt.rcParams.update({
    "font.sans-serif": _cjk_fonts,
    "axes.unicode_minus": False,     # Fix minus sign rendering with CJK fonts
    "figure.figsize": (10, 6),
    "figure.dpi": 150,
    "axes.titlesize": 14,
    "axes.labelsize": 12,
    "xtick.labelsize": 10,
    "ytick.labelsize": 10,
    "axes.spines.top": False,
    "axes.spines.right": False,
    "figure.facecolor": "white",
    "axes.facecolor": "white",
    "savefig.bbox": "tight",
    "savefig.pad_inches": 0.3,
})

# Color palette (consistent across all charts)
COLORS = ["#4285F4", "#EA4335", "#FBBC04", "#34A853", "#FF6D01", "#46BDC6", "#7B61FF", "#F538A0"]
COLOR_GOOD = "#34A853"
COLOR_WARN = "#FBBC04"
COLOR_BAD = "#EA4335"
COLOR_NEUTRAL = "#4285F4"

# ── Load data ──────────────────────────────────────────────
with open(os.path.join(DATA_DIR, "data", "DATAFILE.json")) as f:
    data = json.load(f)

# ── Plot ───────────────────────────────────────────────────
fig, ax = plt.subplots()
# ... plotting code ...
ax.set_title

references/metrics-glossary.md

# Key Metrics & Analysis Dimensions

## Six Analysis Dimensions

### 1. SEO

**Primary data source**: GSC Search Analytics

| Metric | Healthy Range | Warning Signal |
|--------|---------------|----------------|
| Average CTR | > 3% (overall) | < 1% requires immediate optimization |
| Average Position | < 20 (first two pages) | > 30 low exposure value |
| Impressions Trend | Steady growth | Sustained decline |
| Index Coverage | > 90% | < 70% structural issues |

**Diagnostic points**:
- High impressions, low CTR → Title/description needs optimization
- Keywords ranked 4-10 → Best optimization targets (push into top 3)
- Pages with declining rankings → Content needs updating or competitors overtaking

### 2. Performance

**Primary data source**: PageSpeed Insights API + agent-browser profiling

| Metric | Good | Needs Improvement | Poor |
|--------|------|-------------------|------|
| LCP (Largest Contentful Paint) | < 2.5s | 2.5-4s | > 4s |
| INP (Interaction to Next Paint) | < 200ms | 200-500ms | > 500ms |
| CLS (Cumulative Layout Shift) | < 0.1 | 0.1-0.25 | > 0.25 |
| TTFB (Time to First Byte) | < 800ms | 800-1800ms | > 1800ms |

### 3. Content Strategy

**Primary data source**: GA4 top_pages + GSC search_analytics

**Diagnostic points**:
- **High-traffic low-engagement pages**: High pageViews but low engagementRate → Content quality doesn't match user expectations
- **High-ranking low-traffic pages**: Good rankings but low clicks → Title/description lacks appeal
- **Zero-traffic content**: Indexed but no impressions → Keyword strategy failure or poor content quality
- **Content decay**: Pages with sustained traffic decline → Needs updating or merging

### 4. User Experience (UX)

**Primary data source**: GA4 user_behavior + landing_pages

| Metric | Healthy Range | Warning Signal |
|--------|---------------|----------------|
| Bounce Rate | < 50% | > 70% (non-blog sites) |
| Engagement Rate | > 60% | < 40% |
| Average Session Duration | > 2 min | < 30s |
| Page Depth | > 2 | = 1 (single-page exit) |

**Diagnostic points**:
- Mobile bounce rate much higher than desktop → Poor mobile experience
- Specific pages with abnormally high bounce rate → Page content or design issues
- Very short session duration → Slow page load or irrelevant content

### 5. Conversion Rate Optimization

**Primary data source**: GA4 conversion_events + landing_pages

**Diagnostic points**:
- Large conversion rate variance across landing pages → A/B testing opportunity
- High-traffic low-conversion pages → CTA or user path issues
- Conversion funnel drop-off points → Identify where users are lost
- Cross-device conversion rate differences → Device-specific experience issues

### 6. Technical Issues

**Primary data source**: GSC URL Inspect + source code analysis + agent-browser

**Checklist**:
- [ ] robots.txt configured correctly
- [ ] sitemap.xml complete and accessible
- [ ] No 4xx/5xx error pages
- [ ] Pages have correct meta tags
- [ ] Structured data (JSON-LD) err

Sponsored

Ads related to google analytics and search improve and adjacent AI workflows.