Skip to content

fix(martech): adding customer-golden click-tracking parity harness and improve block's parity - #872

Merged
ramboz merged 4 commits into
mainfrom
claude/golden-tracking-payloads-405475
Aug 27, 2026
Merged

fix(martech): adding customer-golden click-tracking parity harness and improve block's parity#872
ramboz merged 4 commits into
mainfrom
claude/golden-tracking-payloads-405475

Conversation

@ramboz

@ramboz ramboz commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

What this is

A second, customer-authoritative click-tracking golden (built from 161 real prod
erp.intuit.com beacons the customer shared) plus an un-gameable oracle to validate our
EDS rebuild reproduces it — and to drive the remaining parity work to ≥95% across the board.

This is harness/tooling (under scripts/diff/) plus one block wiring change
(blocks/feature-grid/feature-grid.js). Draft — opening to share progress.

Why

Our existing clicktrack-golden.json was reverse-engineered by us. The customer set is
ground truth, covers 13 net-new pages, and carries the full ~60-field envelope — so it can
validate the whole beacon (not just the 11 DOM-derivable fields) and cross-check our golden.

What's here

2nd golden + transformpayloads-to-golden.mjs turns the customer drop into a golden
(integrity-locked: the oracle re-hashes it and refuses a hand-edited golden).

