Add click tracking on YouTube banner

This commit is contained in:
Kamran Ahmed
2021-09-14 20:34:24 +02:00
parent 69ef7615fe
commit 9a63e576c7
3 changed files with 13 additions and 4 deletions

View File

@@ -13,6 +13,7 @@ import { getAllGuides, GuideType } from '../lib/guide';
import { getAllVideos, VideoType } from '../lib/video';
import siteConfig from '../content/site.json';
import Helmet from '../components/helmet';
import { event } from '../lib/gtag';
type HomeProps = {
roadmaps: RoadmapType[];
@@ -39,6 +40,11 @@ export default function Home(props: HomeProps) {
<Text fontSize={['14px', '14px', '16px']}>We also have a <Link textDecoration={'underline'}
href={siteConfig.url.youtube}
onClick={() => event({
category: 'Subscription',
action: 'Clicked the YouTube link',
label: 'YouTube link on home'
})}
target='_blank'
fontWeight={600}>YouTube
channel</Link> which we hope you are going to love.</Text>