Skip to content

Commit

Permalink
@gus W-17274770 Add OneTrust Cookie Manager; update GA4 ID (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
d45 authored Jan 15, 2025
1 parent cf5284e commit a9ddb41
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 5 deletions.
18 changes: 18 additions & 0 deletions website/_analytics.js
Original file line number Diff line number Diff line change
@@ -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 -->

}
28 changes: 23 additions & 5 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,28 @@ const getConfig = async () => {
items: [
{
label: 'Legal',
href: 'https://www.tableau.com/en-us/legal',
href: 'https://www.salesforce.com/company/legal/',
},
{
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: `<a href="#" data-ignore-geolocation="true" class="optanon-toggle-display" style="color:#FFFFFF">Cookie Preferences</a>`,
}
]
},
],
copyright: `Copyright © ${new Date().getFullYear()} Salesforce, Inc. Built with Docusaurus.`,
Expand All @@ -167,11 +181,15 @@ const getConfig = async () => {
[
'@docusaurus/plugin-google-gtag',
{
trackingID: 'UA-625217-51',
trackingID: '469571326',
anonymizeIP: true,
},
],
],

clientModules: [
require.resolve('./_analytics.js'),
],
};
}

Expand Down

0 comments on commit a9ddb41

Please sign in to comment.