Un-gameable oraclefixtures/field-policy.json (single source of truth: every field
is GATED value-match / frozen PRESENCE-only-with-reason / structural-exception; host +
index normalization) + oracle-lib.mjs (MIN-across-axes verdict — overall × event ×
component × field × coverage — so a weak component can't be averaged away).

Gatescustomer-oracle.mjs (fast offline loop gate) and stage-parity.mjs +
stage-sweep.mjs (live full-envelope gate).

Supportingcontract-audit.mjs (reconciled the backend contract; adds pseudonym_id,
link_href, link_href_domain), golden-crosscheck.mjs (91.4% agreement vs our
reverse-engineered golden), parameterized parity-gate/gen-sheet/coverage-matrix.

One behavior changefeature-grid CTAs now emit the feature trail (trackAs),
guarded by test/feature-grid-tracking.test.js (real decorate + delegated runtime).

Results

  • Offline oracle: 88.9% across-the-board over all 153 elements; the only axis <95% is
    product_banner — now identified as our highlight block (dark variant) on /events,
    currently un-wired for tracking (the one remaining fix).
  • Live (real Chrome on stage): full ~59-field envelope reproduced; every gated field
    matches prod (host-normalized stage→erp, env=prod, consent, site_section,
    accordion_item_N index-tolerant); only ui_action open-vs-close differs (capture artifact).

Privacy

Raw payloads + both goldens + sheet stay local (gitignored under fixtures/local/) — they
carry session/visitor ids and campaign codes. The committed surface is counts/field-names
only
(gitleaks-clean).

Notes for review

  • Tooling PR: no user-visible page change beyond feature-grid click-tracking. Feature
    preview base: https://claude-golden-tracking-payloads-405475--intuit-erp--aemsites.aem.page/
    (branch name may exceed the aem.page DNS-label cap; the change is validated via the scripts +
    npm test, not a visual page diff).
  • Pre-existing test failures are unchanged by this PR.

🤖 Generated with Claude Code

Second, customer-authoritative golden (from 161 real prod beacons) plus an
un-gameable oracle for validating our EDS rebuild against it:

- payloads-to-golden: transform the customer drop into a golden (integrity-locked)
- field-policy + oracle-lib: full-field taxonomy (GATED value-match / frozen
  PRESENCE-only / structural-exception), host + index normalization, MIN-across-
  axes verdict, golden hash lock
- customer-oracle: fast offline gate; stage-parity + stage-sweep: live gates
- contract-audit (adds pseudonym_id, link_href, link_href_domain), golden-crosscheck,
  coverage-matrix parameterized (--golden/--sheet/--out)
- wire feature-grid CTAs to the `feature` trail + real-render test

Customer payloads/goldens stay local (gitignored under fixtures/local/); the
committed surface is counts/field-names only. Pre-existing test failures unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@aem-code-sync

aem-code-sync Bot commented Aug 27, 2026

Copy link
Copy Markdown

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run all PSI checks
  • Re-run failed PSI checks
  • Re-sync branch
Commits

@aem-code-sync

aem-code-sync Bot commented Aug 27, 2026

Copy link
Copy Markdown
Page Scores Audits
📱 / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS
🖥️ / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS

The highlight callout is prod's banner. Its trail is variant-dependent — the `dark`
promo banner (e.g. /events "Register now"/"Schedule a demo") reports `rw_banner`; the
default/light callout (e.g. blog "Learn more") reports `product_banner`. Wire
blocks/highlight/highlight.js with a variant-aware trackAs + BLOCK.product_banner in
the gate, guarded by test/highlight-tracking.test.js (real decorate + delegated runtime,
both variants).

Closes the product_banner component gap (offline oracle 88.9% -> product_banner 100%,
all components now >=95%). Confirmed live: stage /events renders these CTAs in the
highlight (dark) block.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ramboz

ramboz commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator Author

Wired the last identified gap: prod's rw_banner banner = our highlight block. Confirmed live on stage /events (Register now / Schedule a demo render inside <div class="highlight dark block">).

The trail is variant-dependent — both goldens proved it:

  • highlight.dark (e.g. /events promo) → rw_banner
  • default/light highlight (e.g. blog "Learn more") → product_banner

Wired variant-aware trackAs + BLOCK.product_banner + a both-variants real-render test. product_banner 88.9% → 100%; all components now ≥95%.

Offline oracle is at 94.1%, now blocked only by the ui_access_point field aggregate — 4 cards carousel-arrow entries (synthetic-gate depth artifact; runtime is correct live) + 4 case-study-header social links (prod double-keys the share row). Both are pre-existing and live-authoritative, not introduced here.

@ramboz ramboz changed the title Customer-golden click-tracking parity harness test(martech): adding customer-golden click-tracking parity harness Aug 27, 2026
Keep CLICK-TRACKING-COVERAGE-customer.md and CLICK-TRACKING-ORACLE.md local/uncommitted.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two click-tracking trail gaps surfaced by the customer golden:

- cards: the prev/next arrows + dots live in .cards-controls (sibling of .cards-track),
  so they resolved to rw_cards_container instead of prod's rw_cards_container|carousel.
  Wire .cards-controls -> carousel.
- case-study-header: the share row emitted a flat social_media; prod nests it under the
  article hero. Make .case-study-copy the qrc_article_hero root and nest .case-study-share
  -> qrc_article_hero|social_media (eyebrow/byline stay flat; ToC stays TableOfContents).

Gate BLOCK trails + real-render tests (cards-tracking, case-study-header-tracking) updated
to match. Customer-golden offline oracle now PASSES (100%; only the live-only link_href/
link_href_domain remain, emitted by the injected tracker at click time).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ramboz ramboz changed the title test(martech): adding customer-golden click-tracking parity harness fix(martech): adding customer-golden click-tracking parity harness and improve block's parity Aug 27, 2026
@ramboz
ramboz marked this pull request as ready for review August 27, 2026 15:34
@ramboz
ramboz merged commit f98fee4 into main Aug 27, 2026
2 checks passed
@ramboz
ramboz deleted the claude/golden-tracking-payloads-405475 branch August 27, 2026 15:35
ramboz added a commit that referenced this pull request Aug 27, 2026
## What

Wire click-tracking on the **blog-template article share row** (`.blog-share`), a follow-up to
the merged parity harness (#872).

## Why

Live-verifying the case-study social fix on stage revealed that the customer golden's
`social` share entries (facebook/twitter/linkedin/youtube on regular blog articles, e.g.
`/blog/construction/automation-in-construction`) are rendered by **blog-template's
`.blog-share`**, *not* the `case-study-header` block — and `.blog-share` was **completely
un-wired** (fired no beacon). The offline oracle had modeled these as `case-study-header`
(a synthetic-gate false pass); the live check caught the real gap.

## Fix

`.blog-share` now carries a **self-contained** trail so it reports prod's
`qrc_article_hero|social_media` and survives the mobile↔desktop relocation of the widget:
`qrc_article_hero` on the row, `social_media` on a new `display:contents` `.blog-share-links`
span wrapping the links. **No visual change** (tracking attributes only). Guarded by
`test/blog-share-tracking.test.js`.

The earlier `case-study-header` fix remains correct for `/blog/case-study/*` pages.

Note: prod is inconsistent here (double-keys these links as standalone `social_media` on some
templates and `qrc_article_hero|social_media` on others) — we match the customer-authoritative
nested trail.

Test URL: https://claude-golden-tracking-payloads-405475--intuit-erp--aemsites.aem.page/events

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant