feat(web-analytics): Add pinnable actions and conversion goals
Pinnable actions are finished with this PR, but conversion goals in web analytics aren't, but I'd like to get this merged to avoid more merge conflicts.
Problem
Conversion goals are one of the most requested things in web analytics, and would let people figure out % of users who e.g. reached a certain page / clicked on a certain button (i.e. autocapture) / performed a specific custom event.
Changes
We already have Actions as a concept in posthog, so this piggy-backs off this.
- Add a concept of pinning actions. Pinned actions appear above unpinned actions in both web anaytics, and in the taxonomic filter component
- Add a tile in web analytics, which lists the top N actions and shows the conversion rate for each one (by person id).
This part is WIP and hidden behind a FF:
Not in this PR but will be in a follow-up
- Web analytics: Add a page-level setting for the conversion goal. This is then shown as the overview as the global conversion rate, and other breakdowns on the page will show conversion % per breakdown (e.g. by country or device type)
- Web analytics: A shortcut from the tile to manage goals
- Web analytics: Some information on tile about the total number of users, so that the number of uniques makes sense in context
- Web analytics: Empty state for the tile, prompting a user to create an action
- Web analytics: click an action in the goals tile sets it as the goal for the page
Does this work well for both Cloud and self-hosted?
Yes
How did you test this code?
Updated the existing tests to make sure that pinning an action works. Added some tests for the new query
đ¸ UI snapshots have been updated
4 snapshot changes in total. 0 added, 4 modified, 0 deleted:
-
chromium: 0 added, 4 modified, 0 deleted (diff for shard 1) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
đ¸ UI snapshots have been updated
4 snapshot changes in total. 0 added, 4 modified, 0 deleted:
-
chromium: 0 added, 4 modified, 0 deleted (diff for shard 1) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
đ¸ 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 1) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
đ¸ UI snapshots have been updated
3 snapshot changes in total. 0 added, 3 modified, 0 deleted:
-
chromium: 0 added, 3 modified, 0 deleted (diff for shard 1) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
đ¸ UI snapshots have been updated
1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
-
chromium: 0 added, 1 modified, 0 deleted (diff for shard 1) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
đ¸ 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 1) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
đ¸ UI snapshots have been updated
1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
-
chromium: 0 added, 1 modified, 0 deleted (diff for shard 1) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
đ¸ UI snapshots have been updated
4 snapshot changes in total. 0 added, 4 modified, 0 deleted:
-
chromium: 0 added, 4 modified, 0 deleted (diff for shard 1) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
đ¸ UI snapshots have been updated
4 snapshot changes in total. 0 added, 4 modified, 0 deleted:
-
chromium: 0 added, 4 modified, 0 deleted (diff for shard 1) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
đ¸ UI snapshots have been updated
4 snapshot changes in total. 0 added, 4 modified, 0 deleted:
-
chromium: 0 added, 4 modified, 0 deleted (diff for shard 1) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
đ¸ UI snapshots have been updated
1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
-
chromium: 0 added, 1 modified, 0 deleted (diff for shard 1) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
đ¸ 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 1) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
đ¸ 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 1) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
đ¸ 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 1) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
đ¸ UI snapshots have been updated
1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
-
chromium: 0 added, 1 modified, 0 deleted (diff for shard 1) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
đ¸ 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 1) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
Size Change: +79 B (+0.01%)
Total Size: 1.11 MB
âšī¸ View Unchanged
| Filename | Size | Change |
|---|---|---|
frontend/dist/toolbar.js |
1.11 MB | +79 B (+0.01%) |
đ¸ 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 1) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.
đ¸ 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 1) -
webkit: 0 added, 0 modified, 0 deleted
Triggered by this commit.