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 || ''; return pathname?.replace(/\//g, ''); } export const CustomAd = () => { const slug = getPageSlug(); if (slug !== 'devops') { return null; } return ( { event({ category: 'SponsorClick', action: `Ambassador EBook Redirect`, label: `Clicked Ambassador EBook Link` }); }} > Custom Logo Free eBook Learn about API Gateways, Microservices, Load Balancing, and more with this free eBook. Partner Content ); };