diff --git a/src/contexts/analytics-context/events/index.js b/src/contexts/analytics-context/events/index.js index c40be85c..6efbc5cb 100644 --- a/src/contexts/analytics-context/events/index.js +++ b/src/contexts/analytics-context/events/index.js @@ -1,5 +1,6 @@ import * as WorkspaceEvents from './workspace-events'; import * as SearchEvents from './search-events'; +import * as SupportEvents from './support-events'; import * as RoutingEvents from './routing-events'; import * as MiscEvents from './misc-events'; @@ -12,6 +13,7 @@ export function AnalyticsEvents(analytics) { ...RoutingEvents, ...WorkspaceEvents, ...SearchEvents, + ...SupportEvents, ...MiscEvents }).map( // Bind each event function to `AnalyticsEvents` to make `this.analytics` available. diff --git a/src/contexts/analytics-context/events/support-events.js b/src/contexts/analytics-context/events/support-events.js new file mode 100644 index 00000000..4b22ac76 --- /dev/null +++ b/src/contexts/analytics-context/events/support-events.js @@ -0,0 +1,6 @@ +export function helpPortalOpened() { + this.analytics.trackEvent({ + category: "ui_interaction", + action: "support_help_portal_open" + }); +} \ No newline at end of file diff --git a/src/views/support.js b/src/views/support.js index e2c7c229..8d7617dd 100644 --- a/src/views/support.js +++ b/src/views/support.js @@ -1,6 +1,6 @@ import { Fragment, useEffect } from 'react' import { Typography } from 'antd' -import { useEnvironment } from '../contexts' +import { useAnalytics, useEnvironment } from '../contexts' import { useTitle } from './' const { Title } = Typography @@ -27,13 +27,26 @@ const Documentation = () => -const HEALSupport = () => +const HEALSupport = () => { + const { analyticsEvents } = useAnalytics() + return ( Need Help?
To report a bug, request technical assistance, submit user feedback, or submit a different request, visit our Help Portal.
@@ -44,11 +57,14 @@ const HEALSupport = () => We encourage you to get started with these introductory materials.
+ ) +} export const SupportView = () => { const { context } = useEnvironment()