|
@@ -6,8 +6,10 @@ import * as Layout from 'sentry/components/layouts/thirds';
|
|
import NoProjectMessage from 'sentry/components/noProjectMessage';
|
|
import NoProjectMessage from 'sentry/components/noProjectMessage';
|
|
import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
|
|
import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
|
|
import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
|
|
import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
|
|
|
|
+import type {InsightEventKey} from 'sentry/utils/analytics/insightAnalyticEvents';
|
|
import useOrganization from 'sentry/utils/useOrganization';
|
|
import useOrganization from 'sentry/utils/useOrganization';
|
|
import {NoAccess} from 'sentry/views/insights/common/components/noAccess';
|
|
import {NoAccess} from 'sentry/views/insights/common/components/noAccess';
|
|
|
|
+import {useHasDataTrackAnalytics} from 'sentry/views/insights/common/utils/useHasDataTrackAnalytics';
|
|
import {INSIGHTS_TITLE, MODULE_TITLES} from 'sentry/views/insights/settings';
|
|
import {INSIGHTS_TITLE, MODULE_TITLES} from 'sentry/views/insights/settings';
|
|
import type {ModuleName} from 'sentry/views/insights/types';
|
|
import type {ModuleName} from 'sentry/views/insights/types';
|
|
|
|
|
|
@@ -18,12 +20,21 @@ interface Props {
|
|
children: React.ReactNode;
|
|
children: React.ReactNode;
|
|
features: ComponentProps<typeof Feature>['features'];
|
|
features: ComponentProps<typeof Feature>['features'];
|
|
moduleName: TitleableModuleNames;
|
|
moduleName: TitleableModuleNames;
|
|
|
|
+ analyticEventName?: InsightEventKey;
|
|
pageTitle?: string;
|
|
pageTitle?: string;
|
|
}
|
|
}
|
|
|
|
|
|
-export function ModulePageProviders({moduleName, pageTitle, children, features}: Props) {
|
|
|
|
|
|
+export function ModulePageProviders({
|
|
|
|
+ moduleName,
|
|
|
|
+ pageTitle,
|
|
|
|
+ children,
|
|
|
|
+ features,
|
|
|
|
+ analyticEventName,
|
|
|
|
+}: Props) {
|
|
const organization = useOrganization();
|
|
const organization = useOrganization();
|
|
|
|
|
|
|
|
+ useHasDataTrackAnalytics(moduleName as ModuleName, analyticEventName);
|
|
|
|
+
|
|
const moduleTitle = MODULE_TITLES[moduleName];
|
|
const moduleTitle = MODULE_TITLES[moduleName];
|
|
|
|
|
|
const fullPageTitle = [pageTitle, moduleTitle, INSIGHTS_TITLE]
|
|
const fullPageTitle = [pageTitle, moduleTitle, INSIGHTS_TITLE]
|