Skip to content

Commit

Permalink
removing ga script and notice from footer, unused. (#162)
Browse files Browse the repository at this point in the history
Co-authored-by: Joe Kendall <[email protected]>
  • Loading branch information
1800joe and software-person authored May 16, 2024
1 parent 56f21a0 commit b287770
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
2 changes: 1 addition & 1 deletion src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@

<div class="pointer-events-none fixed inset-x-0 bottom-0 px-6 pb-6 text-white" id="cookie-consent-modal">
<div class="pointer-events-auto ml-auto max-w-xl rounded-xl bg-gray-600 p-6 shadow-lg">
<p class="text-sm leading-6 text-white">This website uses cookies to collect visitor analytics data (Google Analytics) and provide interactive support through our chat widget (Intercom). See our <a href="/legal/privacy-policy/" class="font-semibold text-white underline">Privacy Policy</a>.</p>
<p class="text-sm leading-6 text-white">This website uses cookies to provide interactive support through our chat widget (Intercom). See our <a href="/legal/privacy-policy/" class="font-semibold text-white underline">Privacy Policy</a>.</p>
<div class="mt-4 flex items-center gap-x-5">
<button type="button" id="accept-cookie-button" class="rounded-md bg-white px-3 py-2 text-xs font-mono uppercase text-black shadow-sm">Accept all</button>
<button type="button" id="reject-cookie-button" class="text-sm leading-6 text-gray-400 underline">Reject all</button>
Expand Down
19 changes: 0 additions & 19 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -373,24 +373,6 @@ const { data = {} } = Astro.props

<script>
// TODO: eventually externalize these scripts so that they can get pulled in across docs and public sites
const gaScript = () => {
const script = document.createElement('script');
script.type = 'text/javascript';
script.async = true;
script.src = 'https://www.googletagmanager.com/gtag/js?id=G-BQFKP55CCM';

const body = document.getElementsByTagName('body')[0];
const scriptLoc = body.getElementsByTagName('script')[0]
body.insertBefore(script, scriptLoc)


window.dataLayer = window.dataLayer || [];
function gtag(){ dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-BQFKP55CCM');
}


const intercomScript = () => {
window.localStorage.removeItem('NOOP_INTERCOM_REDIRECT')

Expand Down Expand Up @@ -436,7 +418,6 @@ const { data = {} } = Astro.props
}

const loadTrackingScripts = () => {
gaScript()
intercomScript()
}

Expand Down

0 comments on commit b287770

Please sign in to comment.