Repository navigation
Conversation
Record the viewport top scroll offset on [Amplitude] Page Viewed. It uses the same units as Min Page Y on Viewport Content Updated.
jxiwang
marked this pull request as ready for review
October 19, 2026 16:00
size-limit report 📦
|
…iewed Record window.innerWidth on [Amplitude] Page Viewed as [Amplitude] Viewport Width, sampled with Min Page Y.
Sample milliseconds from document navigation until the SDK first starts, and attach that value to Page Viewed and Viewport Content Updated. Later events in the same document reuse the sample.
Contributor
Collaborator
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit b5a6342. Configure here.
daniel-graham-amplitude
approved these changes
Oct 20, 2026
This branch has not been deployed
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.
Summary
Adds
[Amplitude] Min Page Yand[Amplitude] Viewport Widthto[Amplitude] Page Viewed.[Amplitude] Min Page Ymatches the property on[Amplitude] Viewport Content Updated. The value is the floored vertical scroll offset (window.scrollY, orpageYOffsetwhenscrollYis missing) at the moment the page view event is created. It is the top of the viewport, not the offset plus viewport height. A non-zero value means the page view started below the top of the page (late script injection, consent gating, or scroll restoration).[Amplitude] Viewport Widthiswindow.innerWidthat that same moment, the same property already sent on click and viewport content updated events.Both values are read before campaign parsing so a scroll or resize during that wait does not change the event.
Adds
[Amplitude] SDK Initialization Offsetto[Amplitude] Page Viewedand[Amplitude] Viewport Content Updated. Linear: ZON-119.The value is milliseconds from the current document's navigation time origin (
performance.now()) until the SDK first initializes for that project. It is sampled when the page view plugin or autocapture plugin is installed, whichever runs first. Later page views in the same document, including single-page navigations, and every viewport content updated event reuse that sample. It stays0when the performance clock is missing, not finite, negative, or throws. A deferredinittherefore reports how long after navigation the SDK actually started, not how long the init function itself ran.Checklist
Note
Medium Risk
Adds new default properties on high-volume automatic events (page views and viewport updates), which can affect dashboards and pipelines that assume a fixed schema, though behavior is additive and non-breaking.
Reviewed by Cursor Bugbot for commit b5a6342. Bugbot is set up for automated code reviews on this repo. Configure here.