Analytics: see whether marketing works across our projects — plan
Analytics: see whether marketing works across our projects — plan
Built 17 Oct: weekly pull (GA4, Search Console, Twenty) and Wednesday summary are running; see data/analytics/README.md. Beads: marketing-861.28 and children (epic marketing-861); planning pointer pl-mk9g.
SCQ
Situation
- With AI, Rufus (and others) can launch new initiatives and products fast. There are many, and no single list: for example Reports That Matter, Way of Markdown, tryinbox, Screenshot It, DataPressr, DataHub, Flowershow and other Datopian-run projects, Way Into AI, Open Revolution.
- A few are promoted at a time (now Reports That Matter, then Way of Markdown) through a weekly routine run mostly by agents; Rufus has about an hour a week.
- Channels: Bluesky, X, Hacker News, Reddit, newsletters, and YouTube (a big source, could be used more systematically). There is an
activity-log.csvfor posts, but it is not reliably kept. - The aim is to bring the right people to strong work and keep them as subscribers (sign-ups via Twenty plus Resend).
- Analytics is spread across GA4, Umami and PostHog; some projects have none.
- This is also a dry run for tracking analytics and marketing at Life Itself, and a way to learn how AI can help with marketing analytics as it already does with code and content.
Complication
Effort goes out blind, so we neither learn nor focus. We cannot say which posts, channels or projects worked, so nothing gets adjusted ("focus on this, not that"), and things get done for a week and then dropped. Driven by:
- Results never come back into the routine: visits sit in GA4, Umami or PostHog, YouTube numbers in YouTube Studio, sign-ups in Twenty, and nobody joins them to what was posted.
- We often do not know what was posted: posts are not reliably logged, especially human-driven ones like Hacker News and Reddit that matter most for views, so results cannot be tied to actions even when the data exists.
- No list of what to track: the projects are not inventoried, so many (for example Open Revolution) are not tracked at all.
- No idea what to look for: checking Google Analytics by hand is slow, and there is no defined set of numbers that would change a decision.
- Setup cost looks too high: wiring up every site and tool seems to cost more than the answers are worth; this used to need expensive tools or fiddly setup.
Question
How do we cheaply get to know what is happening on our properties: which projects get attention and conversions, the trends, and where possible why (how marketing relates to results)?
Key metrics
Rule: measure only what is being promoted, or what is up for a keep/park decision. Weekly, not daily.
| Metric | Source | Decision it informs |
|---|---|---|
| Sign-ups per promoted page and per source (UTM) | Twenty (API not yet checked); a form-submit event in site analytics | Is promotion turning into an audience? (the main outcome) |
Results per logged post: visits and sign-ups for each activity-log.csv row, joined by UTM | Site analytics plus Twenty | What worked; feeds lessons.md |
| Visitors per promoted site and URL | GA4 (default for now); Umami on Way Into AI and tryinbox; PostHog on Flowershow | Is anyone arriving? |
| Top referrers per promoted site | Same | Which channel brought them |
| YouTube views and subscribers per video, and clicks to sites | YouTube Analytics (not yet checked) | Is YouTube worth doing more systematically? |
| Tracking health: tag present, data non-zero, sign-up form present | Site configs plus analytics | Can we trust the numbers? |
| Keep/park signal for dormant projects (visits, release downloads), monthly | Site analytics; GitHub releases | Keep, push or park (for example tryinbox) |
| Search clicks and impressions, monthly | Google Search Console | Is search worth effort? |
Park threshold to decide, for example zero sign-ups in 8 weeks. Not tracked for now: Bluesky followers, GitHub views, top pages beyond promoted URLs, newsletter opens (unreliable since Apple Mail Privacy Protection).
Plan (from the LTP, 16–17 Oct)
Full analysis (goal, current reality, conflict, future reality, prerequisite and transition trees): reports/ltp/analytics/analytics.report.md. Work is in beads marketing-861.28.1–.11 (T0–T9).
- Critical root cause: measurement is manual work per site, not a reusable agent routine applied at launch.
- Biggest blocker: access. Fix: one prepared ~20-minute sitting for Rufus with one read-only login per Google account (Life Itself main, Datopian, and the third: the one holding the GA4 account named "Atomatic", property "rufuspollock.com"), then an agent access test (appendix H).
- First value in week 1: a manual 28-day snapshot straight after the access test; automation (weekly pull to CSV, weekly summary) follows.
- Summary spec: conversions first, traffic second; asks for a push/keep/park call on any promoted or new property without one in 4 weeks; dormant properties monthly.
- Later: post logging, UTM, post stats, more sources. SEO is a separate epic (
marketing-861.29).
Analytics tool decision
Proposed (17 Oct): self-hosted Umami on Railway (~$10/mo) for new and untracked sites; GA4 stays where it is; Umami Cloud Pro as fallback. Options, criteria, comparison and sources: docs/ref/analytics-tools.md.
Appendices
A. Inventory: what exists and what tracks it today
From the planning portfolio and each workspace's config. "Tag" means a tracking snippet is actually in the site.
| Site / project | URL | Repo | Hosting | Analytics today |
|---|---|---|---|---|
| Way Into AI | wayintoai.com | ~/src/life-itself/wayintoai | Flowershow | Umami (id in config.json) |
| tryinbox (InboxApp) | tryinbox.app | ~/src/rufuspollock/inboxapp (site/index.html) | Cloudflare DNS (NS are cloudflare); static host not identified | Umami Cloud tag present (site/index.html:37). Nobody has looked at it |
| Way of Markdown | wayofmarkdown.com | ~/src/flowershow/wayofmarkdown | Flowershow | GA4 (G-HZH2GBB7K8); weekly report in campaigns/way-of-markdown-traffic-report.md |
| metacrisis.info | metacrisis.info | ~/src/life-itself/metacrisis.info | Flowershow | GA4 (G-SXQBS2E2W1) |
| Climate knowledgebase | climate.lifeitself.org | ~/src/life-itself/climate | Flowershow | GA4 (G-PV1VZND295) |
| Reason Commons | reasoncommons.com | ~/src/life-itself/reasoncommons | Flowershow | GA4 (G-VWH8D9GCYV) |
| rufuspollock.com | rufuspollock.com | ~/src/rufuspollock/rufuspollock.com | Flowershow | Dead: config.json has a Universal Analytics id (UA-35035650-1); UA stopped collecting in 2023. Effectively no analytics |
| Reports That Matter | reportsthatmatter.org | ~/src/reportsthatmatter/reportsthatmatter | Cloudflare Worker (wrangler.toml; account office@atomatic.net) | None found in code |
| DataPressr | datapressr.datahub.io | ~/src/datasets/datapressr | DataHub (host not checked) | None found |
| Flowershow | flowershow.app | ~/src/flowershow/flowershow | Own platform | Not checked; it is the product that offers GA4 and Umami to others |
| lifeitself.org, 2rcon.org, secondrenaissance.net, festival, news.lifeitself.org (Substack) | various | not in this repo set | various | Not checked. Not in scope until Rufus says they are his to measure |
| Smaller Flowershow-style sites: wilber.wiki, withouthotair.org, ux.rufuspollock.com, sutras, markdowndb.com, giftless.app, screenshotit.app, comparethe.co, archipelago.place | various | various | various | None found in the ones with local repos; others unchecked |
| Social | Bluesky (RTM account; personal not yet), X, LinkedIn | — | — | Native analytics only |
Life Itself CRM stack: signup endpoints into Twenty (life-itself.twenty.com), sending via Resend (~/src/life-itself/crm); Brevo legacy, possibly still the Way of Markdown list | — | — | CRM delivery records; Resend dashboard | |
| GitHub | inboxapp, wayofmarkdown, etc. | — | — | GitHub traffic API (14-day window) |
Two findings: (1) three of the four GA4 sites are Life Itself sites, so Life Itself probably already owns the GA4 property access; (2) rufuspollock.com has been unmeasured for about three years.
B. Sources: exactly how to get data out
Umami Cloud (existing on three sites; self-hosted Umami is now the recommended standard, see "Analytics tool decision") — verified
- Auth: API key. Create in Umami Cloud: profile, Settings, API keys, Create key. Shown once.
- Base URL:
https://api.umami.is/v1. SendAuthorization: Bearer <api-key>. (Region can be added as first path segment,/v1/usor/v1/eu; defaults to the account's region.) - Rate limit: 50 calls per 15 seconds per key. Plenty: a daily pull is about 3 calls per site.
- Endpoints (relative to base):
GET /websites(lists all sites with ids, so no hand-kept id list),GET /websites/{id}/stats(pageviews, visitors, visits, bounces, time, with comparison),GET /websites/{id}/pageviews(time series),GET /websites/{id}/metrics?type=path|referrer|country|...(ranked lists). Time range parameters arestartAtandendAtin milliseconds (from my knowledge of the Umami API; the reference pages I fetched did not render the parameter tables, so check on first call). - Cost: unverified — check the Umami Cloud plan limits (events per month, number of sites, API access on the free plan) before moving everything onto it. Self-hosting is the fallback; the same API works with a login token instead of an API key.
- Gap: Umami only has data from when its tag went on. No backfill from GA4.
Google Analytics 4 (cheap default, free) — partly verified
- Auth: Google Analytics Data API v1 with a service account; add the service account's email as a Viewer on each GA4 property. Rufus or Life Itself must have admin on the property. Which Google account owns the four properties is unknown.
- Quotas, verified (standard property): 200,000 tokens per property per day, 40,000 per hour, 10 concurrent requests. A daily pull is far inside this.
- Recommendation: GA4 as the default for now: free, existing history on four sites, and a documented API. Fix rufuspollock.com (dead UA id) and add a GA4 id to RTM and DataPressr. Do not rebuild the weekly Way of Markdown report; later it can read from the cache.
- Costs of GA4: more setup than a simple tool (service account per property), cookie-consent considerations in some regions, and a heavier UI. Accepted for now because it is free; revisit if it becomes a burden.
Cloudflare Web Analytics (cookieless, no JS needed on proxied sites) — partly verified
- Enabling: for sites proxied through Cloudflare, Web Analytics is enabled by default via auto-install; otherwise add a beacon snippet or enable it in a Pages project's Metrics tab (verified). A
Cache-Control: public, no-transformheader blocks the auto-injection (verified). - Reading it: the GraphQL endpoint is
https://api.cloudflare.com/client/v4/graphql(verified), with the Web Analytics datasetrumPageloadEventsAdaptiveGroupsfiltered by account tag and site tag (from third-party examples and Cloudflare's own dashboard queries; not in an official sample I could fetch). The token needs Account Analytics: Read (verified from Cloudflare's token docs). Retention and per-query limits are unverified. - Where it helps: Reports That Matter (Cloudflare Worker, no tag today) and tryinbox (Cloudflare DNS), as a zero-install fallback. It does not replace the main analytics tool: the data lives in a different system, with different visitor definitions.
- Existing Cloudflare tokens in
~/.config/cloudflare/are for DNS and CRM operations; I did not read or test them. A new read-only analytics token is better than widening those.
Google Search Console — verified
- Endpoint:
POST https://www.googleapis.com/webmasters/v3/sites/{siteUrl}/searchAnalytics/querywithstartDate,endDateand optionaldimensions(query, page, country, device, date) androwLimitup to 25,000. - Scope:
https://www.googleapis.com/auth/webmasters.readonly. A service account works if its email is added as a user on each property in Search Console. - Notes:
siteUrlis either the URL prefix orsc-domain:example.com. Results are top rows only, not a guarantee of all rows. Data lags a couple of days. Quota is not stated on the page (unverified); a daily pull is tiny. - Why include it: it is the only source for search impressions and queries, which Umami and GA4 cannot give. It is the real answer to "is anyone finding this".
Bing Webmaster Tools — verified for auth only
- API key per user (Settings, API Access, Generate API Key), one key covers all verified sites; OAuth 2.0 is the recommended alternative. Each site must be added and verified (Bing can import from Search Console).
- Methods and limits not checked. Low priority: Bing is a small share of search for these sites. Add after Search Console works.
Plausible — not recommended
- Stats API v2 is
POST https://plausible.io/api/v2/query, Bearer token, 600 requests per hour per key (verified), but it is a Business-plan feature (verified) and Plausible is paid. Keep it on the list for the tool decision only if a paid tool is acceptable.
GitHub traffic — verified
GET /repos/{owner}/{repo}/traffic/viewsand/clones,/traffic/popular/referrers,/traffic/popular/paths. Needs write access to the repo; covers only the last 14 days, so it must be pulled at least every two weeks or the history is lost. Release download counts come fromGET /repos/{owner}/{repo}/releases(assetdownload_count, no special access).- Auth: the existing
ghlogin on Rufus's Mac is enough; no new credential.
Bluesky — partly verified
- Public data (follower and post counts, per-post likes/reposts) is readable without logging in from the public AppView,
https://public.api.bsky.app/xrpc/app.bsky.actor.getProfile?actor=<handle>. The endpoint responds without auth (I confirmed it answers, though my guessed handle did not exist, so I have not seen the field list). RTM already has a posting credential; no new one needed for reading. - Bluesky has no impressions data. Link clicks can only be measured by UTM tags landing in the site analytics (as the Way of Markdown report found: "tag links").
YouTube — big source, not yet checked
- Rufus (16 Oct): YouTube is a big source and could be used more systematically. The YouTube Analytics API exists (OAuth on the channel owner's Google account); not verified this session. Research it in the implementation step: views and subscribers per video, and traffic from video descriptions to sites (via UTM links).
X / LinkedIn — manual
- X's API is paid and the posting question is its own bead (
861.2). LinkedIn has an analytics UI and no cheap read API for personal accounts. Recommendation: type a monthly number by hand intodata/analytics/manual.csv, or skip. Do not spend setup time here yet.
Email sign-ups and sends: Twenty CRM plus Resend — not yet verified
- Rufus (16 Oct): mostly not Brevo now; the stack is Twenty (CRM at
life-itself.twenty.com) and Resend (sending), documented in~/src/life-itself/crm(signup endpoints, course and newsletter mailer service, delivery records). I did not verify the Twenty or Resend APIs. Next step: read that repo's guides (ref/delivery-operations.md,guides/newsletter-signup.md) and the Twenty and Resend API docs, and find the simplest count query (new contacts per list per day). Possibly the CRM repo already has scripts that export this. - Brevo: still used for the Way of Markdown shared list (bead 861.11) per the existing beads, so confirm whether that list is live before dropping it. Brevo campaign stats (
GET https://api.brevo.com/v3/emailCampaigns?statistics=globalStats,api-keyheader, last 6 months only) were verified if needed. - Substack (
over-the-mountains,news.lifeitself.org) has no public stats API; use its dashboard by hand.
C. Architecture detail
One main tool, not many. Pulling from many tools is what makes this feel hard, so reduce the number of tools that hold page-view data:
- GA4 as the default page-traffic source for now (free, four sites already, the API is fine). Also read the two existing Umami sites (Way Into AI, tryinbox) with their key, since the data is already being collected. If Rufus later picks one cheap tool, only the pull function changes.
- Search Console for search (one extra credential; the only one that cannot be replaced).
- Small adds: GitHub traffic (no new credential), Bluesky public profile, CRM sign-up counts from Twenty and send stats from Resend (access to be checked with the CRM repo's operators).
- Cloudflare Web Analytics only as a stopgap for RTM (no tag today) until it has the chosen tag, and only if the token step is cheap.
Cache. Plain files under data/analytics/ in this repo (private repo, small, diffable):
daily.csv: one row perdate, site, source, metric, value(long format so new sources and metrics need no schema change). Sources:ga4,umami,gsc,github,bluesky,twenty,resend.top-referrers.csvandtop-pages.csv: weekly snapshots per site (week, site, key, visitors).raw/YYYY-MM-DD/<source>-<site>.json: raw responses, git-ignored, kept for debugging only.
SQLite is nicer to query but opaque in git and not agent-friendly to review; CSV can be read by Rufus, any agent and the dashboard with no tooling. Revisit if rows pass about 100,000.
Refresh job. One script, scripts/analytics_pull.py (stdlib only, like registry.py), one function per source, run weekly by launchd or cron on Rufus's Mac, appending only new days (idempotent by date, site, source, metric). Each source reads its credential from a path listed in CREDENTIALS.md; a missing credential skips that source with a printed warning rather than failing the run. GitHub traffic must run at least every 14 days. A scheduled GitHub Action is an option once pl-zecn settles where secrets live; until then the Mac is simplest.
Dashboard (later, not in the first slice). When wanted: one generated static page, data/analytics/dashboard.html (or published through Flowershow if Rufus wants it viewable from a phone): a table of sites with last 7 and 28 days visitors, change on prior period, top referrer, plus search clicks. The whole point is to answer "does anyone visit X". Use the dataviz skill when building. No framework. An Artifact version is possible but the data would need pushing to it on each refresh; a static file avoids that.
Beads proposed (not created; Rufus to approve): (a) Rufus: decide the analytics tool and create a Google service account (the credential steps); (b) script: GA4 source plus CSV cache, basic data only (first useful slice, about half a day); (c) add GSC; (d) add Umami (two sites), GitHub, Bluesky; (e) add GA4 to RTM and DataPressr and replace the dead UA id on rufuspollock.com; (f) CRM sign-ups from Twenty/Resend; (g) scheduler; (h) dashboard, only if the CSV is not enough.
D. Does anyone visit tryinbox?
Cannot tell yet; the data probably exists. What I could find:
tryinbox.appserves 200, DNS is on Cloudflare, andsite/index.html:37carries an Umami Cloud tracking tag (website id17e64e6a-965a-497a-846b-d569e3e77455). So visits since the tag was added are almost certainly recorded in Umami Cloud, but I have no API key and have not seen a number.- GitHub traffic for
rufuspollock/inboxapp, last 14 days: 1 view, 1 unique, from github.com (likely Rufus himself). Releases: v0.2.0 has 1 download, v0.1.0 none. That suggests very few people are installing it. - Fastest way to the real answer (2 minutes, Rufus): log in to cloud.umami.is and open that website. (Even if Umami is not the standard, the tag is already collecting.) If the website is not in his account, the tag points at a site he cannot see, which is itself worth knowing.
- Not known: when the tag was added, whether the page was ever shared anywhere, or whether the site is on the same Umami account as Way Into AI.
E. Decisions and credentials
Decisions for Rufus
- Analytics tool: recommended 17 Oct: self-hosted Umami on Railway (~$10/mo) for new and untracked sites, GA4 left where it is (see "Analytics tool decision"); awaiting Rufus's OK. Does Life Itself's GA4 property access cover the Life Itself sites?
- Scope: which sites count? Suggest those in the inventory table with a local repo, plus lifeitself.org if wanted. Life Itself sites may need that team's access grant.
- Sign-ups: read counts from Twenty (and Resend for sends)? Ask the CRM repo operators what is available and whether signup source is recorded.
- Dashboard: deferred; revisit once the data exists.
- Scheduler: Rufus's Mac (works today) or wait for
pl-zecn? - Social: skip X, LinkedIn and YouTube for now, or enter monthly numbers by hand?
Credentials needed (paths for CREDENTIALS.md; values never in files or chat)
| Credential | Who creates | Where it would live | Needed for |
|---|---|---|---|
| Umami Cloud API key (optional) | Rufus, in Umami Cloud settings | ~/.config/umami/api-key | the two Umami sites only |
| Google service account JSON, added as Viewer to each GA4 property and as user to each Search Console property | Rufus (or Life Itself admin for LI properties) | ~/.config/google-cloud/ (an existing credentials.json is there; type unknown, so better a new analytics-only account) | GSC, GA4 |
| Cloudflare token with Account Analytics: Read only | Rufus, in the Cloudflare account that owns RTM | ~/.config/cloudflare/analytics-read | RTM, tryinbox stopgap (optional) |
| Twenty API key and Resend API key | check ~/src/life-itself/crm guides for existing access | tbd (see CREDENTIALS.md) | sign-up counts, send stats |
| Bing API key | Rufus (optional) | ~/.config/bing/api-key | later |
| GitHub | existing gh login | — | repo traffic |
| Bluesky | none for public reads | — | follower counts |
All files mode 600, per the current CREDENTIALS.md convention, until pl-zecn decides on dotenvx or similar.
F. Implementation research to do before building: existing free and open-source tools
Before writing analytics_pull.py, check whether something free already does the pulling. Candidates to evaluate (names from my knowledge, none checked this session; the research step is to verify each is current, free, and covers GA4 plus Search Console with little setup):
- Data-loading libraries with ready GA4 and Search Console sources:
dlt(Python, "verified sources" for Google Analytics and Search Console, writes to DuckDB, CSV or others), Meltano / Singer taps (tap-google-analytics,tap-google-search-console), Airbyte (heavy to self-host, probably too much). - Query-in-place tools: Steampipe (SQL over APIs; plugins exist for GitHub and Cloudflare, check for Google Analytics and Search Console).
- Free hosted dashboards over Google data: Looker Studio connects to GA4 and Search Console natively at no cost; it does not give agents the data, but it may cover "a view" for free if a dashboard is ever wanted.
- Ready-made GA4 / Search Console exports: the GA4 BigQuery export (free tier, but adds BigQuery), Search Console's bulk export to BigQuery, and small CLIs or MCP servers for GA4 and Search Console that an agent could call directly (an MCP server might replace the cache for ad hoc questions).
- Analytics tools themselves, for decision 1: cheap or free hosted and self-hosted options (GoatCounter, Plausible, Umami, PostHog free tier, Cloudflare Web Analytics, Matomo) compared on cost, API, Flowershow support and cookie-consent burden.
Findings (17 Oct, bead marketing-861.28.2; checked against current docs, 30-minute timebox).
| Tool | Covers | Cost | Setup effort | Verdict |
|---|---|---|---|---|
googleanalytics/google-analytics-mcp (PyPI analytics-mcp, run via pipx run) | GA4 only. Tools: get_account_summaries, get_property_details, list_google_ads_links, run_report, run_funnel_report, get_custom_dimensions_and_metrics, run_realtime_report. Apache-2.0, labelled experimental | Free | ADC with analytics.readonly (same login as appendix H); enable Admin and Data APIs. One ADC credential per server instance, so one Google account per instance (register one MCP entry per account, each with its own GOOGLE_APPLICATION_CREDENTIALS). Docs do not describe pinning to a property; get_account_summaries lists all the user can see | Good for ad hoc agent questions. Not for the weekly pull: it is a conversational tool, not a scheduled job, and it will not write the CSV cache. Adopt as a side tool, not the pipeline |
dlt verified source google_analytics | GA4 (resources google_analytics, metrics_table, dimensions_table) | Free, open source | OAuth or service account, at least Viewer; dlt init google_analytics duckdb. Adds a dependency and its config conventions | Works, but more machinery than needed for a few fixed queries; per-account credentials still needed |
dlt for Search Console | No verified source (not on the verified list). dltHub only has a build-it-yourself guide | Free | Custom source needed | No gain over a script |
Search Console MCP servers (saurabhsharma2u/search-console-mcp also covers Bing and GA4; pijusz/mcp-gsc; ahonn/mcp-server-gsc; GrowthLever gsc-mcp) | Search Console queries, pages, sitemaps, indexing; up to 25,000 rows | Free (hosted variants are paid; ignore) | Node or Python plus the same Google OAuth client; third-party code touching read-only Google data. Listings only, repos not inspected | Optional for ad hoc questions. Third-party, unvetted; the Search Console API call is one POST, so a script is safer. No official Google MCP exists for it |
| Twenty API | Bearer API key (Settings, Developers, API); REST and GraphQL; fields selection; 60 records per batch; 100 requests per minute. Docs fetched did not cover filtering, counts or lists | Free | One key, role-scoped (create a read-only role). Per-list new-contact counts: not verified. Plan to filter people by createdAt and page through, counting client-side; check the in-app playground (Settings, Developers, API) for filter syntax, whether a total count is returned, and how list or segment membership is exposed | Usable. Count client-side if no count field; first confirm the list/segment relation in the playground (this is T3, bead marketing-861.28.4) |
| Meltano / Singer taps, Airbyte, Steampipe | Not re-checked | Heavier than dlt | Skip |
Decision: write the small stdlib script (analytics_pull.py: GA4 Data API runReport, Search Console searchAnalytics.query, Twenty REST, all plain HTTPS with the ADC access token and the Twenty key, writing CSV to data/analytics/). No existing tool covers GA4, Search Console and Twenty together, and the free ones either lack Search Console (dlt) or are conversational (MCP). Keep the GA4 MCP server registered as an optional add-on for ad hoc questions once ADC is set up. Revisit dlt only if the number of sources grows.
Not verified: multi-account switching inside one MCP instance; Twenty filter and count syntax; refresh-token expiry for the reused OAuth client (see appendix H caveat).
H. Access: the low-hassle, low-trust path (the main blocker)
Rufus (16 Oct): access is the real blocker. If it means half an hour of guessing, it gets delayed. Aim: a few minutes of Rufus's time, read-only, revocable, no key files where possible.
Google (GA4 and Search Console): one browser login, read-only.
- Google's own GA4 tooling (the
googleanalytics/google-analytics-mcpserver, labelled experimental) authenticates with Application Default Credentials:gcloud auth application-default login --scopes https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/cloud-platform --client-id-file=<oauth-client.json>(verified from its README). The user must already have access to the properties; the Analytics Admin API and Data API must be enabled on a Google Cloud project. - Adding
https://www.googleapis.com/auth/webmasters.readonlyto the same login covers Search Console (scope verified earlier). - What already exists on Rufus's Mac: a gcloud config (account
rufus.pollock@datopian.com, projectgws-rufus) and an OAuth desktop client at~/.config/gws/client_secret.json, which could be reused as the client file. The gcloud CLI itself is not installed now. - Split of work: the agent installs gcloud and enables the APIs; Rufus does one browser consent (about 2 minutes). The result is read-only access to every GA4 property and Search Console site his Google account can see, with no service account added to each property. Revoke any time from the Google account's third-party access page.
- Caveats (unverified, check on first run): if the OAuth client's consent screen is in "Testing" mode, refresh tokens may expire after 7 days, which would mean a weekly re-login (fix: publish the client as internal, or use service-account impersonation instead). Properties owned by a different Google account (for example a Life Itself account) need that account to grant Rufus Viewer, or a second login.
- Third account (rufuspollock.com): Rufus (17 Oct): the rufuspollock.com property is in a GA4 account named "Atomatic" (property "rufuspollock.com"), and the site will be wired to it. That is a third
gcloud auth application-default login(separate ADC file per account, e.g.GOOGLE_APPLICATION_CREDENTIALS=~/.config/gcloud/adc-rufuspollock.json), or grant that account's email Viewer on the others. Confirmed by Rufus: the "Atomatic" account sits under his rufuspollock.com Google login, separate from Life Itself and Datopian, so a third ADC login is needed. The property's measurement id isG-G0W9DD4PQE(Rufus, 17 Oct); it replaces the deadUA-35035650-1in the rufuspollock.comconfig.json(not yet changed). - Also usable directly: that MCP server lets an agent answer ad hoc GA4 questions without any cache.
Other sources (one key each, read-only where offered): Umami (API key in Settings, about 1 minute), PostHog (personal API key; check for read-only scopes), Twenty (API key; check the CRM repo for an existing one), GitHub (existing gh login), YouTube (same Google login with the YouTube Analytics read-only scope; not verified).
Store: all under ~/.config/<service>/, mode 600, listed in CREDENTIALS.md, until pl-zecn settles a proper store.
G. Beads
861.6 (P2, "pick tools and get agent-readable metrics") asked for a tool evaluation and recommended setup; 861.28 (P1) asks the same plus the cache and dashboard. They are one piece of work. Done 16 Oct with Rufus's OK: 861.6 closed as superseded; 861.28 is the build bead (data first, dashboard later), with the child beads listed in appendix C. 861.8.2 (weekly traffic report skill) depended on .6; re-point it at .28. ROADMAP E1 ("Which analytics, readable by agents?") should point at this plan; the tool choice is still open (GA4 default for now).