-
Notifications
You must be signed in to change notification settings - Fork 155
Add page data to web signals #1238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 2306bc2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1238 +/- ##
==========================================
+ Coverage 83.78% 83.82% +0.04%
==========================================
Files 220 221 +1
Lines 5857 5861 +4
Branches 1337 1337
==========================================
+ Hits 4907 4913 +6
+ Misses 950 948 -2
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR adds page data tracking to web signals by introducing a dedicated PageData interface and updating signal factories, tests, and related functionality to include page details in signal payloads.
- Introduces the PageData interface and getPageData helper.
- Updates factories to include page data in all signal types.
- Adjusts tests and redaction logic to account for the new page data field.
Reviewed Changes
| File | Description |
|---|---|
| packages/signals/signals-integration-tests/src/helpers/fixtures.ts | Adds a PageData fixture for testing. |
| packages/signals/signals/src/lib/page-data/index.ts | Implements getPageData to extract page information. |
| .changeset/pink-ladybugs-impress.md | Updates the changeset metadata for the release. |
| packages/signals/signals/src/types/tests/create-network-signal.test.ts | Updates tests for network signals to include page data. |
| packages/signals/signals/src/core/signal-generators/network-gen/tests/network-generator.test.ts | Updates tests to include page data in network signals. |
| packages/signals/signals/src/core/middleware/signals-ingest/tests/client.test.ts | Updates instrumentation and network signal tests to use signal factories and expect page data. |
| packages/signals/signals-runtime/src/web/web-signals-types.ts | Introduces and documents the PageData interface for web signals. |
| packages/signals/signals-runtime/src/test-helpers/mocks/mock-signal-types-web.ts | Updates mocks to include page data. |
| packages/signals/signals/src/core/analytics-service/tests/analytics-service.test.ts | Modifies tests to account for the new page data field. |
| packages/signals/signals/src/types/factories.ts | Updates all signal factory functions to include page data when creating signals. |
| packages/signals/signals/src/core/middleware/signals-ingest/redact.ts | Adjusts redaction logic to only redact sensitive data while preserving page data. |
| packages/signals/signals-integration-tests/src/tests/signals-vanilla/basic.test.ts | Updates tests to validate that page data is present in instrumentation and interaction signals. |
| packages/signals/signals-integration-tests/src/tests/signals-vanilla/network-signals-fetch.test.ts | Updates fetch tests to include page data using the commonSignalData fixture. |
| packages/signals/signals/src/core/middleware/signals-ingest/tests/redact.test.ts | Adjusts tests to use the updated signal factories. |
| packages/signals/signals-runtime/src/tests/signals-runtime.test.ts | Updates runtime tests to include and check page data. |
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
alanjcharles
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dope!
Add data.page property to all signals.