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
- Create a Google Cloud service account
- Grant it access to your Search Console property
- Download the JSON key file
- 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
| Field | Description |
|---|---|
| Clicks | Total search clicks |
| Impressions | Total search impressions |
| CTR | Click-through rate |
| Position | Average search position |