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: hackathon metalytics (tracking team usage metrics) #26304

Merged
merged 60 commits into from
Dec 5, 2024

Conversation

benjackwhite
Copy link
Contributor

@benjackwhite benjackwhite commented Nov 20, 2024

Problem

Metalytics is a new feature that tracks how teams use dashboards and other PostHog tools. The goal is to give users visibility into things like session views, page loads, and how their team interacts with dashboards and tools.

Changes

Screenshot 2024-12-05 at 09 50 05
  • Adds automatic tracking to the app_metrics2 table every time someone navigates to a new page that has ActivityScope (what we use for Discussions, Team activity panel etc.)
  • Displays a little activity indicator at the top of number of views
  • Clicking opens the analytics area of the team activity with a little summary
  • All behind a flag
  • Removed the Trend chart as we couldn't get it to render nicely so can add as follow up

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Copy link
Contributor

github-actions bot commented Nov 20, 2024

Size Change: +24 B (0%)

Total Size: 1.11 MB

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

compressed-size-action

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

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

  • chromium: 0 added, 14 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.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

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

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week. If you want to permanentely keep it open, use the waiting label.

Copy link
Contributor

@zlwaterfield zlwaterfield left a comment

Choose a reason for hiding this comment

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

This PR looks good to me except for the snapshot changes. We shouldn't have all of these. The button should be hidden by default and should show on some of the pages it's being displayed on.

Screenshot 2024-12-04 at 9 35 59 AM

posthog/api/metalytics.py Outdated Show resolved Hide resolved
posthog/hogql/database/schema/app_metrics2.py Show resolved Hide resolved
@@ -232,6 +232,7 @@ export const FEATURE_FLAGS = {
CUSTOM_CHANNEL_TYPE_RULES: 'custom-channel-type-rules', // owner: @robbie-c #team-web-analytics
SELF_SERVE_CREDIT_OVERRIDE: 'self-serve-credit-override', // owner: @zach
EXPERIMENTS_MIGRATION_DISABLE_UI: 'experiments-migration-disable-ui', // owner: @jurajmajerik #team-experiments
METALYTICS: 'metalytics', // owner: @surbhi
Copy link
Contributor

Choose a reason for hiding this comment

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

No, just create the flag and set the release conditions. You can set to something like this so it's just available internally.

Screenshot 2024-11-26 at 2 47 41 PM

# Conflicts:
#	frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom--dark.png
#	frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-edit--light.png
#	frontend/__snapshots__/scenes-app-insights--stickiness-edit--dark--webkit.png
#	frontend/__snapshots__/scenes-app-insights--stickiness-edit--dark.png
#	frontend/__snapshots__/scenes-app-insights--stickiness-edit--light.png
#	frontend/__snapshots__/scenes-app-notebooks--recordings-playlist--dark.png
#	frontend/__snapshots__/scenes-app-notebooks--recordings-playlist--light.png
#	frontend/src/layout/navigation-3000/sidepanel/panels/activity/sidePanelActivityLogic.tsx
#	frontend/src/lib/constants.tsx
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

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

  • chromium: 0 added, 0 modified, 0 deleted
  • webkit: 0 added, 78 modified, 0 deleted (wasn't pushed!)

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@benjackwhite benjackwhite enabled auto-merge (squash) December 5, 2024 08:51
Copy link
Contributor

@zlwaterfield zlwaterfield left a comment

Choose a reason for hiding this comment

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

So awesome ❤️

@benjackwhite benjackwhite merged commit 85e7457 into master Dec 5, 2024
96 checks passed
@benjackwhite benjackwhite deleted the hackathon/metalytics branch December 5, 2024 12:58
@surbhi-posthog
Copy link
Contributor

wooot!

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.

4 participants