Wire Google Analytics into the fleet alongside GSC (unblock GA access) #309

Closed
opened 2026-07-01 18:06:24 +00:00 by igor · 2 comments
Collaborator

Goal

Wire Google Analytics into the fleet alongside GSC, so we have on-site behavior (sessions, engagement, conversions) next to search-side data (impressions, clicks, position). Together that gives a much better cross-fleet framing than GSC alone — and specifically a second signal for certifiedtradejobs, where GSC says "delisted" but GA reportedly tells a different story.

Context

GA was blocked by a service-user / OAuth-scope issue — the GSC OAuth app can't be reused because of restricted scopes. Per this thread it now appears resolvable: https://support.google.com/analytics/thread/427838065

Two parts

  1. (This ticket — Josh): unblock GA API access — a GA-scoped OAuth app or a service account with the Analytics Data API enabled and the properties granted. Land the creds in the host .env (mirroring the GSC_OAUTH_* shape).
  2. (Follow-on harness work, once access exists): a lib/ga.sh client analogous to lib/gsc.sh, folded into the CEO digest (ceo_read_gsc gets a GA sibling) and the SEO analysis. File that as a separate Agent ticket when the creds are in.

Assigned to Josh — the access/OAuth setup is the human-only unblock; the harness integration follows once it's wired.

## Goal Wire **Google Analytics** into the fleet alongside GSC, so we have on-site behavior (sessions, engagement, conversions) next to search-side data (impressions, clicks, position). Together that gives a much better cross-fleet framing than GSC alone — and specifically a second signal for certifiedtradejobs, where GSC says "delisted" but GA reportedly tells a different story. ## Context GA was blocked by a service-user / OAuth-scope issue — the GSC OAuth app can't be reused because of restricted scopes. Per this thread it now appears resolvable: https://support.google.com/analytics/thread/427838065 ## Two parts 1. **(This ticket — Josh):** unblock GA API access — a GA-scoped OAuth app or a service account with the Analytics Data API enabled and the properties granted. Land the creds in the host `.env` (mirroring the `GSC_OAUTH_*` shape). 2. **(Follow-on harness work, once access exists):** a `lib/ga.sh` client analogous to `lib/gsc.sh`, folded into the CEO digest (`ceo_read_gsc` gets a GA sibling) and the SEO analysis. File that as a separate Agent ticket when the creds are in. Assigned to Josh — the access/OAuth setup is the human-only unblock; the harness integration follows once it's wired.
Owner

GA access is officially unblocked. GSC also needs to move to using the the service account access rather than OAuth

GA access is officially unblocked. GSC also needs to move to using the the service account access rather than OAuth
Author
Collaborator

GA access (part 1) is complete and verified. The service account (GOOGLE_SERVICE_ACCOUNT, via lib/google-auth.sh) mints an analytics.readonly token and reads 7 GA properties through the Analytics Admin accountSummaries endpoint: certifiedtradejobs.com, vpsshowdown.com, sharktank.co, scenekids.com, thatgirljen.com, debtmom.com, holidayapi.com. GSC access is unchanged.

The machine half (part 2 — lib/ga.sh folded into the SEO report + CEO digest, with tests) is filed as a separate Agent ticket per this issue's own plan: #329.

Closing — the human unblock this issue tracked is done.

GA **access** (part 1) is complete and verified. The service account (`GOOGLE_SERVICE_ACCOUNT`, via `lib/google-auth.sh`) mints an `analytics.readonly` token and reads **7 GA properties** through the Analytics Admin `accountSummaries` endpoint: certifiedtradejobs.com, vpsshowdown.com, sharktank.co, scenekids.com, thatgirljen.com, debtmom.com, holidayapi.com. GSC access is unchanged. The **machine half** (part 2 — `lib/ga.sh` folded into the SEO report + CEO digest, with tests) is filed as a separate Agent ticket per this issue's own plan: #329. Closing — the human unblock this issue tracked is done.
igor closed this issue 2026-07-03 04:53:30 +00:00
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
joshtronic/igor#309
No description provided.