🔥 feat(tracking): Adding duration+heartbeat to view tracking while staying in budget#159
Merged
Charles Hudson (phobetron) merged 1 commit intomainfrom Mar 2, 2026
Conversation
…aying in budget - Emit periodic component view updates (`viewDurationMs`) keyed by a stable `componentViewId` for each active visibility cycle. - Propagate new view fields across web/RN tracking, API schemas, event builders, and analytics typing (including split click vs view builder args). - Refactor entry interaction runtime to detector-based orchestration and replace `tracking.observe/unobserve` with `enableElement/disableElement/clearElement`. - Add per-element override controls via dataset flags (`data-ctfl-track-views`, `data-ctfl-track-clicks`) plus view interval override (`data-ctfl-view-duration-update-interval-ms`). - Simplify DOM existence observation and remove idle-chunking paths; replace `js-cookie` + `es-toolkit` usage with lightweight web cookie utilities to limit bundle impact. - Update implementation UIs/e2e/unit tests, specs, README, lint workflow/scripts, and bundle-size thresholds to match the new tracking behavior. - Overall quick update/re-sync of docs/specs/etc. [[NT-2597](https://contentful.atlassian.net/browse/NT-2597)]
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
viewDurationMs) keyed by a stablecomponentViewIdfor each active visibility cycle.tracking.observe/unobservewithenableElement/disableElement/clearElement.data-ctfl-track-views,data-ctfl-track-clicks) plus view interval override (data-ctfl-view-duration-update-interval-ms).js-cookie+es-toolkitusage with lightweight web cookie utilities to limit bundle impact.[NT-2597]