diff --git a/documentation/AGENTS.md b/documentation/AGENTS.md index f842da26..d6c21d8d 100644 --- a/documentation/AGENTS.md +++ b/documentation/AGENTS.md @@ -47,8 +47,11 @@ structure, cross-linking, and validation rules. ## Cross-linking - Link from guides to concepts when the reader needs deeper mechanics. -- Link only to source-of-truth files, package READMEs, implementation READMEs, or relevant source - files. +- Link only to source-of-truth documentation files, package READMEs, or implementation READMEs. +- Guides and concepts must not link to or mention source code files directly, including package + `src/**`, test files, implementation source files, scripts, config files, generated source + outputs, or source line numbers. When code-level detail is useful, link to package README, + implementation README, generated reference docs, or a concept/guide that explains the behavior. - After moving a document, fix all affected relative links. ## Validation diff --git a/documentation/concepts/README.md b/documentation/concepts/README.md index eb98658e..cf16782c 100644 --- a/documentation/concepts/README.md +++ b/documentation/concepts/README.md @@ -3,6 +3,7 @@ title: Concepts children: - ./core-state-management.md - ./entry-personalization-and-variant-resolution.md + - ./interaction-tracking-in-web-sdks.md - ./interaction-tracking-in-node-and-stateless-environments.md - ./profile-synchronization-between-client-and-server.md - ./react-native-sdk-interaction-tracking-mechanics.md @@ -23,6 +24,10 @@ they are not the first stop for installation or setup commands. - [Entry personalization and variant resolution](./entry-personalization-and-variant-resolution.md) - explains how the SDK resolves a Contentful baseline entry to the selected entry variant, including data model expectations, fallback behavior, resolution paths, and preview overrides. +- [Interaction tracking in Web SDKs](./interaction-tracking-in-web-sdks.md) - explains how + `@contentful/optimization-web` and `@contentful/optimization-react-web` detect browser entry + views, clicks, hovers, Custom Flag views, page events, and custom events, including consent, + profile, DOM, and delivery mechanics. - [Interaction tracking in Node and stateless environments](./interaction-tracking-in-node-and-stateless-environments.md) - explains what the Node SDK can track from a stateless server runtime, when browser observation is required, how the Web SDK can track server-generated HTML without owning personalization, and what diff --git a/documentation/concepts/interaction-tracking-in-node-and-stateless-environments.md b/documentation/concepts/interaction-tracking-in-node-and-stateless-environments.md index aebf5e64..f34f02f1 100644 --- a/documentation/concepts/interaction-tracking-in-node-and-stateless-environments.md +++ b/documentation/concepts/interaction-tracking-in-node-and-stateless-environments.md @@ -14,7 +14,9 @@ For step-by-step server setup, see [Integrating the Optimization Node SDK in a Node app](../guides/integrating-the-node-sdk-in-a-node-app.md). For browser setup, see [Integrating the Optimization Web SDK in a web app](../guides/integrating-the-web-sdk-in-a-web-app.md). -For profile handoff between server and browser, see +For Web SDK interaction tracking mechanics, see +[Interaction tracking in Web SDKs](./interaction-tracking-in-web-sdks.md). For profile handoff +between server and browser, see [Profile synchronization between client and server](./profile-synchronization-between-client-and-server.md).
@@ -248,10 +250,10 @@ entry ID. ### Initialize the Web SDK without client-side personalization -This browser code enables tracking but does not fetch entries or resolve variants: +This browser code enables tracking but does not fetch entries or resolve variants. It assumes the +Web SDK constructor is provided by your browser bundle or approved script delivery path: ```html -