Skip to content

Commit

Permalink
Revert "fix: rollback GA4 install code (#194)"
Browse files Browse the repository at this point in the history
This reverts commit e275c03.
  • Loading branch information
PaiJi committed Jun 13, 2024
1 parent e275c03 commit 8eee9c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { Noto_Sans_SC, Rubik } from "next/font/google";
import { GoogleAnalytics } from "@next/third-parties/google";

import Layout from "@/components/layout";

import "@/styles/globals.css";
import type { AppProps } from "next/app";
import { isEnableTrack } from "./_document";

const notoSC = Noto_Sans_SC({
weight: ["400", "500", "700"],
Expand Down Expand Up @@ -34,6 +36,7 @@ export default function App({ Component, pageProps }: AppProps) {
>
<Component {...pageProps} />
</Layout>
{isEnableTrack && <GoogleAnalytics gaId="G-RBND7XQ43D" />}
</>
);
}
2 changes: 0 additions & 2 deletions src/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { GoogleAnalytics } from "@next/third-parties/google";
import { Html, Head, Main, NextScript } from "next/document";
import Script from "next/script";

Expand Down Expand Up @@ -58,7 +57,6 @@ export default function Document() {
`}
</Script>
)}
{isEnableTrack && <GoogleAnalytics gaId="G-RBND7XQ43D" />}
</body>
</Html>
);
Expand Down

0 comments on commit 8eee9c4

Please sign in to comment.