website: Add Demandbase tag to consent manager (#12663)

* chore: Add Demandbase tag to consent manager

* fix: Add services to manager options
This commit is contained in:
Noel Quiles 2022-01-28 12:14:01 -05:00 committed by GitHub
parent cd3de45b8d
commit d0f4786a14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,15 @@
import { ConsentManagerService } from '@hashicorp/react-consent-manager/types'
const localConsentManagerServices: ConsentManagerService[] = [
{
name: 'Demandbase Tag',
description:
'The Demandbase tag is a tracking service to identify website visitors and measure interest on our website.',
category: 'Analytics',
url: 'https://tag.demandbase.com/960ab0a0f20fb102.min.js',
async: true,
},
]
export default localConsentManagerServices

View File

@ -5,6 +5,7 @@ import Min100Layout from '@hashicorp/react-min-100-layout'
import NProgress from '@hashicorp/platform-util/nprogress'
import usePageviewAnalytics from '@hashicorp/platform-analytics'
import createConsentManager from '@hashicorp/react-consent-manager/loader'
import localConsentManagerServices from 'lib/consent-manager-services'
import useAnchorLinkAnalytics from '@hashicorp/platform-util/anchor-link-analytics'
import Router from 'next/router'
import HashiHead from '@hashicorp/react-head'
@ -20,6 +21,7 @@ import alertBannerData, { ALERT_BANNER_ACTIVE } from 'data/alert-banner'
NProgress({ Router })
const { ConsentManager, openConsentManager } = createConsentManager({
preset: 'oss',
otherServices: [...localConsentManagerServices],
})
export default function App({ Component, pageProps }) {