- 
                Notifications
    
You must be signed in to change notification settings  - Fork 6
 
docs: use cases for the navigation event #41
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
base: main
Are you sure you want to change the base?
Conversation
| 
               | 
          ||
| TODO: Define how soft navigations are identified and represented in semantic conventions. This is not standardized yet. | ||
| 
               | 
          ||
| ### Capturing same-document navigations | 
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.
💬 suggestion: From my understanding, "soft navigations" are included in "same-document" navigations. It might be easier to understand if we had a structure like this:
- Capturing hard navigations
 - Capturing same-document navigations
- Soft navigations
 - Other URL changes
 
 
| This event can also capture same-document navigations for deeper session and user-journey analysis. Examples can include: | ||
| 
               | 
          ||
| * Hash changes (for example, links to sections within the same document) | ||
| * Query/search parameter changes when application state is encoded in the URL | 
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.
Given that a query string change can lead to no modification of the page content (maybe is just a way of keeping internal state), should that be defined as navigation?
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.
If I recall correctly that was the issue that made us differentiate page_view events from navigation ones.
Ref: #3
Wasn't navigation event scoped to only URL changes? (sorry for my bad memory)
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.
I also can't remember but I'm ok with it if that's what we agreed on
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.
Thank Martin! This looks great!
suggestion: a follow-on once things mature might be to add a sections to link out to relevant semantic conventions and implemented instrumentations.
That would allow us to document what the user wants to do (the use cases here), the data that drives it (semantic conventions) and the how consumers produce that data (the instrumentation).
| | Event | Description | Semantic Conventions Status | Instrumentation Status | | ||
| |----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| | `browser.navigation` | Captures a page page navigation event (both hard navigations and soft SPA navigations). | In review [PR1910](https://github.com/open-telemetry/semantic-conventions/pull/1910) | In review [PR2386](https://github.com/open-telemetry/opentelemetry-js-contrib/pull/2386) | | ||
| | [`browser.navigation`](navigation-event.md) | Captures a page page navigation event (both hard navigations and soft SPA navigations). | In review [PR1910](https://github.com/open-telemetry/semantic-conventions/pull/1910) | In review [PR2386](https://github.com/open-telemetry/opentelemetry-js-contrib/pull/2386) | | 
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.
| | [`browser.navigation`](navigation-event.md) | Captures a page page navigation event (both hard navigations and soft SPA navigations). | In review [PR1910](https://github.com/open-telemetry/semantic-conventions/pull/1910) | In review [PR2386](https://github.com/open-telemetry/opentelemetry-js-contrib/pull/2386) | | |
| | [`browser.navigation`](navigation-event.md) | Captures a page navigation event (both hard navigations and soft SPA navigations). | In review [PR1910](https://github.com/open-telemetry/semantic-conventions/pull/1910) | In review [PR2386](https://github.com/open-telemetry/opentelemetry-js-contrib/pull/2386) | | 
| 
               | 
          ||
| ### Reliable count of page loads (hard navigations) | ||
| 
               | 
          ||
| For full page loads, this event SHOULD be emitted as early as practical after the browser commits the new URL. Durations and detailed milestones for page load are captured separately by the Navigation Timing event (from the PerformanceNavigationTiming API). Navigation timing data is typically sent when timing fields are finalized (often after the `load` event), which means it may be missing if the user leaves early or if `load` never fires. The navigation event therefore provides a more reliable analytics signal, while navigation timing is used for performance analysis. | 
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.
| For full page loads, this event SHOULD be emitted as early as practical after the browser commits the new URL. Durations and detailed milestones for page load are captured separately by the Navigation Timing event (from the PerformanceNavigationTiming API). Navigation timing data is typically sent when timing fields are finalized (often after the `load` event), which means it may be missing if the user leaves early or if `load` never fires. The navigation event therefore provides a more reliable analytics signal, while navigation timing is used for performance analysis. | |
| For full page loads, this event SHOULD be emitted as early as practical after the browser commits the new URL. Durations and detailed milestones for page load are captured separately by the Navigation Timing event (from the PerformanceNavigationTiming API). Navigation timing data is typically sent when timing fields are finalized (often after the `load` event), which means the event might be lost if the user leaves the page early or if `load` event never fires. The navigation event therefore provides a more reliable analytics signal, while navigation timing is used for performance analysis. | 
This doc describes the data the
navigationevent captures and the use cases it is intended to be used for.