From 9e6b2e4aa85546a83ffed15c7c17a18f1320ad98 Mon Sep 17 00:00:00 2001 From: Dave Hagen Date: Tue, 19 Nov 2024 13:06:15 -0800 Subject: [PATCH] W-17274770 add cookie manager and links --- website/_analytics.js | 18 ++++++++++++++++++ website/docusaurus.config.js | 26 ++++++++++++++++++++++---- 2 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 website/_analytics.js diff --git a/website/_analytics.js b/website/_analytics.js new file mode 100644 index 0000000..b32b6de --- /dev/null +++ b/website/_analytics.js @@ -0,0 +1,18 @@ +import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; + +if (ExecutionEnvironment.canUseDOM) { + + // OptanonConsentNoticeStart + + const script = document.createElement('script'); + + script.src = 'https://cdn.cookielaw.org/scripttemplates/otSDKStub.js'; + script.type = 'text/javascript'; + script.setAttribute('data-domain-script', '019321c1-4b7e-7313-9372-ddbd938f50ea') + script.innerHTML="function OptanonWrapper() { }"; + + document.getElementsByTagName('head')[0].appendChild(script); + + // OptanonConsentNoticeStart --> + +} \ No newline at end of file diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 3202a21..909c55f 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -178,11 +178,26 @@ const getConfig = async () => { items: [ { label: 'Legal', - href: 'https://www.tableau.com/en-us/legal', + href: 'https://www.salesforce.com/company/legal/', }, { - label: 'Privacy', - href: 'https://www.salesforce.com/company/privacy/' + label: 'Terms of Service', + href: 'https://www.salesforce.com/company/legal/sfdc-website-terms-of-service/', + }, + { + label: 'Privacy', + href: 'https://www.salesforce.com/company/privacy/' + }, + { + label: 'Responsible Disclosure', + href: 'https://www.salesforce.com/company/legal/disclosure/', + }, + { + label: 'Trust', + href: 'https://trust.salesforce.com/', + }, + { + html: `Cookie Preferences`, } ] @@ -285,7 +300,10 @@ const getConfig = async () => { // ``` }), ], - ] + ], + clientModules: [ + require.resolve('./_analytics.js'), + ], }; }