Skip to content

Commit

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

* Proper Fathom site ID (and prettier edits)

* Use analytics package instead of direct impl

* Upgrade platform analytics package
  • Loading branch information
EnMod authored Oct 28, 2021
1 parent 94feb93 commit 3ca6705
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 8 deletions.
48 changes: 48 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 @@ -6,6 +6,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-markdown-utils": "^0.1.3",
"@hashicorp/platform-runtime-error-monitoring": "^0.1.0",
Expand Down
14 changes: 6 additions & 8 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 { ErrorBoundary } from '@hashicorp/platform-runtime-error-monitoring'
import createConsentManager from '@hashicorp/react-consent-manager/loader'
import NProgress from '@hashicorp/platform-util/nprogress'
import useFathomAnalytics from '@hashicorp/platform-analytics'
import useAnchorLinkAnalytics from '@hashicorp/platform-util/anchor-link-analytics'
import HashiHead from '@hashicorp/react-head'
import ProductSubnav from 'components/subnav'
Expand All @@ -21,6 +22,7 @@ const { ConsentManager, openConsentManager } = createConsentManager({
})

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

return (
Expand All @@ -33,26 +35,22 @@ export default function App({ Component, pageProps }) {
image="https://www.vaultproject.io/img/og-image.png"
icon={[
{
href:
'https://www.datocms-assets.com/2885/1597163356-vault-favicon.png?h=16&w=16',
href: 'https://www.datocms-assets.com/2885/1597163356-vault-favicon.png?h=16&w=16',
type: 'image/png',
sizes: '16x16',
},
{
href:
'https://www.datocms-assets.com/2885/1597163356-vault-favicon.png?h=32&w=32',
href: 'https://www.datocms-assets.com/2885/1597163356-vault-favicon.png?h=32&w=32',
type: 'image/png',
sizes: '32x32',
},
{
href:
'https://www.datocms-assets.com/2885/1597163356-vault-favicon.png?h=96&w=96',
href: 'https://www.datocms-assets.com/2885/1597163356-vault-favicon.png?h=96&w=96',
type: 'image/png',
sizes: '96x96',
},
{
href:
'https://www.datocms-assets.com/2885/1597163356-vault-favicon.png?h=192&w=192',
href: 'https://www.datocms-assets.com/2885/1597163356-vault-favicon.png?h=192&w=192',
type: 'image/png',
sizes: '192x192',
},
Expand Down

0 comments on commit 3ca6705

Please sign in to comment.