diff --git a/web/src/components/Footer.tsx b/web/src/components/Footer.tsx index 7bddfe3..2387939 100644 --- a/web/src/components/Footer.tsx +++ b/web/src/components/Footer.tsx @@ -2,8 +2,7 @@ import React from 'react'; import styled from 'styled-components'; import {useTranslation} from 'react-i18next'; import {FaTwitter, FaGithub, FaProductHunt} from 'react-icons/fa'; - -import {ExternalLink} from './Links'; +import {OutboundLink} from 'react-ga'; const Footer: React.FC = () => { const {t} = useTranslation(); @@ -30,31 +29,41 @@ const Footer: React.FC = () => { ☕️ {' '} by{' '} - + Yasuaki Uechi - +

- + )}&url=${encodeURIComponent('https://namae.dev')}`} + eventLabel="Tweet" + aria-label="Tweet this page" + target="_blank"> - - + + - - + + - + @@ -98,8 +107,8 @@ const Links = styled.div` display: flex; align-items: center; - ${ExternalLink} { - margin-right: 5px; + a { + margin: 0 3px; } `; diff --git a/web/src/components/Links.tsx b/web/src/components/Links.tsx deleted file mode 100644 index aba7af4..0000000 --- a/web/src/components/Links.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import styled from 'styled-components'; - -export const ExternalLink = styled.a.attrs({ - target: '_blank', - rel: 'noopener noreferrer', -})``; diff --git a/web/src/util/analytics.ts b/web/src/util/analytics.ts index c182eec..e637f2c 100644 --- a/web/src/util/analytics.ts +++ b/web/src/util/analytics.ts @@ -38,7 +38,7 @@ export function trackEvent({ } export function sendQueryEvent(query: string): void { - trackEvent({category: 'Search', action: 'Search New Word', label: query}); + trackEvent({category: 'Search', action: 'Invoke New Search', label: query}); } export function sendGettingStartedEvent(): void {