Skip to content
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 pathname to prev page events #776

Merged
merged 3 commits into from
Aug 22, 2023

Conversation

robbie-c
Copy link
Member

@robbie-c robbie-c commented Aug 18, 2023

Changes

Follow up from #773, looks like I did need this

Checklist

@robbie-c robbie-c changed the title Add pathname to prev page events feat: Add pathname to prev page events Aug 18, 2023
@PostHog PostHog deleted a comment from posthog-bot Aug 18, 2023
@github-actions
Copy link

github-actions bot commented Aug 18, 2023

Size Change: +629 B (0%)

Total Size: 676 kB

Filename Size Change
dist/array.full.js 175 kB +158 B (0%)
dist/array.js 116 kB +157 B (0%)
dist/es.js 116 kB +157 B (0%)
dist/module.js 116 kB +157 B (0%)
ℹ️ View Unchanged
Filename Size
dist/recorder-v2.js 93.6 kB
dist/recorder.js 58.3 kB

compressed-size-action

@robbie-c robbie-c marked this pull request as ready for review August 18, 2023 12:54
Copy link
Collaborator

@benjackwhite benjackwhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with a couple of optional comments

src/page-view.ts Outdated Show resolved Hide resolved
src/page-view.ts Outdated
export class PageViewManager {
_pageViewData: PageViewData | undefined
_hasSeenPageView = false

_createPageViewData(): PageViewData {
return {}
return {
pathname: utils.window.location.pathname,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume we need this to query on? Do we perhaps want to just have a full url which allows any kind of grouping filtering later on?

@robbie-c
Copy link
Member Author

robbie-c commented Aug 21, 2023

Merging as tests passed on #780 ah nope I don't have rights to do that

@@ -24,15 +25,21 @@ interface ScrollProperties {
$prev_pageview_max_content_percentage?: number
}

interface PageViewEventProperties extends ScrollProperties {
$prev_pageview_pathname?: string
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to update isURLNormalizeable() in the main repo to include this property

@robbie-c robbie-c force-pushed the add-pathname-to-prev-page-properties branch from b602a53 to 0d75918 Compare August 22, 2023 06:13
@robbie-c robbie-c added the bump patch Bump patch version when this PR gets merged label Aug 22, 2023
@robbie-c robbie-c merged commit a39d310 into master Aug 22, 2023
@robbie-c robbie-c deleted the add-pathname-to-prev-page-properties branch August 22, 2023 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch Bump patch version when this PR gets merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants