File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React from "react";
22import { DocsThemeConfig , useConfig } from "nextra-theme-docs" ;
33import { useRouter } from "next/router" ;
44import { GoogleAnalytics } from '@next/third-parties/google'
5+ import Script from "next/script" ;
56
67const config : DocsThemeConfig = {
78 head : ( ) => {
@@ -10,9 +11,23 @@ const config: DocsThemeConfig = {
1011 const defaultDescription = "Documentation for VZN Scripts assets" ;
1112 const url = `https://docs.vzn-scripts.com/${ asPath } ` ;
1213
14+ const googleId = "G-XV58K6R2PX"
15+
1316 return (
1417 < >
15- < GoogleAnalytics gaId = "G-XV58K6R2PX" />
18+ < Script
19+ strategy = 'lazyOnload'
20+ src = { `https://www.googletagmanager.com/gtag/js?id=${ googleId } ` }
21+ />
22+
23+ < Script id = '' strategy = 'lazyOnload' >
24+ { `
25+ window.dataLayer = window.dataLayer || [];
26+ function gtag(){dataLayer.push(arguments);}
27+ gtag('js', new Date());
28+ gtag('config', '${ googleId } ');
29+ ` }
30+ </ Script >
1631 < link rel = "icon" type = "image/png" href = "/logo.png" />
1732
1833 < meta httpEquiv = "Content-Language" content = "en" />
You can’t perform that action at this time.
0 commit comments