Skip to content

Commit

Permalink
u
Browse files Browse the repository at this point in the history
  • Loading branch information
ants-ai committed Jan 19, 2025
1 parent 24fb8fe commit 7b0680d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules
.next
.DS_Store
.docusaurus
.env
23 changes: 23 additions & 0 deletions google-analytics.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import Script from 'next/script'

const GA_MEASUREMENT_ID = process.env.GA_MEASUREMENT_ID // Or use env variable

export default function GoogleAnalytics() {
return (
<>
<Script
src={`https://www.googletagmanager.com/gtag/js?id=${GA_MEASUREMENT_ID}`}
strategy="afterInteractive"
/>
<Script id="google-analytics" strategy="afterInteractive">
{`
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${GA_MEASUREMENT_ID}');
`}
</Script>
</>
)
}
10 changes: 9 additions & 1 deletion theme.config.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { useConfig } from 'nextra-theme-docs'
import { useTheme } from 'next-themes'
import { type DocsThemeConfig } from 'nextra-theme-docs'
import GoogleAnalytics from './google-analytics'



const config: DocsThemeConfig = {
logo: function LogoComponent() {
Expand Down Expand Up @@ -36,16 +39,21 @@ const config: DocsThemeConfig = {
<>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:title" content={title ? title + ' – AntsAI' : 'Ants AI'} />
<meta property="og:description" content="The Intelligent Copilot for Solana" />
<meta property="og:description" content="Bridge the gap between individual agents and collective intelligence" />
</>
)
},
primaryHue: 210,
footer: {
text: (
<>
<span>
{new Date().getFullYear()} © <a href="https://antsai.io" target="_blank">Ants AI</a>
</span>
<GoogleAnalytics />
</>


)
},
darkMode: true,
Expand Down

0 comments on commit 7b0680d

Please sign in to comment.