:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(dashboards): refresh and expand the default signup dashboard (#62736)
Matt Puaab3e6ec7462a
diff --git a/posthog/api/test/test_signup.py b/posthog/api/test/test_signup.pyindex a7b06ee3ad2a..592805a16315 100644--- a/posthog/api/test/test_signup.py+++ b/posthog/api/test/test_signup.py@@ -103,11 +103,12 @@ class TestSignupAPI(APIBaseTest):self.assertEqual(organization.name, "Hedgehogs United, LLC")# Assert that the sign up event & identify calls were sent to PostHog analytics- mock_capture.assert_called_once()- self.assertEqual("user signed up", mock_capture.call_args.kwargs["event"])- self.assertEqual(user.distinct_id, mock_capture.call_args.kwargs["distinct_id"])+ signup_calls = [c for c in mock_capture.call_args_list if c.kwargs.get("event") == "user signed up"]+ self.assertEqual(len(signup_calls), 1)+ signup_call = signup_calls[0]+ self.assertEqual(user.distinct_id, signup_call.kwargs["distinct_id"])# Assert that key properties were set properly- event_props = mock_capture.call_args.kwargs["properties"]+ event_props = signup_call.kwargs["properties"]self.assertEqual(event_props["is_first_user"], True)self.assertEqual(event_props["is_organization_first_user"], True)self.assertEqual(event_props["new_onboarding_enabled"], False)@@ -140,8 +141,9 @@ class TestSignupAPI(APIBaseTest):)self.assertEqual(response.status_code, status.HTTP_201_CREATED)- mock_capture.assert_called_once()- event_props = mock_capture.call_args.kwargs["properties"]+ signup_calls = [c for c in mock_capture.call_args_list if c.kwargs.get("event") == "user signed up"]+ self.assertEqual(len(signup_calls), 1)+ event_props = signup_calls[0].kwargs["properties"]self.assertEqual(event_props["referral_source"], "ChatGPT recommended it")self.assertEqual(event_props["referral_source_ai_prompt"], "What is the best product analytics tool?")self.assertEqual(event_props["$set"]["referral_source"], "ChatGPT recommended it")@@ -440,11 +442,12 @@ class TestSignupAPI(APIBaseTest):self.assertTrue(user.is_staff) # True because this is the first user in the instance# Assert that the sign up event & identify calls were sent to PostHog analytics- mock_capture.assert_called_once()- self.assertEqual(user.distinct_id, mock_capture.call_args.kwargs["distinct_id"])- self.assertEqual("user signed up", mock_capture.call_args.kwargs["event"])+ signup_calls = [c for c in mock_capture.call_args_list if c.kwargs.get("event") == "user signed up"]+ self.assertEqual(len(signup_calls), 1)+ signup_call = signup_calls[0]+ self.assertEqual(user.distinct_id, signup_call.kwargs["distinct_id"])# Assert that key properties were set properly- event_props = mock_capture.call_args.kwargs["properties"]+ event_props = signup_call.kwargs["properties"]self.assertEqual(event_props["is_first_user"], True)self.assertEqual(event_props["is_organization_first_user"], True)self.assertEqual(event_props["new_onboarding_enabled"], False)@@ -600,7 +603,11 @@ class TestSignupAPI(APIBaseTest):"attr": "password",}, [password, res.json()]- def test_default_dashboard_is_created_on_signup(self):+ @mock.patch(+ "posthog.helpers.signup_dashboard_experiment.get_starter_dashboard_variant",+ return_value="test",+ )+ def test_default_dashboard_is_created_on_signup(self, _mock_variant):"""Tests that the default web app dashboard is created on signup.Note: This feature is currently behind a feature flag.@@ -637,12 +644,13 @@ class TestSignupAPI(APIBaseTest):dashboard: Dashboard = Dashboard.objects.first() # type: ignoreself.assertEqual(dashboard.team, user.team)- self.assertEqual(dashboard.tiles.count(), 6)- self.assertEqual(dashboard.name, "My App Dashboard")+ self.assertEqual(dashboard.tiles.count(), 16)+ self.assertEqual(dashboard.name, "Your starter dashboard")self.assertEqual(dashboard.description,- "A starter view of how people use your app: how many visit, whether they come back, "- "where traffic comes from, and how they move through your pages.",+ "How people use your app at a glance: traffic, retention, where visitors come from, and "+ "whether they take action. Built from automatically captured events, so it works on day one. "+ "Swap in your own events to make it yours.",)self.assertEqual(Dashboard.objects.filter(team=user.team).count(), 1)diff --git a/posthog/api/test/test_team.py b/posthog/api/test/test_team.pyindex 5d867a0bcf7c..804d865f2c8b 100644--- a/posthog/api/test/test_team.py+++ b/posthog/api/test/test_team.py@@ -400,7 +400,11 @@ def team_api_test_factory():)@freeze_time("2022-02-08")- def test_delete_team_activity_log(self):+ @mock.patch(+ "posthog.helpers.signup_dashboard_experiment.get_starter_dashboard_variant",+ return_value="test",+ )+ def test_delete_team_activity_log(self, _mock_variant):self.organization_membership.level = OrganizationMembership.Level.ADMINself.organization_membership.save()@@ -431,7 +435,7 @@ def team_api_test_factory():"item_id": ANY,"scope": "Dashboard","detail": {- "name": "My App Dashboard",+ "name": "Your starter dashboard","type": "dashboard","changes": [],"context": None,@@ -511,6 +515,8 @@ def team_api_test_factory():# `mock_capture` is patched.team: Team = Team.objects.create_with_data(initiating_user=self.user, organization=self.organization)team_pk = team.pk+ # create_with_data fires a starter-dashboard exposure capture; only assert delete-time events+ mock_capture.reset_mock()self.assertEqual(Team.objects.filter(organization=self.organization).count(), 2)diff --git a/posthog/helpers/signup_dashboard_experiment.py b/posthog/helpers/signup_dashboard_experiment.pynew file mode 100644index 000000000000..1b30a6af8b69--- /dev/null+++ b/posthog/helpers/signup_dashboard_experiment.py@@ -0,0 +1,83 @@+from __future__ import annotations++from typing import TYPE_CHECKING, Literal++import posthoganalytics++from products.dashboards.backend.models.dashboard import Dashboard+from products.dashboards.backend.models.dashboard_templates import DashboardTemplate++if TYPE_CHECKING:+ from posthog.models.team.team import Team++STARTER_DASHBOARD_EXPERIMENT_FLAG_KEY = "starter-dashboard-v2"++StarterDashboardVariant = Literal["control", "test"]+++def get_starter_dashboard_variant(team: Team) -> StarterDashboardVariant:+ """Resolve experiment arm for a newly created non-demo project."""+ try:+ flag_result = posthoganalytics.get_feature_flag(+ STARTER_DASHBOARD_EXPERIMENT_FLAG_KEY,+ str(team.uuid),+ groups={"organization": str(team.organization_id)},+ )+ except Exception:+ return "control"++ # get_feature_flag is typed as FeatureFlag | None but returns the variant key string at+ # runtime; normalise to str so the comparison is well-typed.+ return "test" if str(flag_result) == "test" else "control"+++def get_signup_dashboard_template(variant: StarterDashboardVariant) -> DashboardTemplate:+ if variant == "test":+ return DashboardTemplate.default_signup_template()+ return DashboardTemplate.legacy_signup_template()+++def get_signup_dashboard_name(variant: StarterDashboardVariant) -> str:+ return "Your starter dashboard" if variant == "test" else "My App Dashboard"+++def create_signup_primary_dashboard(team: Team, *, using: str | None = None) -> Dashboard:+ from posthog.helpers.dashboard_templates import create_from_template # noqa: PLC0415 — breaks team import cycle++ variant = get_starter_dashboard_variant(team)+ template = get_signup_dashboard_template(variant)++ dashboard = Dashboard.objects.db_manager(using).create(+ name=get_signup_dashboard_name(variant),+ pinned=True,+ team=team,+ description=template.dashboard_description or "",+ )+ create_from_template(dashboard, template)++ if team.extra_settings is None:+ team.extra_settings = {}+ team.extra_settings["starter_dashboard_variant"] = variant++ report_starter_dashboard_exposure(team, variant)+ return dashboard+++def report_starter_dashboard_exposure(team: Team, variant: StarterDashboardVariant) -> None:+ from posthog.event_usage import report_team_action # noqa: PLC0415 — breaks team import cycle++ # Project-scoped assignment: distinct_id is the environment UUID so each new project+ # gets a stable arm independent of which user created it.+ report_team_action(+ team,+ "$feature_flag_called",+ properties={+ "$feature_flag": STARTER_DASHBOARD_EXPERIMENT_FLAG_KEY,+ "$feature_flag_response": variant,+ "starter_dashboard_variant": variant,+ },+ group_properties={+ "starter_dashboard_variant": variant,+ "starter_dashboard_experiment": STARTER_DASHBOARD_EXPERIMENT_FLAG_KEY,+ },+ )diff --git a/posthog/models/team/team.py b/posthog/models/team/team.pyindex 2fe60f737e96..75c04adb0a3b 100644--- a/posthog/models/team/team.py+++ b/posthog/models/team/team.py@@ -18,7 +18,6 @@ import posthoganalyticsfrom posthog.clickhouse.query_tagging import Feature, Product, tag_queries, tags_contextfrom posthog.cloud_utils import is_cloud-from posthog.helpers.dashboard_templates import create_dashboard_from_templatefrom posthog.helpers.session_recording_playlist_templates import DEFAULT_PLAYLISTSfrom posthog.models.filters.filter import Filterfrom posthog.models.filters.mixins.utils import cached_property@@ -39,8 +38,6 @@ from posthog.session_recordings.models.session_recording_playlist import Sessionfrom posthog.settings.utils import get_listfrom products.customer_analytics.backend.constants import DEFAULT_ACTIVITY_EVENT-from products.dashboards.backend.models.dashboard import Dashboard-from products.dashboards.backend.models.dashboard_templates import DashboardTemplatefrom ...hogql.modifiers import set_default_modifier_valuesfrom ...schema_enums import CurrencyCode, PersonsOnEventsMode@@ -128,15 +125,12 @@ class TeamManager(models.Manager):team.extra_settings = {}team.extra_settings.setdefault("recorder_script", "posthog-recorder")- # Create default dashboards- default_app_template = DashboardTemplate.original_template()- dashboard = Dashboard.objects.db_manager(self.db).create(- name="My App Dashboard",- pinned=True,- team=team,- description=default_app_template.dashboard_description or "",+ # Create default dashboards (A/B via starter-dashboard-v2; demo projects skip above)+ from posthog.helpers.signup_dashboard_experiment import ( # noqa: PLC0415 — breaks team import cycle+ create_signup_primary_dashboard,)- create_dashboard_from_template("DEFAULT_APP", dashboard)++ dashboard = create_signup_primary_dashboard(team, using=self.db)team.primary_dashboard = dashboard# Create default session recording playlistsdiff --git a/posthog/test/test_team.py b/posthog/test/test_team.pyindex 78e729545bdf..1b2ad7fad648 100644--- a/posthog/test/test_team.py+++ b/posthog/test/test_team.py@@ -21,6 +21,11 @@ from .base import BaseTestutil.can_enable_actor_on_events = True # ty: ignore[invalid-assignment]+STARTER_DASHBOARD_V2_VARIANT = mock.patch(+ "posthog.helpers.signup_dashboard_experiment.get_starter_dashboard_variant",+ return_value="test",+)+class TestModelCache(TestCase):def setUp(self):@@ -160,12 +165,38 @@ class TestTeam(BaseTest):[{"key": "id", "type": "cohort", "value": test_users_cohort.pk, "operator": "not_in"}],)- def test_create_team_sets_primary_dashboard(self):+ def test_create_team_sets_primary_dashboard_control_by_default(self):+ team = Team.objects.create_with_data(initiating_user=self.user, organization=self.organization)+ assert team.primary_dashboard is not None+ assert team.extra_settings is not None+ self.assertEqual(team.primary_dashboard.name, "My App Dashboard")+ self.assertEqual(DashboardTile.objects.filter(dashboard=team.primary_dashboard).count(), 6)+ self.assertEqual(team.extra_settings.get("starter_dashboard_variant"), "control")++ @STARTER_DASHBOARD_V2_VARIANT+ def test_create_team_sets_primary_dashboard(self, _mock_variant):team = Team.objects.create_with_data(initiating_user=self.user, organization=self.organization)self.assertIsInstance(team.primary_dashboard, Dashboard)- # Ensure insights are created and linked- self.assertEqual(DashboardTile.objects.filter(dashboard=team.primary_dashboard).count(), 6)+ # Ensure insights are created and linked (8 insight tiles + 5 text tiles + 3 button tiles)+ self.assertEqual(DashboardTile.objects.filter(dashboard=team.primary_dashboard).count(), 16)+ assert team.extra_settings is not None+ self.assertEqual(team.extra_settings.get("starter_dashboard_variant"), "test")++ @mock.patch("posthog.helpers.signup_dashboard_experiment.posthoganalytics.get_feature_flag", return_value="test")+ @mock.patch("posthog.event_usage.report_team_action")+ def test_starter_dashboard_experiment_evaluates_feature_flag_per_project(+ self, mock_report_team_action, mock_get_feature_flag+ ):+ team = Team.objects.create_with_data(initiating_user=self.user, organization=self.organization)++ mock_get_feature_flag.assert_called_once_with(+ "starter-dashboard-v2",+ str(team.uuid),+ groups={"organization": str(team.organization_id)},+ )+ mock_report_team_action.assert_called_once()+ self.assertEqual(mock_report_team_action.call_args.args[1], "$feature_flag_called")@mock.patch("posthoganalytics.feature_enabled", return_value=True)def test_team_on_cloud_uses_feature_flag_to_determine_person_on_events(self, mock_feature_enabled):@@ -257,7 +288,8 @@ class TestTeam(BaseTest):team = Team.objects.create_with_data(initiating_user=self.user, organization=self.organization, extra_settings=input_extra_settings)- self.assertEqual(team.extra_settings, expected_extra_settings)+ # create_with_data also records the starter-dashboard experiment arm in extra_settings+ self.assertEqual(team.extra_settings, {**expected_extra_settings, "starter_dashboard_variant": "control"})@parameterized.expand([@@ -272,11 +304,16 @@ class TestTeam(BaseTest):@parameterized.expand([+ ("Active users (last 30 days)",),("Daily active users (DAUs)",),("Weekly active users (WAUs)",),])- def test_default_dashboard_dau_wau_tiles_use_group_node(self, tile_name):+ @mock.patch(+ "posthog.helpers.signup_dashboard_experiment.get_starter_dashboard_variant",+ return_value="test",+ )+ def test_default_dashboard_dau_wau_tiles_use_group_node(self, tile_name, _mock_variant):team = Team.objects.create_with_data(initiating_user=self.user, organization=self.organization)tile = DashboardTile.objects.get(dashboard=team.primary_dashboard,@@ -293,13 +330,17 @@ class TestTeam(BaseTest):@parameterized.expand([+ ("Sessions (last 7 days)", "TrendsQuery"),+ ("Pageviews (last 7 days)", "TrendsQuery"),+ ("Top referrers", "TrendsQuery"),("Retention", "RetentionQuery"),- ("Growth accounting", "LifecycleQuery"),- ("Referring domain (last 14 days)", "TrendsQuery"),- ("Pageview funnel, by browser", "FunnelsQuery"),])- def test_default_dashboard_pageview_only_tiles(self, tile_name, expected_kind):+ @mock.patch(+ "posthog.helpers.signup_dashboard_experiment.get_starter_dashboard_variant",+ return_value="test",+ )+ def test_default_dashboard_pageview_only_tiles(self, tile_name, expected_kind, _mock_variant):team = Team.objects.create_with_data(initiating_user=self.user, organization=self.organization)tile = DashboardTile.objects.get(dashboard=team.primary_dashboard,@@ -311,3 +352,27 @@ class TestTeam(BaseTest):assert source["kind"] == expected_kindassert "GroupNode" not in str(source)assert "$pageview" in str(source)++ @STARTER_DASHBOARD_V2_VARIANT+ def test_default_dashboard_funnel_tile_steps_through_pageview_to_autocapture(self, _mock_variant):+ team = Team.objects.create_with_data(initiating_user=self.user, organization=self.organization)+ tile = DashboardTile.objects.get(+ dashboard=team.primary_dashboard,+ insight__name="Visit to interaction funnel",+ )+ assert tile.insight is not None+ assert tile.insight.query is not None+ source = tile.insight.query["source"]+ assert source["kind"] == "FunnelsQuery"+ assert [step["event"] for step in source["series"]] == ["$pageview", "$autocapture"]++ @STARTER_DASHBOARD_V2_VARIANT+ def test_default_dashboard_button_tiles_link_to_related_products(self, _mock_variant):+ team = Team.objects.create_with_data(initiating_user=self.user, organization=self.organization)+ button_tiles = DashboardTile.objects.filter(+ dashboard=team.primary_dashboard,+ button_tile__isnull=False,+ ).select_related("button_tile")+ assert button_tiles.count() == 3+ urls = {tile.button_tile.url for tile in button_tiles if tile.button_tile is not None}+ assert urls == {"/replay/home", "/web", "/activity/explore"}diff --git a/products/dashboards/backend/models/dashboard_templates.py b/products/dashboards/backend/models/dashboard_templates.pyindex 35db4b9201c9..22bf9c62bb3c 100644--- a/products/dashboards/backend/models/dashboard_templates.py+++ b/products/dashboards/backend/models/dashboard_templates.py@@ -63,6 +63,454 @@ class DashboardTemplate(UUIDTModel, RootTeamMixin):@staticmethoddef original_template() -> "DashboardTemplate":"""+ The authoritative hardcoded "Product analytics" template the rest of the codebase relies on+ (the DEFAULT_APP seed, the DB-absent fallback in create_dashboard_from_template, and the global+ template seed used in tests). It is intentionally the legacy shape; the starter-dashboard-v2+ test arm opts into the refreshed layout via default_signup_template().++ This OG template is not stored in https://github.com/PostHog/templates-repository+ The system assumes this template is always present and doesn't wait to import it from the template repository+ """+ return DashboardTemplate.legacy_signup_template()++ @staticmethod+ def default_signup_template() -> "DashboardTemplate":+ """+ Refreshed signup dashboard (test arm of the starter-dashboard-v2 experiment).+ This OG template is not stored in https://github.com/PostHog/templates-repository+ The system assumes this template is always present and doesn't wait to import it from the template repository+ """+ return DashboardTemplate(+ template_name="Product analytics",+ dashboard_description=(+ "How people use your app at a glance: traffic, retention, where visitors come from, and "+ "whether they take action. Built from automatically captured events, so it works on day one. "+ "Swap in your own events to make it yours."+ ),+ dashboard_filters={},+ tiles=[+ {+ "type": "TEXT",+ "color": None,+ "transparent_background": True,+ "body": (+ "# 👋 Start here\n\n"+ "Everything below is captured automatically (pageviews, clicks, sessions, and location), "+ "so this dashboard fills in from day one with no extra setup. The headline numbers will "+ "feel familiar; the retention and funnel tiles are where you point PostHog at your own "+ "events. Edit any tile, or duplicate the dashboard to make it your own."+ ),+ "layouts": {+ "sm": {"h": 2, "w": 12, "x": 0, "y": 0, "minH": 1, "minW": 3},+ "xs": {"h": 3, "w": 1, "x": 0, "y": 0, "minH": 1, "minW": 1},+ },+ },+ {+ "name": "Active users (last 30 days)",+ "type": "INSIGHT",+ "color": "blue",+ "query": {+ "kind": "InsightVizNode",+ "source": {+ "kind": "TrendsQuery",+ "series": [+ {+ "kind": "GroupNode",+ "operator": "OR",+ "nodes": [+ {"kind": "EventsNode", "event": "$pageview", "name": "$pageview"},+ {"kind": "EventsNode", "event": "$screen", "name": "$screen"},+ ],+ "math": "dau",+ "name": "Pageview or screen",+ }+ ],+ "interval": "day",+ "dateRange": {"date_from": "-30d", "explicitDate": False},+ "properties": [],+ "trendsFilter": {+ "display": "BoldNumber",+ "showLegend": False,+ "yAxisScaleType": "linear",+ "showValuesOnSeries": False,+ "smoothingIntervals": 1,+ "showPercentStackView": False,+ "aggregationAxisFormat": "numeric",+ "showAlertThresholdLines": False,+ },+ "breakdownFilter": {"breakdown_type": "event"},+ "filterTestAccounts": False,+ },+ },+ "layouts": {+ "sm": {"h": 3, "w": 4, "x": 0, "y": 2, "minH": 3, "minW": 3},+ "xs": {"h": 3, "w": 1, "x": 0, "y": 3, "minH": 3, "minW": 1},+ },+ "description": "Unique people who used your app in the last 30 days. A quick pulse on your overall reach.",+ },+ {+ "name": "Sessions (last 7 days)",+ "type": "INSIGHT",+ "color": "blue",+ "query": {+ "kind": "InsightVizNode",+ "source": {+ "kind": "TrendsQuery",+ "series": [+ {+ "kind": "EventsNode",+ "math": "unique_session",+ "name": "$pageview",+ "event": "$pageview",+ }+ ],+ "interval": "day",+ "dateRange": {"date_from": "-7d", "explicitDate": False},+ "properties": [],+ "trendsFilter": {+ "display": "BoldNumber",+ "showLegend": False,+ "yAxisScaleType": "linear",+ "showValuesOnSeries": False,+ "smoothingIntervals": 1,+ "showPercentStackView": False,+ "aggregationAxisFormat": "numeric",+ "showAlertThresholdLines": False,+ },+ "breakdownFilter": {"breakdown_type": "event"},+ "filterTestAccounts": False,+ },+ },+ "layouts": {+ "sm": {"h": 3, "w": 4, "x": 4, "y": 2, "minH": 3, "minW": 3},+ "xs": {"h": 3, "w": 1, "x": 0, "y": 6, "minH": 3, "minW": 1},+ },+ "description": "Distinct visits in the last 7 days. A session groups everything one person does in a single sitting.",+ },+ {+ "name": "Pageviews (last 7 days)",+ "type": "INSIGHT",+ "color": "blue",+ "query": {+ "kind": "InsightVizNode",+ "source": {+ "kind": "TrendsQuery",+ "series": [+ {"kind": "EventsNode", "math": "total", "name": "$pageview", "event": "$pageview"}+ ],+ "interval": "day",+ "dateRange": {"date_from": "-7d", "explicitDate": False},+ "properties": [],+ "trendsFilter": {+ "display": "BoldNumber",+ "showLegend": False,+ "yAxisScaleType": "linear",+ "showValuesOnSeries": False,+ "smoothingIntervals": 1,+ "showPercentStackView": False,+ "aggregationAxisFormat": "numeric",+ "showAlertThresholdLines": False,+ },+ "breakdownFilter": {"breakdown_type": "event"},+ "filterTestAccounts": False,+ },+ },+ "layouts": {+ "sm": {"h": 3, "w": 4, "x": 8, "y": 2, "minH": 3, "minW": 3},+ "xs": {"h": 3, "w": 1, "x": 0, "y": 9, "minH": 3, "minW": 1},+ },+ "description": "Total pages viewed in the last 7 days, repeat views included. The classic traffic-volume number.",+ },+ {+ "type": "TEXT",+ "color": None,+ "transparent_background": True,+ "body": (+ "## Are people coming back?\n\n"+ "Active users show your trend; retention shows how many return after their first visit. "+ "The clearest sign your product is sticky."+ ),+ "layouts": {+ "sm": {"h": 2, "w": 12, "x": 0, "y": 5, "minH": 1, "minW": 3},+ "xs": {"h": 3, "w": 1, "x": 0, "y": 12, "minH": 1, "minW": 1},+ },+ },+ {+ "name": "Daily active users (DAUs)",+ "type": "INSIGHT",+ "color": "blue",+ "query": {+ "kind": "InsightVizNode",+ "source": {+ "kind": "TrendsQuery",+ "series": [+ {+ "kind": "GroupNode",+ "operator": "OR",+ "nodes": [+ {"kind": "EventsNode", "event": "$pageview", "name": "$pageview"},+ {"kind": "EventsNode", "event": "$screen", "name": "$screen"},+ ],+ "math": "dau",+ "name": "Pageview or screen",+ }+ ],+ "interval": "day",+ "dateRange": {"date_from": "-30d", "explicitDate": False},+ "properties": [],+ "trendsFilter": {+ "display": "ActionsLineGraph",+ "showLegend": False,+ "yAxisScaleType": "linear",+ "showValuesOnSeries": False,+ "smoothingIntervals": 1,+ "showPercentStackView": False,+ "aggregationAxisFormat": "numeric",+ "showAlertThresholdLines": False,+ },+ "breakdownFilter": {"breakdown_type": "event"},+ "filterTestAccounts": False,+ },+ },+ "layouts": {+ "sm": {"h": 5, "w": 6, "x": 0, "y": 7, "minH": 5, "minW": 3},+ "xs": {"h": 5, "w": 1, "x": 0, "y": 15, "minH": 5, "minW": 1},+ },+ "description": "Unique people who use your app each day. Watch for steady growth or sudden drops.",+ },+ {+ "name": "Weekly active users (WAUs)",+ "type": "INSIGHT",+ "color": "green",+ "query": {+ "kind": "InsightVizNode",+ "source": {+ "kind": "TrendsQuery",+ "series": [+ {+ "kind": "GroupNode",+ "operator": "OR",+ "nodes": [+ {"kind": "EventsNode", "event": "$pageview", "name": "$pageview"},+ {"kind": "EventsNode", "event": "$screen", "name": "$screen"},+ ],+ "math": "dau",+ "name": "Pageview or screen",+ }+ ],+ "interval": "week",+ "dateRange": {"date_from": "-90d", "explicitDate": False},+ "properties": [],+ "trendsFilter": {+ "display": "ActionsLineGraph",+ "showLegend": False,+ "yAxisScaleType": "linear",+ "showValuesOnSeries": False,+ "smoothingIntervals": 1,+ "showPercentStackView": False,+ "aggregationAxisFormat": "numeric",+ "showAlertThresholdLines": False,+ },+ "breakdownFilter": {"breakdown_type": "event"},+ "filterTestAccounts": False,+ },+ },+ "layouts": {+ "sm": {"h": 5, "w": 6, "x": 6, "y": 7, "minH": 5, "minW": 3},+ "xs": {"h": 5, "w": 1, "x": 0, "y": 20, "minH": 5, "minW": 1},+ },+ "description": "Unique people who use your app each week. Smooths out daily noise to show the underlying trend.",+ },+ {+ "name": "Retention",+ "type": "INSIGHT",+ "color": "blue",+ "query": {+ "kind": "InsightVizNode",+ "source": {+ "kind": "RetentionQuery",+ "dateRange": {"date_from": "-7d", "explicitDate": False},+ "properties": [],+ "retentionFilter": {+ "period": "Week",+ "targetEntity": {"id": "$pageview", "type": "events"},+ "retentionType": "retention_first_time",+ "totalIntervals": 11,+ "returningEntity": {"id": "$pageview", "type": "events"},+ },+ "filterTestAccounts": False,+ },+ },+ "layouts": {+ "sm": {"h": 5, "w": 12, "x": 0, "y": 12, "minH": 5, "minW": 3},+ "xs": {"h": 5, "w": 1, "x": 0, "y": 25, "minH": 5, "minW": 1},+ },+ "description": "How many people come back week after week after their first visit. The clearest signal of whether your product is sticky.",+ },+ {+ "type": "TEXT",+ "color": None,+ "transparent_background": True,+ "body": ("## Where your visitors come from\n\nThe sites and channels sending people to your app."),+ "layouts": {+ "sm": {"h": 2, "w": 12, "x": 0, "y": 17, "minH": 1, "minW": 3},+ "xs": {"h": 3, "w": 1, "x": 0, "y": 30, "minH": 1, "minW": 1},+ },+ },+ {+ "name": "Top referrers",+ "type": "INSIGHT",+ "color": "purple",+ "query": {+ "kind": "InsightVizNode",+ "source": {+ "kind": "TrendsQuery",+ "series": [+ {"kind": "EventsNode", "math": "dau", "name": "$pageview", "event": "$pageview"}+ ],+ "interval": "day",+ "dateRange": {"date_from": "-7d", "explicitDate": False},+ "properties": [],+ "trendsFilter": {+ "display": "ActionsBarValue",+ "showLegend": False,+ "yAxisScaleType": "linear",+ "showValuesOnSeries": False,+ "smoothingIntervals": 1,+ "showPercentStackView": False,+ "aggregationAxisFormat": "numeric",+ "showAlertThresholdLines": False,+ },+ "breakdownFilter": {"breakdown": "$referring_domain", "breakdown_type": "event"},+ "filterTestAccounts": False,+ },+ },+ "layouts": {+ "sm": {"h": 5, "w": 12, "x": 0, "y": 19, "minH": 5, "minW": 3},+ "xs": {"h": 5, "w": 1, "x": 0, "y": 33, "minH": 5, "minW": 1},+ },+ "description": "Which sites send you the most visitors, like search, social, and direct. Your acquisition channels at a glance.",+ },+ {+ "type": "TEXT",+ "color": None,+ "transparent_background": True,+ "body": (+ "## Turning visits into actions\n\n"+ "A funnel from page view to click. Swap in your own events (signup, purchase, upgrade) "+ "to measure real conversion."+ ),+ "layouts": {+ "sm": {"h": 2, "w": 12, "x": 0, "y": 24, "minH": 1, "minW": 3},+ "xs": {"h": 3, "w": 1, "x": 0, "y": 38, "minH": 1, "minW": 1},+ },+ },+ {+ "name": "Visit to interaction funnel",+ "type": "INSIGHT",+ "color": "black",+ "query": {+ "kind": "InsightVizNode",+ "source": {+ "kind": "FunnelsQuery",+ "series": [+ {+ "kind": "EventsNode",+ "name": "$pageview",+ "event": "$pageview",+ "custom_name": "Viewed a page",+ },+ {+ "kind": "EventsNode",+ "name": "$autocapture",+ "event": "$autocapture",+ "custom_name": "Clicked something",+ },+ ],+ "interval": "day",+ "dateRange": {"date_from": "-7d", "explicitDate": False},+ "properties": [],+ "funnelsFilter": {+ "layout": "horizontal",+ "exclusions": [],+ "funnelVizType": "steps",+ "funnelOrderType": "ordered",+ "funnelStepReference": "total",+ "funnelWindowInterval": 14,+ "breakdownAttributionType": "first_touch",+ "funnelWindowIntervalUnit": "day",+ },+ "breakdownFilter": {"breakdown_type": "event"},+ "filterTestAccounts": False,+ },+ },+ "layouts": {+ "sm": {"h": 5, "w": 12, "x": 0, "y": 26, "minH": 5, "minW": 3},+ "xs": {"h": 5, "w": 1, "x": 0, "y": 41, "minH": 5, "minW": 1},+ },+ "description": "Of people who land on a page, how many go on to interact. Replace these steps with your own events to track real conversions.",+ },+ {+ "type": "TEXT",+ "color": None,+ "transparent_background": True,+ "body": (+ "## What to do next\n\n"+ "You've got the numbers. Watch how people actually behave, explore raw events, or dig "+ "into traffic and acquisition."+ ),+ "layouts": {+ "sm": {"h": 2, "w": 12, "x": 0, "y": 31, "minH": 1, "minW": 3},+ "xs": {"h": 3, "w": 1, "x": 0, "y": 46, "minH": 1, "minW": 1},+ },+ },+ {+ "type": "BUTTON",+ "color": None,+ "transparent_background": True,+ "url": "/replay/home",+ "text": "Watch session replays",+ "placement": "left",+ "style": "primary",+ "layouts": {+ "sm": {"h": 1, "w": 4, "x": 0, "y": 33, "minH": 1, "minW": 2},+ "xs": {"h": 1, "w": 1, "x": 0, "y": 49, "minH": 1, "minW": 1},+ },+ },+ {+ "type": "BUTTON",+ "color": None,+ "transparent_background": True,+ "url": "/web",+ "text": "Open web analytics",+ "placement": "left",+ "style": "secondary",+ "layouts": {+ "sm": {"h": 1, "w": 4, "x": 4, "y": 33, "minH": 1, "minW": 2},+ "xs": {"h": 1, "w": 1, "x": 0, "y": 50, "minH": 1, "minW": 1},+ },+ },+ {+ "type": "BUTTON",+ "color": None,+ "transparent_background": True,+ "url": "/activity/explore",+ "text": "Browse activity",+ "placement": "left",+ "style": "secondary",+ "layouts": {+ "sm": {"h": 1, "w": 4, "x": 8, "y": 33, "minH": 1, "minW": 2},+ "xs": {"h": 1, "w": 1, "x": 0, "y": 51, "minH": 1, "minW": 1},+ },+ },+ ],+ tags=[],+ )++ @staticmethod+ def legacy_signup_template() -> "DashboardTemplate":+ """+ Pre-2026 default signup dashboard (control arm of starter-dashboard-v2 experiment).This OG template is not stored in https://github.com/PostHog/templates-repositoryThe system assumes this template is always present and doesn't wait to import it from the template repository"""