Skip to content

Commit

Permalink
website: Add Fathom analytics (#11276)
Browse files Browse the repository at this point in the history
* Impl Fathom analytics

* Actually install fathom-client

* Use analytics package instead of direct impl

* Remove explicit fathom-client dep

* Upgrade platform analytics package
  • Loading branch information
EnMod committed Oct 25, 2021
1 parent 4c10d47 commit 8a35232
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
30 changes: 30 additions & 0 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions website/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -21,6 +22,7 @@ const { ConsentManager, openConsentManager } = createConsentManager({
})

export default function App({ Component, pageProps }) {
useFathomAnalytics()
useAnchorLinkAnalytics()

return (
Expand Down

0 comments on commit 8a35232

Please sign in to comment.