Skip to content

Commit

Permalink
📈 nltx: integrate google analytics by @next/third-parties
Browse files Browse the repository at this point in the history
  • Loading branch information
Bear29ers committed Jul 4, 2024
1 parent 3ca25a8 commit 8a70cd7
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 50 deletions.
18 changes: 18 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"prepare": "husky"
},
"dependencies": {
"@next/third-parties": "^14.2.4",
"@popmotion/popcorn": "^0.4.4",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.1",
Expand Down
8 changes: 3 additions & 5 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { ReactNode } from 'react';

import Menu from '@/components/common/Menu/Menu';
import { GoogleAnalytics } from '@next/third-parties/google';

import GoogleAnalytics from '@/libs/ga/GoogleAnalytics';
import Menu from '@/components/common/Menu/Menu';

import { montserrat } from '@/styles/fonts';

Expand All @@ -23,13 +23,11 @@ const RootLayout = ({
}>) => {
return (
<html lang="en">
<head>
<GoogleAnalytics />
</head>
<body
className={`${montserrat.variable} relative size-full overscroll-y-none bg-dark bg-noise-pattern bg-auto bg-center bg-repeat font-mont`}>
<Menu />
{children}
<GoogleAnalytics gaId={process.env.GA_ID ?? ''} />
</body>
</html>
);
Expand Down
38 changes: 0 additions & 38 deletions src/libs/ga/GoogleAnalytics.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions src/libs/ga/gtag.ts

This file was deleted.

0 comments on commit 8a70cd7

Please sign in to comment.