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: Cross-sell Web Vitals to Product Analytics #28410

Merged
merged 7 commits into from
Feb 7, 2025

Conversation

rafaeelaudibert
Copy link
Member

@rafaeelaudibert rafaeelaudibert commented Feb 7, 2025

Problem

Web Analytics has consistent "Open as new insight" buttons to allow you to go from Web Analytics to Product Analytics, but that wasn't a thing for Web Vitals.

image

Changes

Introduce a new button under the web vitals trend query to open it as a new insight. It'll copy the goal lines over to the Product Analytics page, but they aren't editable right now, this will come in a follow-up PR (or commit if this PR takes too long to be merged)

Does this work well for both Cloud and self-hosted?

Yes

How did you test this code?

Visually

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR adds cross-selling functionality between Web Vitals and Product Analytics by introducing a new "Open as new insight" button and standardizing URL handling across the application.

  • Added new WEB_VITALS_INSIGHT enum to ProductIntentContext for tracking cross-sell interactions
  • Modified WebVitals component to include "Open as new insight" button with proper intent tracking
  • Standardized URL generation across components by updating urls.insightNew() to use object parameters instead of positional arguments
  • Renamed insightTypeURL to INSIGHT_TYPE_URLS constant and updated imports across multiple components
  • Updated layout in WebAnalyticsDashboard to accommodate new cross-selling functionality with proper feature flag controls

39 file(s) reviewed, 5 comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

github-actions bot commented Feb 7, 2025

Size Change: +49 B (0%)

Total Size: 1.18 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 1.18 MB +49 B (0%)

compressed-size-action

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

Copy link
Member

@robbie-c robbie-c left a comment

Choose a reason for hiding this comment

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

Me: Oh that sounds like a simple change, and a nice idea!

Github:
Screenshot 2025-02-07 at 11 39 28

:D LGTM

rafaeelaudibert and others added 6 commits February 7, 2025 11:19
By using an object we can more easily pass a query in - which happens
very often
You can now go from Web Analytics to Product Analytics in Web Vitals, introducing another cross-selling opportunity.

People can also set up Alerts from that page which is a nice addition!
The margin is wrong here after Tailwind changes, let's fix them
If the web vitals FF is disabled then this UI looked very wonky (currently online would display in the middle)
After the recent color changes this is looking bad, let's update it slightly
@rafaeelaudibert rafaeelaudibert force-pushed the cross-sell-web-vitals-to-product-analytics branch from 3f3c62e to 38a7cac Compare February 7, 2025 14:20
@rafaeelaudibert rafaeelaudibert enabled auto-merge (squash) February 7, 2025 14:25
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@rafaeelaudibert rafaeelaudibert merged commit 4a22c93 into master Feb 7, 2025
103 checks passed
@rafaeelaudibert rafaeelaudibert deleted the cross-sell-web-vitals-to-product-analytics branch February 7, 2025 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants