Skip to content

Commit

Permalink
add google analytics for docs pages
Browse files Browse the repository at this point in the history
  • Loading branch information
salaxander committed May 21, 2024
1 parent f6fe020 commit ec7736b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions site/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ export default defineConfig({
integrations: [
starlight({
title: "Zarf",
head: [
{
tag: "script",
content: "(function(w,d,s,l,i){ ... })(window,document,'script','dataLayer','G-N1XZ8ZXCWL');",
},
],
components: {
SkipLink: "./src/components/SkipLink.astro",
},
social: {
github: "https://github.com/defenseunicorns/zarf",
slack: "https://kubernetes.slack.com/archives/C03B6BJAUJ3",
Expand Down
18 changes: 18 additions & 0 deletions site/src/components/SkipLink.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
import type { Props } from '@astrojs/starlight/props'
import Default from '@astrojs/starlight/components/SkipLink.astro'
---

<!-- Add the noscript tag for Google Tag Manager. -->
<noscript>
<iframe
src="https://www.googletagmanager.com/gtag/js?id=G-N1XZ8ZXCWL"
height="0"
width="0"
style="display:none;visibility:hidden"
>
</iframe>
</noscript>

<!-- Render the default <SkipLink/> component. -->
<Default {...Astro.props}><slot /></Default>

0 comments on commit ec7736b

Please sign in to comment.