Skip to content

🔥 feat(tracking): Adding hover tracking; making other tracking adjustments#162

Merged
Charles Hudson (phobetron) merged 1 commit intomainfrom
NT-2595_hover-tracking
Mar 3, 2026
Merged

🔥 feat(tracking): Adding hover tracking; making other tracking adjustments#162
Charles Hudson (phobetron) merged 1 commit intomainfrom
NT-2595_hover-tracking

Conversation

@phobetron
Copy link
Copy Markdown
Collaborator

@phobetron Charles Hudson (phobetron) commented Mar 3, 2026

  • Added first-class automatic hover tracking for entries (hovers) alongside existing views and clicks, including runtime wiring in EntryInteractionRuntime and tracking API support (tracking-enable/disable/enableElement/--- for hovers)-
  • Introduced a new component_hover event model end-to-end: schema (ComponentHoverEvent), event union inclusion, event builder support (buildComponentHover), and analytics dispatch paths in both stateful and stateless cores-
  • Refactored web entry-tracking internals into a new entry-tracking/events/* structure, including shared observer lifecycle utilities and a reusable createTimedEntryDetector abstraction used by view/hover detectors-
  • Expanded view/hover observer behavior to support dwell + periodic duration updates + final event on exit, with stable per-session IDs (componentViewId / componentHoverId) and visibility/in-flight callback handling-
  • Added per-element dataset support for hover behavior, including data-ctfl-track-hovers and data-ctfl-hover-duration-update-interval-ms, plus override resolution updates-
  • Updated public configuration/docs so autoTrackEntryInteraction now includes hovers (default false), and updated tests to validate the new option-
  • Added substantial automated coverage: new unit tests for hover detector/observer, expanded view-runtime tests, and new cross-implementation Playwright E2E suites for hover/click behavior and consent gating-
  • Updated demo/reference implementations (React, vanilla, SSR, preview panel) to enable hover auto-tracking and improve event stream rendering by coalescing heartbeat-style hover/view updates by session ID-
  • Increased web bundle size thresholds in check-bundle-size-ts to account for the added tracking/runtime surface-
  • Included a separate ancillary change in core personalization: replaced es-toolkit/compat/get usage with an internal getAtPath resolver in MergeTagValueResolver-

[NT-2595]

…ments

- Added first-class **automatic hover tracking** for entries (`hovers`) alongside existing `views` and `clicks`, including runtime wiring in `EntryInteractionRuntime` and tracking API support (`tracking-enable/disable/enableElement/---` for hovers)-
- Introduced a new **`component_hover` event model** end-to-end: schema (`ComponentHoverEvent`), event union inclusion, event builder support (`buildComponentHover`), and analytics dispatch paths in both stateful and stateless cores-
- Refactored web entry-tracking internals into a new **`entry-tracking/events/*` structure**, including shared observer lifecycle utilities and a reusable `createTimedEntryDetector` abstraction used by view/hover detectors-
- Expanded view/hover observer behavior to support **dwell + periodic duration updates + final event on exit**, with stable per-session IDs (`componentViewId` / `componentHoverId`) and visibility/in-flight callback handling-
- Added per-element dataset support for hover behavior, including **`data-ctfl-track-hovers`** and **`data-ctfl-hover-duration-update-interval-ms`**, plus override resolution updates-
- Updated public configuration/docs so `autoTrackEntryInteraction` now includes **`hovers`** (default false), and updated tests to validate the new option-
- Added substantial automated coverage: new unit tests for hover detector/observer, expanded view-runtime tests, and new cross-implementation Playwright E2E suites for hover/click behavior and consent gating-
- Updated demo/reference implementations (React, vanilla, SSR, preview panel) to enable hover auto-tracking and improve event stream rendering by **coalescing heartbeat-style hover/view updates** by session ID-
- Increased web bundle size thresholds in `check-bundle-size-ts` to account for the added tracking/runtime surface-
- Included a separate ancillary change in core personalization: replaced `es-toolkit/compat/get` usage with an internal `getAtPath` resolver in `MergeTagValueResolver`-

[[NT-2595](https://contentful-atlassian-net/browse/NT-2595)]
@phobetron Charles Hudson (phobetron) merged commit 27dd86f into main Mar 3, 2026
30 checks passed
@phobetron Charles Hudson (phobetron) deleted the NT-2595_hover-tracking branch March 3, 2026 13:05
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