GWG SEO Docsv0.1.0

Your data / PREVIEW

Connect Search Console and GA4

Read your own Google properties with read-only credentials. Google integrations are preview features in GWG SEO 0.1.0.

For v0.1.0 · Updated November 23, 2026

Preview status

Bring a Google Desktop OAuth client

  • Enable the Search Console API and Google Analytics Data API in your own Google Cloud project.
  • Configure the OAuth consent setup, including test users when applicable, and create a Desktop OAuth client. Download its client JSON outside your repository.
  • Use a Google identity that already has access to the Search Console or GA4 property you need.
Terminal
npx --no-install gwg-seo auth login \
  --client /absolute/path/to/desktop-client.json
npx --no-install gwg-seo auth status
npx --no-install gwg-seo reports run google.sites

Login uses the browser, PKCE, state validation, and a temporary loopback callback. auth status reports locally present credentials; it does not verify property access. Google’s installed-app OAuth guide describes the credential type.

Request GA4 organic landing pages

Terminal
npx --no-install gwg-seo reports run google.analytics \
  --property 123456789 \
  --start-date 2026-09-01 --end-date 2026-09-30 --max-rows 1000

Use your numeric GA4 property ID. The report reads organic-search landing pages, sessions, engaged sessions, and key events. Check returned coverage and metadata for limitations such as thresholding. Search Console clicks and GA4 sessions measure different events and will not necessarily match. See the GA4 Data API reference.

Prioritize a bounded set of search rows

Terminal
npx --no-install gwg-seo reports run search.opportunities \
  --params '{"site":"sc-domain:example.com","startDate":"2026-09-01","endDate":"2026-09-30","minImpressions":100}'

This prioritizes rows with average positions 4 through 20 and a minimum impression threshold. It inherits the Search Console report’s coverage limits. The result is a review queue, not a traffic forecast.

Unattended credentials and logout

For a service account, provide its credential file using GOOGLE_APPLICATION_CREDENTIALS and grant that identity access to the relevant properties. A temporary GWG_GOOGLE_ACCESS_TOKEN is also supported. Keep credentials out of source control and client-side code.

Credential precedence is an explicit library token, environment token, saved OAuth, then a service-account file. There is no metadata-server credential discovery. auth logout removes local saved OAuth state; it does not revoke the Google grant or remove environment credentials. See privacy and local state.

BUILD WITH THE EVIDENCE

Want an audit to become part of your GTM system?

Work with Vikash