mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 15:19:00 +08:00
feat: track channel click event in support page (#4217)
This commit is contained in:
parent
8b1a781f58
commit
221861230a
@ -1,6 +1,7 @@
|
|||||||
import './Support.styles.scss';
|
import './Support.styles.scss';
|
||||||
|
|
||||||
import { Button, Card, Typography } from 'antd';
|
import { Button, Card, Typography } from 'antd';
|
||||||
|
import useAnalytics from 'hooks/analytics/useAnalytics';
|
||||||
import {
|
import {
|
||||||
Book,
|
Book,
|
||||||
Cable,
|
Cable,
|
||||||
@ -82,6 +83,8 @@ const supportChannels = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export default function Support(): JSX.Element {
|
export default function Support(): JSX.Element {
|
||||||
|
const { trackEvent } = useAnalytics();
|
||||||
|
|
||||||
const handleChannelWithRedirects = (url: string): void => {
|
const handleChannelWithRedirects = (url: string): void => {
|
||||||
window.open(url, '_blank');
|
window.open(url, '_blank');
|
||||||
};
|
};
|
||||||
@ -111,6 +114,8 @@ export default function Support(): JSX.Element {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleChannelClick = (channel: Channel): void => {
|
const handleChannelClick = (channel: Channel): void => {
|
||||||
|
trackEvent(`Support : ${channel.name}`);
|
||||||
|
|
||||||
switch (channel.key) {
|
switch (channel.key) {
|
||||||
case channelsMap.documentation:
|
case channelsMap.documentation:
|
||||||
case channelsMap.github:
|
case channelsMap.github:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user