mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-18 23:45:54 +08:00
chore: track from which page user visited to support page (#5168)
* chore: track from which page user visited to support page * chore: add safety check * fix: remove the merged_queries label from histogram --------- Co-authored-by: Vikrant Gupta <vikrant.thomso@gmail.com>
This commit is contained in:
parent
a17928df88
commit
cf54b5f9ec
@ -209,7 +209,9 @@ function SideNav({
|
|||||||
if (event && isCtrlMetaKey(event)) {
|
if (event && isCtrlMetaKey(event)) {
|
||||||
openInNewTab(`${key}?${queryString.join('&')}`);
|
openInNewTab(`${key}?${queryString.join('&')}`);
|
||||||
} else {
|
} else {
|
||||||
history.push(`${key}?${queryString.join('&')}`);
|
history.push(`${key}?${queryString.join('&')}`, {
|
||||||
|
from: pathname,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -75,7 +75,7 @@ const getHistogramSeries = ({
|
|||||||
const legend = newLegend || lgd || '';
|
const legend = newLegend || lgd || '';
|
||||||
|
|
||||||
const label = isMergedSeries
|
const label = isMergedSeries
|
||||||
? 'merged_series'
|
? ''
|
||||||
: getLabelName(metric, queryName || '', legend);
|
: getLabelName(metric, queryName || '', legend);
|
||||||
|
|
||||||
const color = generateColor(label, themeColors.chartcolors);
|
const color = generateColor(label, themeColors.chartcolors);
|
||||||
|
@ -70,7 +70,7 @@ const generateTooltipContent = (
|
|||||||
const value = data[index][idx];
|
const value = data[index][idx];
|
||||||
const dataIngested = quantity[idx];
|
const dataIngested = quantity[idx];
|
||||||
const label = isMergedSeries
|
const label = isMergedSeries
|
||||||
? 'merged_series'
|
? ''
|
||||||
: getLabelName(metric, queryName || '', legend || '');
|
: getLabelName(metric, queryName || '', legend || '');
|
||||||
|
|
||||||
let color = generateColor(label, themeColors.chartcolors);
|
let color = generateColor(label, themeColors.chartcolors);
|
||||||
|
@ -10,6 +10,8 @@ import {
|
|||||||
MessageSquare,
|
MessageSquare,
|
||||||
Slack,
|
Slack,
|
||||||
} from 'lucide-react';
|
} from 'lucide-react';
|
||||||
|
import { useEffect } from 'react';
|
||||||
|
import { useHistory } from 'react-router-dom';
|
||||||
|
|
||||||
const { Title, Text } = Typography;
|
const { Title, Text } = Typography;
|
||||||
|
|
||||||
@ -84,11 +86,24 @@ const supportChannels = [
|
|||||||
|
|
||||||
export default function Support(): JSX.Element {
|
export default function Support(): JSX.Element {
|
||||||
const { trackEvent } = useAnalytics();
|
const { trackEvent } = useAnalytics();
|
||||||
|
const history = useHistory();
|
||||||
|
|
||||||
const handleChannelWithRedirects = (url: string): void => {
|
const handleChannelWithRedirects = (url: string): void => {
|
||||||
window.open(url, '_blank');
|
window.open(url, '_blank');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (history?.location?.state) {
|
||||||
|
const histroyState = history?.location?.state as any;
|
||||||
|
|
||||||
|
if (histroyState && histroyState?.from) {
|
||||||
|
trackEvent(`Support : From URL : ${histroyState.from}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
}, []);
|
||||||
|
|
||||||
const handleSlackConnectRequest = (): void => {
|
const handleSlackConnectRequest = (): void => {
|
||||||
const recipient = 'support@signoz.io';
|
const recipient = 'support@signoz.io';
|
||||||
const subject = 'Slack Connect Request';
|
const subject = 'Slack Connect Request';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user