mirror of
https://github.com/uetchy/namae.git
synced 2025-03-17 04:30:31 +09:00
fix: event name
This commit is contained in:
parent
095895f7cf
commit
7a1d8c738f
@ -23,7 +23,7 @@ import {DiRust, DiHeroku} from 'react-icons/di';
|
||||
|
||||
import {SpectrumIcon, NowIcon, NetlifyIcon, OcamlIcon} from './Icons';
|
||||
import {mobile} from '../util/css';
|
||||
import {sendExampleQueryEvent} from '../util/analytics';
|
||||
import {sendGettingStartedEvent} from '../util/analytics';
|
||||
|
||||
const Welcome: React.FC = () => {
|
||||
const {t} = useTranslation();
|
||||
@ -36,9 +36,7 @@ const Welcome: React.FC = () => {
|
||||
<ButtonContainer>
|
||||
<List>
|
||||
<ListButton>
|
||||
<Link
|
||||
to="/s/namae"
|
||||
onClick={() => sendExampleQueryEvent('namae')}>
|
||||
<Link to="/s/namae" onClick={() => sendGettingStartedEvent()}>
|
||||
{t('gettingStarted')}
|
||||
</Link>
|
||||
</ListButton>
|
||||
|
@ -38,23 +38,23 @@ export function trackEvent({
|
||||
}
|
||||
|
||||
export function sendQueryEvent(query: string): void {
|
||||
trackEvent({category: 'Search', action: 'search', label: query});
|
||||
trackEvent({category: 'Search', action: 'Search New Word', label: query});
|
||||
}
|
||||
|
||||
export function sendExampleQueryEvent(query: string): void {
|
||||
trackEvent({category: 'Search', action: 'tryExampleQuery', label: query});
|
||||
export function sendGettingStartedEvent(): void {
|
||||
trackEvent({category: 'Search', action: 'Getting Started'});
|
||||
}
|
||||
|
||||
export function sendExpandEvent(): void {
|
||||
trackEvent({category: 'Result', action: 'expand'});
|
||||
trackEvent({category: 'Result', action: 'Expand Card'});
|
||||
}
|
||||
|
||||
export function sendAcceptSuggestionEvent(): void {
|
||||
trackEvent({category: 'Suggestion', action: 'accept'});
|
||||
trackEvent({category: 'Suggestion', action: 'Accept'});
|
||||
}
|
||||
|
||||
export function sendShuffleSuggestionEvent(): void {
|
||||
trackEvent({category: 'Suggestion', action: 'shuffle'});
|
||||
trackEvent({category: 'Suggestion', action: 'Shuffle'});
|
||||
}
|
||||
|
||||
export function initSentry(): void {
|
||||
|
Loading…
x
Reference in New Issue
Block a user