()
| 11 | import { pushGtmEvent } from "@site/src/utils/pushGtmEvent"; |
| 12 | |
| 13 | export default function Home(): JSX.Element { |
| 14 | const componentData = { |
| 15 | title: translate({ |
| 16 | id: "homepage.metaTitle", |
| 17 | message: "About", |
| 18 | description: "The homepage meta title", |
| 19 | }), |
| 20 | description: translate({ |
| 21 | id: "homepage.metaDescription", |
| 22 | message: |
| 23 | "Unified ID (UID) offers cookieless, deterministic identity for advertisers, publishers, data providers and DSPs.", |
| 24 | description: "The homepage meta description", |
| 25 | }), |
| 26 | }; |
| 27 | |
| 28 | // Delayed GTM event to ensure the document has loaded with updated information |
| 29 | React.useEffect(() => { |
| 30 | const timerId = setTimeout(() => { |
| 31 | const pageViewData = { |
| 32 | event: "Initialize_dataLayer", |
| 33 | document_type: "homepage", |
| 34 | document_title: document.title, |
| 35 | article_author: undefined, |
| 36 | tags: undefined, |
| 37 | }; |
| 38 | pushGtmEvent(pageViewData); |
| 39 | }, 50); |
| 40 | |
| 41 | return () => clearTimeout(timerId); |
| 42 | }, []); |
| 43 | |
| 44 | return ( |
| 45 | <Layout title={componentData.title} description={componentData.description}> |
| 46 | <main> |
| 47 | <HomepageHero /> |
| 48 | <HomepagePartnersMarquee /> |
| 49 | <HomepageFeatures /> |
| 50 | <HomepagePartnersSegment /> |
| 51 | <HomepageConsumerBenefit /> |
| 52 | <HomepageCtaStripe /> |
| 53 | <HomepageNews /> |
| 54 | </main> |
| 55 | </Layout> |
| 56 | ); |
| 57 | } |
nothing calls this directly
no test coverage detected