Skip to content

Prepare Learn first-touch capture and App handoffs - #3079

Draft
ktsaou wants to merge 1 commit into
masterfrom
fix/source-attribution-integration
Draft

Prepare Learn first-touch capture and App handoffs#3079
ktsaou wants to merge 1 commit into
masterfrom
fix/source-attribution-integration

Conversation

@ktsaou

@ktsaou ktsaou commented Sep 7, 2026

Copy link
Copy Markdown
Member

Purpose and prerequisite

Prepare first-touch capture on Learn and bounded App handoffs using the existing versioned cookie.

Blocked by https://github.com/netdata/cloud-frontend/pull/5743 being merged and released. Keep draft. The reader contract is pinned to 3461255246041ad8c309e749973faaa53c716b55. Verify the deployed App reader and Website compatibility change https://github.com/netdata/website/pull/1383 before readiness; re-audit maintainer changes and merged baselines. No other capture-producer PR is a prerequisite.

Included

  • Source-bound implementation plan in FIRST-TOUCH-ATTRIBUTION.md.
  • Actual Root initial-load/SPA/cookie-preservation characterization.
  • Actual navbar and installed PostHog plugin checks: internal click labels are not first-touch handoffs; the asynchronous SDK stub has no synchronous identity reader; plugin serialization drops a configured callback function.

No production capture or handoff code is implemented yet. These tests characterize the gaps and protect existing behavior, not certify a repaired Learn producer.

Remaining implementation and readiness gates

  • Verify prerequisite merge/deployment and qualify merged reader behavior.
  • Resolve concurrent-cookie recovery, historical identity association and identity-only expiry within the existing single-cookie constraint.
  • Qualify SDK readiness, tracking controls and safe identity export without changing SDK identity/persistence or adding a backend dependency.
  • Implement initial-page/SPA capture preserving the oldest whole observation and Website-only root meanings.
  • Implement exact-origin App handoffs across navbar/content/dynamic links, retaining internal campaign labels without treating them as the original sender.
  • Qualify standalone API-page coverage, stale clients, callback capacity, unavailable storage/SDK and rollback.
  • Run source/rendered/browser/build/site gates with the other capture-producer PRs absent.

Compatibility and scope

No extra cookie or persistent browser store, identity merge, historical evidence rewrite, generated-content/redirect-policy edit, Accounts/Pulsar mechanism, proxy or live setting change. Pre-JavaScript redirects require their separately approved owner changes.

Validation

10 Root tests and four native plugin/navbar checks pass using synthetic/intercepted inputs. No App source is vendored and no other repository is required by these tests. Runtime source is unchanged; production build and producer acceptance are not claimed for this preparation draft.


Summary by cubic

Adds a research-only design and baseline tests preparing Learn first-touch capture and App handoffs. No production capture code is implemented; the tests protect existing behavior, which writes no nd_first_touch cookie and preserves Website cookies byte-identical across loads and SPA navigation.

Scope

  • FIRST-TOUCH-ATTRIBUTION.md documents the bounded implementation plan and the unresolved concurrency, identity-persistence, and SDK-readiness gates.
  • src/theme/Root/firstTouchBaseline.test.js renders the real Root component and asserts no cookie writes on direct entries, SPA transitions, or with an existing Website cookie.
  • tests/first_touch_producer_baseline.test.mjs verifies navbar App links carry only internal campaign labels and characterizes the installed posthog-docusaurus@2.0.5 SDK stub and dropped loaded callback.
  • Merge and deployment of netdata/cloud-frontend #5743 is required before capture can be enabled; the pinned reader contract is documented in FIRST-TOUCH-ATTRIBUTION.md.

Written for commit cd75c40. Summary will update on new commits.

Review in cubic

Document initial-page, SPA and App handoff integration and characterize actual Root, navbar and PostHog plugin behavior. Preserve production behavior while reader deployment, concurrency, identity and retention qualification remain open.

Validation: 10 Root tests and four native plugin and navbar checks pass.
@netlify

netlify Bot commented Sep 7, 2026

Copy link
Copy Markdown

Deploy Preview for netdata-docusaurus ready!

Name Link
🔨 Latest commit cd75c40
🔍 Latest deploy log https://app.netlify.com/projects/netdata-docusaurus/deploys/6a9f0e8827920d00086921d5
😎 Deploy Preview https://deploy-preview-3079--netdata-docusaurus.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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