diff --git a/components/custom-ad.tsx b/components/custom-ad.tsx index 911c45c66..b88912280 100644 --- a/components/custom-ad.tsx +++ b/components/custom-ad.tsx @@ -1,4 +1,5 @@ import { Box, Flex, Heading, Image, Link } from '@chakra-ui/react'; +import { event } from '../lib/gtag'; function getPageSlug() { const pathname = (typeof window !== 'undefined' ? window : {} as any)?.location?.pathname || ''; @@ -13,8 +14,28 @@ export const CustomAd = () => { } return ( - + { + event({ + category: 'SponsorClick', + action: `TNS EBook Redirect`, + label: `Clicked TNS EBook Link` + }); + }} + >