← back to Domain Landings
TK-10631: re-target GA4 create at accounts/15714274 per DTD 8/8 verdict
47e17738e3571a2794b5137c399af09706559e9f · 2026-09-03 20:10:36 -0700 · Steve Abrams
All 12 originally-wired landers AND all 84 backfilled ones live in
accounts/15714274; zero in APPS (96-0). The APPS targeting was the anomaly
and the source of every 403 since 2026-08-17. Adds --account flag, defaults
to 15714274. Dry-run verified: exactly 10 to create.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017NeANPg68rvqrsCZidci85
Files touched
M ops/tk10631/create_verified_ga4.py
Diff
commit 47e17738e3571a2794b5137c399af09706559e9f
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Thu Sep 3 20:10:36 2026 -0700
TK-10631: re-target GA4 create at accounts/15714274 per DTD 8/8 verdict
All 12 originally-wired landers AND all 84 backfilled ones live in
accounts/15714274; zero in APPS (96-0). The APPS targeting was the anomaly
and the source of every 403 since 2026-08-17. Adds --account flag, defaults
to 15714274. Dry-run verified: exactly 10 to create.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017NeANPg68rvqrsCZidci85
---
ops/tk10631/create_verified_ga4.py | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/ops/tk10631/create_verified_ga4.py b/ops/tk10631/create_verified_ga4.py
index 7fbe0e2..c3b24c3 100644
--- a/ops/tk10631/create_verified_ga4.py
+++ b/ops/tk10631/create_verified_ga4.py
@@ -10,7 +10,7 @@ Supersedes create_all_ga4.py, which had TWO defects found by live re-verificatio
"Trade Lines" DW page), 7 are 401/403/TLS-broken.
2. DEDUPE — it indexed existing data streams in the APPS account ONLY
- (`if s.account != APPS_ACCOUNT: continue`). 19 of the 20 already-tagged
+ (`if s.account != TARGET_ACCOUNT: continue`). 19 of the 20 already-tagged
domains have their property in accounts/15714274 (DesignerWallcoverings.com)
or accounts/136095445, so an APPS-only index would NOT have deduped them
and the run would have minted ~19 duplicate properties — including
@@ -36,7 +36,10 @@ 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 — where new props are created
+# DTD panel (8/8, 2026-09-03) ruled the create target is accounts/15714274, NOT APPS:
+# all 12 originally-wired landers AND all 84 backfilled ones live in 15714274, zero in
+# APPS (96-0). The APPS targeting was the anomaly and the source of every 403.
+TARGET_ACCOUNT = "accounts/15714274" # DesignerWallcoverings.com — home of this fleet
SCOPES = ["https://www.googleapis.com/auth/analytics.edit",
"https://www.googleapis.com/auth/analytics.readonly"]
DOMAINS_JSON = "data/domains.json"
@@ -44,10 +47,12 @@ DOMAINS_JSON = "data/domains.json"
ap = argparse.ArgumentParser()
ap.add_argument("--targets", required=True, help="newline-delimited verified target domains")
ap.add_argument("--out", default="/tmp/tk10631_verified_results.json")
+ap.add_argument("--account", default="accounts/15714274", help="GA account to create in")
g = ap.add_mutually_exclusive_group(required=True)
g.add_argument("--dry-run", action="store_true", help="index + plan only, no writes")
g.add_argument("--apply", action="store_true", help="perform the gated create")
args = ap.parse_args()
+TARGET_ACCOUNT = args.account
cfg = json.load(open(DOMAINS_JSON))
targets = [d.strip() for d in open(args.targets) if d.strip() and not d.startswith("#")]
@@ -88,7 +93,7 @@ if skip:
for d in skip:
e = existing_by_domain[d]
print(f" {d:34s} {e['measurement_id']:15s} {e['account']}")
-print(f"\nWOULD CREATE {len(todo)} propert{'y' if len(todo)==1 else 'ies'} in {APPS_ACCOUNT}")
+print(f"\nWOULD CREATE {len(todo)} propert{'y' if len(todo)==1 else 'ies'} in {TARGET_ACCOUNT}")
if args.dry_run:
json.dump({"targets": targets, "would_create": todo,
@@ -102,7 +107,7 @@ created = 0
for i, domain in enumerate(todo, 1):
name = cfg[domain].get("title") or domain
try:
- prop = Property(parent=APPS_ACCOUNT,
+ prop = Property(parent=TARGET_ACCOUNT,
display_name=f"{name} ({domain})"[:100],
time_zone="America/Los_Angeles", currency_code="USD",
industry_category="SHOPPING")
@@ -116,7 +121,7 @@ for i, domain in enumerate(todo, 1):
and domain in s2.web_stream_data.default_uri and mid.startswith("G-")
for s2 in client.list_data_streams(parent=pn))
print(f"[{i}/{len(todo)}] CREATED {domain:34s} {pn} mid={mid} readback_ok={ok}")
- results[domain] = {"account": APPS_ACCOUNT, "property": pn,
+ results[domain] = {"account": TARGET_ACCOUNT, "property": pn,
"measurement_id": mid, "created": True, "readback_ok": ok}
created += 1
except Exception as e:
← c4037fe TK-10631: backfill 84 existing GA4 measurement IDs into doma
·
back to Domain Landings
·
TK-10631: create + wire the final 10 GA4 properties — fleet 6ccd60a →