From 882c227ee0ffb884df524c765a8ae7322fbdedbc Mon Sep 17 00:00:00 2001 From: Felarof Date: Mon, 2 Feb 2026 14:01:28 -0800 Subject: [PATCH] feat: added new tab opened metric (#293) --- apps/agent/entrypoints/newtab/index/NewTab.tsx | 2 ++ apps/agent/lib/constants/analyticsEvents.ts | 3 +++ 2 files changed, 5 insertions(+) diff --git a/apps/agent/entrypoints/newtab/index/NewTab.tsx b/apps/agent/entrypoints/newtab/index/NewTab.tsx index 7bf19400..5cd94fb0 100644 --- a/apps/agent/entrypoints/newtab/index/NewTab.tsx +++ b/apps/agent/entrypoints/newtab/index/NewTab.tsx @@ -25,6 +25,7 @@ import { } from '@/lib/chat-actions/types' import { NEWTAB_AI_TRIGGERED_EVENT, + NEWTAB_OPENED_EVENT, NEWTAB_SEARCH_EXECUTED_EVENT, } from '@/lib/constants/analyticsEvents' import { openSidePanelWithSearch } from '@/lib/messaging/sidepanel/openSidepanelWithSearch' @@ -182,6 +183,7 @@ export const NewTab = () => { useEffect(() => { setMounted(true) + track(NEWTAB_OPENED_EVENT) }, []) return ( diff --git a/apps/agent/lib/constants/analyticsEvents.ts b/apps/agent/lib/constants/analyticsEvents.ts index a9d2cf46..471fdd55 100644 --- a/apps/agent/lib/constants/analyticsEvents.ts +++ b/apps/agent/lib/constants/analyticsEvents.ts @@ -71,6 +71,9 @@ export const SCHEDULED_TASK_VIEW_RESULTS_IN_NEWTAB_EVENT = export const SCHEDULED_TASK_VIEW_MORE_IN_NEWTAB_EVENT = 'newtab.scheduled_task.view_more' +/** @public */ +export const NEWTAB_OPENED_EVENT = 'newtab.opened' + /** @public */ export const NEWTAB_AI_TRIGGERED_EVENT = 'newtab.ai.triggered'