diff --git a/website/package-lock.json b/website/package-lock.json index 6605337fe..a21076d8e 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "@hashicorp/mktg-global-styles": "^4.0.0", "@hashicorp/mktg-logos": "^1.2.0", + "@hashicorp/platform-analytics": "^0.2.0", "@hashicorp/platform-code-highlighting": "^0.1.2", "@hashicorp/platform-runtime-error-monitoring": "^0.1.0", "@hashicorp/platform-util": "^0.1.0", @@ -961,6 +962,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@hashicorp/platform-analytics": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@hashicorp/platform-analytics/-/platform-analytics-0.2.0.tgz", + "integrity": "sha512-4Pmb4Fy/2eDCZPFu/O4wKK2L5VIqwsXfDPDGX3eA4Dk67ytZ//SXuW9oFtG97ACyW/p1i72EmwoqcrR6usDwtg==", + "dependencies": { + "fathom-client": "^3.2.0" + }, + "peerDependencies": { + "react": ">= 16.x" + } + }, "node_modules/@hashicorp/platform-cli": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@hashicorp/platform-cli/-/platform-cli-1.2.0.tgz", @@ -8001,6 +8013,11 @@ "reusify": "^1.0.4" } }, + "node_modules/fathom-client": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fathom-client/-/fathom-client-3.2.0.tgz", + "integrity": "sha512-WF/qA5wXYSuA5K8uiIhGNbErOcTAmfLEWrBxWP2px2dEc9waH9zxjdh9k0F907VCBhdJrv+f7V3HT/Pmro40zA==" + }, "node_modules/fd-slicer": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", @@ -19764,6 +19781,14 @@ } } }, + "@hashicorp/platform-analytics": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@hashicorp/platform-analytics/-/platform-analytics-0.2.0.tgz", + "integrity": "sha512-4Pmb4Fy/2eDCZPFu/O4wKK2L5VIqwsXfDPDGX3eA4Dk67ytZ//SXuW9oFtG97ACyW/p1i72EmwoqcrR6usDwtg==", + "requires": { + "fathom-client": "^3.2.0" + } + }, "@hashicorp/platform-cli": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@hashicorp/platform-cli/-/platform-cli-1.2.0.tgz", @@ -25348,6 +25373,11 @@ "reusify": "^1.0.4" } }, + "fathom-client": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fathom-client/-/fathom-client-3.2.0.tgz", + "integrity": "sha512-WF/qA5wXYSuA5K8uiIhGNbErOcTAmfLEWrBxWP2px2dEc9waH9zxjdh9k0F907VCBhdJrv+f7V3HT/Pmro40zA==" + }, "fd-slicer": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", diff --git a/website/package.json b/website/package.json index 52beeca70..8c318593d 100644 --- a/website/package.json +++ b/website/package.json @@ -10,6 +10,7 @@ "dependencies": { "@hashicorp/mktg-global-styles": "^4.0.0", "@hashicorp/mktg-logos": "^1.2.0", + "@hashicorp/platform-analytics": "^0.2.0", "@hashicorp/platform-code-highlighting": "^0.1.2", "@hashicorp/platform-runtime-error-monitoring": "^0.1.0", "@hashicorp/platform-util": "^0.1.0", diff --git a/website/pages/_app.js b/website/pages/_app.js index 0239bba24..fc7707aac 100644 --- a/website/pages/_app.js +++ b/website/pages/_app.js @@ -6,6 +6,7 @@ import Head from 'next/head' import NProgress from '@hashicorp/platform-util/nprogress' import { ErrorBoundary } from '@hashicorp/platform-runtime-error-monitoring' import createConsentManager from '@hashicorp/react-consent-manager/loader' +import useFathomAnalytics from '@hashicorp/platform-analytics' import useAnchorLinkAnalytics from '@hashicorp/platform-util/anchor-link-analytics' import HashiStackMenu from '@hashicorp/react-hashi-stack-menu' import AlertBanner from '@hashicorp/react-alert-banner' @@ -21,6 +22,7 @@ const { ConsentManager, openConsentManager } = createConsentManager({ }) export default function App({ Component, pageProps }) { + useFathomAnalytics() useAnchorLinkAnalytics() return (