SCRUM-196: GA4 analytics config for fulfillr Traffic & funnel tab #11

Merged
bastian merged 4 commits from scrum-196/fulfillr-ga4-analytics into master 2026-09-14 17:59:21 -04:00
Owner

Renders an analytics block into the fulfillr dev and prod configs for the portal's new Traffic & funnel tab (go-fulfillr debyltech/go-fulfillr#43).

  • fulfillr_ga4_property_id: "353859448" in role defaults (non-secret, shared by dev and prod).
  • The service-account key comes from a new vault var fulfillr_ga4_credentials (the downloaded key JSON, as a YAML mapping or a JSON string).
  • Guarded: the block renders only when the vault var is defined, so merging/deploying before the key exists changes nothing (the portal just shows GA as not connected).

Validated by rendering both templates with no key, a mapping key and a string key: all six outputs are valid JSON and the private key's newlines survive.

After adding the vault var: make deploy TAGS=fulfillr-dev / fulfillr, then restart the container — ansible re-templates production.json but never restarts it.

🤖 Generated with Claude Code

Renders an `analytics` block into the fulfillr **dev** and **prod** configs for the portal's new Traffic & funnel tab (go-fulfillr debyltech/go-fulfillr#43). - `fulfillr_ga4_property_id: "353859448"` in role defaults (non-secret, shared by dev and prod). - The service-account key comes from a new vault var `fulfillr_ga4_credentials` (the downloaded key JSON, as a YAML mapping or a JSON string). - **Guarded:** the block renders only when the vault var is defined, so merging/deploying before the key exists changes nothing (the portal just shows GA as not connected). Validated by rendering both templates with no key, a mapping key and a string key: all six outputs are valid JSON and the private key's newlines survive. **After adding the vault var:** `make deploy TAGS=fulfillr-dev` / `fulfillr`, then **restart the container** — ansible re-templates `production.json` but never restarts it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bastian added 1 commit 2026-09-14 14:03:01 -04:00
Render an analytics block (property 353859448 + service-account key) into the
fulfillr dev and prod configs once fulfillr_ga4_credentials is in the vault.
Without the vault var the block is omitted and the portal reports GA as not
connected. Remember to restart the container after deploy.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
bastian added 1 commit 2026-09-14 16:21:11 -04:00
Match the vault variable name holding the service-account key file.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
bastian added 1 commit 2026-09-14 17:10:18 -04:00
bastian added 1 commit 2026-09-14 17:55:21 -04:00
bastian merged commit f0e2fae900 into master 2026-09-14 17:59:21 -04:00
bastian deleted branch scrum-196/fulfillr-ga4-analytics 2026-09-14 17:59:22 -04:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bastian/deploy_home#11