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

chore: add page title to custom events #1410

Closed
wants to merge 1 commit into from

Conversation

daibhin
Copy link
Contributor

@daibhin daibhin commented Sep 10, 2024

Changes

In working through some of the design changes proposed in PostHog/posthog#24561 we are looking to track the title of a given page in the playback tabs

Screenshot 2024-09-10 at 20 26 01

Given we don't want to rely on $pageview events where possible in Replay because we can't always guarantee a customer uses events, it seems like the only alternative is to add the title to the custom rrweb events.

Open to pushback here. Other options include:

  1. Never showing the title during playback and just relying on the url
  2. Only enhancing the tab with the title if a customer collects events

Checklist

  • Tests for new code (see advice on the tests we use)
  • Accounted for the impact of any changes across different browsers
  • Accounted for backwards compatibility of any changes (no breaking changes in posthog-js!)

Copy link

vercel bot commented Sep 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Sep 10, 2024 7:26pm

Copy link

Size Change: +526 B (+0.04%)

Total Size: 1.19 MB

Filename Size Change
dist/array.full.js 341 kB +133 B (+0.04%)
dist/array.js 157 kB +131 B (+0.08%)
dist/main.js 158 kB +131 B (+0.08%)
dist/module.js 157 kB +131 B (+0.08%)
ℹ️ View Unchanged
Filename Size
dist/exception-autocapture.js 10.4 kB
dist/recorder-v2.js 110 kB
dist/recorder.js 111 kB
dist/surveys-preview.js 59.8 kB
dist/surveys.js 66 kB
dist/tracing-headers.js 8.26 kB
dist/web-vitals.js 10.3 kB

compressed-size-action

@pauldambra
Copy link
Member

I wonder if we could do this with a plugin on the replayer side... the full snapshots will have the doc title in and changes to the title will come through in mutations

(which has the benefit it would work on old recordings too)

@daibhin
Copy link
Contributor Author

daibhin commented Sep 12, 2024

Closing in favour of PostHog/posthog#24943

@daibhin daibhin closed this Sep 12, 2024
@daibhin daibhin deleted the dn-chore/add-title-to-custom-data branch September 12, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants