← back to Domain Landings
TK-10631: fix wrong hardcoded GA4 account (371997142 -> 15714274) that caused every prior create_property 403
eeff3776eb19b87969efa50d740514dc27cf48b4 · 2026-09-04 09:48:50 -0700 · Steve Abrams
Discovered via ~/Projects/ga-allsites/gate1_result.json (2026-08-21) recording that the reference sibling properties (commercialwallcovering.com, hollywoodwallcovering.com, designerwallcoverings.ai) all live under accounts/15714274 'DesignerWallcoverings.com', not accounts/371997142 'Steve Abrams APPS' that every script in this ticket had wrongly targeted. Confirmed live via list_data_streams cross-check. This likely explains all 4 prior automation failures, not a bad Editor grant.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E4T2ZoC42e62XV7YkkT1Qg
Files touched
M ops/tk10631/create_all_ga4.py
Diff
commit eeff3776eb19b87969efa50d740514dc27cf48b4
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Fri Sep 4 09:48:50 2026 -0700
TK-10631: fix wrong hardcoded GA4 account (371997142 -> 15714274) that caused every prior create_property 403
Discovered via ~/Projects/ga-allsites/gate1_result.json (2026-08-21) recording that the reference sibling properties (commercialwallcovering.com, hollywoodwallcovering.com, designerwallcoverings.ai) all live under accounts/15714274 'DesignerWallcoverings.com', not accounts/371997142 'Steve Abrams APPS' that every script in this ticket had wrongly targeted. Confirmed live via list_data_streams cross-check. This likely explains all 4 prior automation failures, not a bad Editor grant.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E4T2ZoC42e62XV7YkkT1Qg
---
ops/tk10631/create_all_ga4.py | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/ops/tk10631/create_all_ga4.py b/ops/tk10631/create_all_ga4.py
index 35698b0..f94def3 100644
--- a/ops/tk10631/create_all_ga4.py
+++ b/ops/tk10631/create_all_ga4.py
@@ -21,7 +21,13 @@ from google.analytics.admin import AnalyticsAdminServiceClient
from google.analytics.admin_v1alpha.types import Property, DataStream
KEY = "/Users/macstudio3/.config/ga-analytics-agent/service-account.json"
-APPS_ACCOUNT = "accounts/371997142" # Steve Abrams APPS
+APPS_ACCOUNT = "accounts/15714274" # DesignerWallcoverings.com — CORRECTED 2026-09-04:
+# every already-live sibling property (commercialwallcovering.com, hollywoodwallcovering.com,
+# designerwallcoverings.ai) actually lives HERE, not under accounts/371997142 "Steve Abrams
+# APPS" which every prior script/attempt in this ticket had wrongly hardcoded. gate1_result.json
+# in ~/Projects/ga-allsites (2026-08-21) already recorded that even a real browser login had no
+# access to 371997142, and had to fall back to this account — the SA's repeated 403s on
+# create_property were almost certainly this same wrong-account issue, not a bad Editor grant.
SCOPES = ["https://www.googleapis.com/auth/analytics.edit",
"https://www.googleapis.com/auth/analytics.readonly"]
DOMAINS_JSON = "data/domains.json"
@@ -35,14 +41,14 @@ targets = {d: v for d, v in cfg.items() if not v.get("ga4")}
print(f"{len(targets)} domains lack ga4 out of {len(cfg)} total")
# Build existing domain -> (property, measurement_id) map from EVERY
-# property already in the APPS account, keyed by data-stream default_uri
-# host (NOT display_name — display names are not guaranteed unique).
-print("Indexing existing properties/streams in APPS account...")
+# property the SA can see in ANY account (not just APPS_ACCOUNT) — corrected
+# 2026-09-04 after finding the reference properties live under a DIFFERENT
+# account than the one this script creates into. Keyed by data-stream
+# default_uri host (NOT display_name — display names are not guaranteed unique).
+print("Indexing existing properties/streams across ALL visible accounts...")
existing_by_domain = {}
n_props = 0
for s in client.list_account_summaries():
- if s.account != APPS_ACCOUNT:
- continue
for p in s.property_summaries:
n_props += 1
try:
← 6ccd60a TK-10631: create + wire the final 10 GA4 properties — fleet
·
back to Domain Landings
·
chore: v0.3.3 (session close — GA4 fleet buildout complete: 180c3e5 →