: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(web-analytics): add achievement_unlocked notification type (#64145)
Jordan Mryyan6906711003d5
diff --git a/frontend/src/lib/components/NotificationsMenu/NotificationRow.tsx b/frontend/src/lib/components/NotificationsMenu/NotificationRow.tsxindex 129a33d3fece..91376de17f41 100644--- a/frontend/src/lib/components/NotificationsMenu/NotificationRow.tsx+++ b/frontend/src/lib/components/NotificationsMenu/NotificationRow.tsx@@ -54,6 +54,10 @@ export const REALTIME_NOTIFICATION_TYPE_META: Record<string, { label: string; delabel: 'Web analytics digest',description: 'Your weekly Web analytics summary is ready!',},+ achievement_unlocked: {+ label: 'Achievement unlocked',+ description: 'When you unlock a new achievement',+ },}export function NotificationRow({diff --git a/frontend/src/lib/components/NotificationsMenu/notificationToasts.tsx b/frontend/src/lib/components/NotificationsMenu/notificationToasts.tsxindex 109f98d37dc6..9a212d4d9beb 100644--- a/frontend/src/lib/components/NotificationsMenu/notificationToasts.tsx+++ b/frontend/src/lib/components/NotificationsMenu/notificationToasts.tsx@@ -7,6 +7,7 @@ import {IconNotification,IconPieChart,IconPlug,+ IconStar,IconTrending,IconWarning,} from '@posthog/icons'@@ -27,6 +28,7 @@ const NOTIFICATION_TYPE_ICONS: Record<string, JSX.Element> = {project_created: <IconFolder className="size-5 text-primary shrink-0" />,usage_spike: <IconTrending className="size-5 text-warning shrink-0" />,web_analytics_digest: <IconPieChart className="size-5 text-primary shrink-0" />,+ achievement_unlocked: <IconStar className="size-5 text-warning shrink-0" />,}export function getNotificationIcon(notificationType: string): JSX.Element {diff --git a/products/notifications/backend/facade/enums.py b/products/notifications/backend/facade/enums.pyindex 8ecea4c61bae..705bce8ed748 100644--- a/products/notifications/backend/facade/enums.py+++ b/products/notifications/backend/facade/enums.py@@ -16,6 +16,7 @@ class NotificationType(str, Enum):PROJECT_CREATED = "project_created"USAGE_SPIKE = "usage_spike"WEB_ANALYTICS_DIGEST = "web_analytics_digest"+ ACHIEVEMENT_UNLOCKED = "achievement_unlocked"class Priority(str, Enum):diff --git a/products/notifications/backend/migrations/0015_alter_notificationevent_notification_type.py b/products/notifications/backend/migrations/0015_alter_notificationevent_notification_type.pynew file mode 100644index 000000000000..926889c542a4--- /dev/null+++ b/products/notifications/backend/migrations/0015_alter_notificationevent_notification_type.py@@ -0,0 +1,32 @@+# Generated by Django 5.2.14 on 2026-06-16 21:38++from django.db import migrations, models+++class Migration(migrations.Migration):+ dependencies = [+ ("notifications", "0014_alter_notificationevent_notification_type"),+ ]++ operations = [+ migrations.AlterField(+ model_name="notificationevent",+ name="notification_type",+ field=models.CharField(+ choices=[+ ("comment_mention", "COMMENT_MENTION"),+ ("alert_firing", "ALERT_FIRING"),+ ("issue_assigned", "ISSUE_ASSIGNED"),+ ("approval_requested", "APPROVAL_REQUESTED"),+ ("approval_resolved", "APPROVAL_RESOLVED"),+ ("experiment_concluded", "EXPERIMENT_CONCLUDED"),+ ("pipeline_failure", "PIPELINE_FAILURE"),+ ("project_created", "PROJECT_CREATED"),+ ("usage_spike", "USAGE_SPIKE"),+ ("web_analytics_digest", "WEB_ANALYTICS_DIGEST"),+ ("achievement_unlocked", "ACHIEVEMENT_UNLOCKED"),+ ],+ max_length=32,+ ),+ ),+ ]diff --git a/products/notifications/backend/migrations/max_migration.txt b/products/notifications/backend/migrations/max_migration.txtindex 03b894d2199e..a5144865891f 100644--- a/products/notifications/backend/migrations/max_migration.txt+++ b/products/notifications/backend/migrations/max_migration.txt@@ -1 +1 @@-0014_alter_notificationevent_notification_type+0015_alter_notificationevent_notification_type