-
Notifications
You must be signed in to change notification settings - Fork 140
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
feat: Add pageview and prev pageview tracking #1634
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Size Change: +4.38 kB (+0.14%) Total Size: 3.23 MB
ℹ️ View Unchanged
|
d9d0d92
to
a2b4b14
Compare
57ae58c
to
504b239
Compare
@@ -17,40 +20,45 @@ interface PageViewEventProperties { | |||
} | |||
|
|||
export class PageViewManager { | |||
_currentPath?: string | |||
_prevPageviewTimestamp?: Date | |||
_currentPageview?: { timestamp: Date; pageViewId: string | undefined; pathname: string | undefined } |
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.
brain is not fully engaged so sorry if this is a silly question
this is entirely in memory, no? so if my app does full page loads on navigation (i.e. not a SPA) then I won't have a previous pageview id?
or am i misunderstanding?
otherwise the logic for tracking it looks valid to me
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.
This is true - I'll add a comment about why this is OK
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.
nice! thank you! 💖
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.
didn't run it but that looks safe and correct to me 🚀
To query events and group the query ClickHouse' events table:
|
Changes
This came from a discussion with @orian who wanted to be able to associate all of the query completed events that were triggered by the same pageview
Checklist