Skip to content

Commit

Permalink
feat: track channel click event in support page (SigNoz#4217)
Browse files Browse the repository at this point in the history
  • Loading branch information
YounixM authored Dec 12, 2023
1 parent 8b1a781 commit 2218612
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/src/pages/Support/Support.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import './Support.styles.scss';

import { Button, Card, Typography } from 'antd';
import useAnalytics from 'hooks/analytics/useAnalytics';
import {
Book,
Cable,
Expand Down Expand Up @@ -82,6 +83,8 @@ const supportChannels = [
];

export default function Support(): JSX.Element {
const { trackEvent } = useAnalytics();

const handleChannelWithRedirects = (url: string): void => {
window.open(url, '_blank');
};
Expand Down Expand Up @@ -111,6 +114,8 @@ export default function Support(): JSX.Element {
};

const handleChannelClick = (channel: Channel): void => {
trackEvent(`Support : ${channel.name}`);

switch (channel.key) {
case channelsMap.documentation:
case channelsMap.github:
Expand Down

0 comments on commit 2218612

Please sign in to comment.