Skip to main content

analyze gsc-adapter

Usage

seo-ops analyze gsc-adapter [--start-date=YYYY-MM-DD] [--end-date=YYYY-MM-DD] [--site-url=<url>] [--query=<query>] [--page=<url>] [--dimension=query|page] [--search-type=web|image|video|news] [--row-limit=<n>] [--output=json|table] [--mock]

Fetch search performance data from Google Search Console.

Prerequisites

  1. Create a Google Cloud service account
  2. Grant it access to your Search Console property
  3. Download the JSON key file
  4. Configure in wp-seo-ops:
seo-ops config set gsc_credentials_path /path/to/service-account.json
seo-ops config set gsc_site_url https://example.com

Examples

# Fetch last 30 days of data
seo-ops analyze gsc-adapter --start-date=2024-01-01 --end-date=2024-01-31

# Query-level breakdown
seo-ops analyze gsc-adapter --start-date=2024-01-01 --end-date=2024-01-31 --dimension=query

# Page-level breakdown
seo-ops analyze gsc-adapter --start-date=2024-01-01 --end-date=2024-01-31 --dimension=page --output=json

# Mock mode for testing
seo-ops analyze gsc-adapter --start-date=2024-01-01 --end-date=2024-01-31 --mock

Output Fields

FieldDescription
ClicksTotal search clicks
ImpressionsTotal search impressions
CTRClick-through rate
PositionAverage search position