From a6ea7fe6d914b3027b13fdf35b56b30abc2c987f Mon Sep 17 00:00:00 2001 From: Moritz Eckert Date: Fri, 30 Jun 2023 16:00:11 +0200 Subject: [PATCH] docs: add ga and cookie banner --- docs/docusaurus.config.js | 35 ++++++++++++++++++++++++++++++++--- package.json | 5 +++++ 2 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 package.json diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 919071b..95d9ca1 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -21,8 +21,12 @@ async function createConfig() { organizationName: 'Edgeless Systems', // Usually your GitHub org/user name. projectName: 'ego', // Usually your repo name. - // plausible - scripts: [{ src: 'https://plausible.io/js/plausible.js', async: true, defer: true, 'data-domain': 'docs.edgeless.systems' }], + // scripts + scripts: [ + { src: 'https://plausible.io/js/plausible.js', async: true, defer: true, 'data-domain': 'docs.edgeless.systems' }, + { id: "Cookiebot", src: "https://consent.cookiebot.com/uc.js", "data-cbid": "a0cc864f-0b67-49be-8d65-9ed354de2ee6", "data-blockingmode": "auto" }, + { id: "CookieDeclaration", src: "https://consent.cookiebot.com/a0cc864f-0b67-49be-8d65-9ed354de2ee6/cd.js" } + ], // Even if you don't use internalization, you can use this field to set useful // metadata like html lang. For example, if your site is Chinese, you may want @@ -75,6 +79,10 @@ async function createConfig() { theme: { customCss: require.resolve('./src/css/custom.css'), }, + gtag: { + trackingID: 'G-3DVYB2CHLG', + anonymizeIP: true, + } }), ], ], @@ -156,7 +164,7 @@ async function createConfig() { items: [ { label: 'Blog', - to: 'https://blog.edgeless.systems/', + href: 'https://blog.edgeless.systems/', }, { label: 'Twitter', @@ -173,6 +181,27 @@ async function createConfig() { }, ], }, + { + title: 'Company', + items: [ + { + label: 'Imprint', + href: 'https://www.edgeless.systems/imprint', + }, + { + label: 'Privacy Policy', + href: 'https://www.edgeless.systems/privacy', + }, + { + html: `Cookie Settings` + }, + + { + label: 'Contact Us', + href: 'https://www.edgeless.systems/contact/', + }, + ], + }, ], copyright: `Copyright © ${new Date().getFullYear()} Edgeless Systems`, }, diff --git a/package.json b/package.json new file mode 100644 index 0000000..6d73b9c --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@docusaurus/plugin-google-gtag": "^2.4.1" + } +}