diff --git a/.env.example b/.env.example
index 45c08e7c..7d013d47 100644
--- a/.env.example
+++ b/.env.example
@@ -1,2 +1,4 @@
# SQUID
NEXT_SHIBUYA_GQL_ENDPOINT="http://18.118.77.170:4350/graphql"
+
+NEXT_PUBLIC_GOOGLE_ANALYTICS_ID="G-ID"
diff --git a/package.json b/package.json
index 5c942440..357eae2a 100644
--- a/package.json
+++ b/package.json
@@ -24,6 +24,7 @@
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.14.15",
"@mui/material": "^5.13.5",
+ "@next/third-parties": "^14.1.2",
"@polkadot/api": "^10.8.1",
"@polkadot/api-contract": "^10.8.1",
"@polkadot/react-identicon": "^3.5.1",
@@ -35,7 +36,7 @@
"dexie": "^3.2.4",
"fs-extra": "^11.1.1",
"graphql": "^16.8.0",
- "next": "13.4.4",
+ "next": "^14.1.2",
"nprogress": "^0.2.0",
"pg": "^8.11.3",
"react": "18.2.0",
@@ -68,7 +69,7 @@
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"eslint": "8.42.0",
- "eslint-config-next": "13.4.4",
+ "eslint-config-next": "^14.1.2",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
diff --git a/src/config/app.ts b/src/config/app.ts
index fdfcfe9c..3e7eebd7 100644
--- a/src/config/app.ts
+++ b/src/config/app.ts
@@ -5,3 +5,6 @@ export const IS_DEVELOPMENT =
export const DOCS_URL =
process.env.NEXT_PUBLIC_DOCS_URL || "https://docs.xsigners.io/";
+
+export const ANALYTICS_ID = (process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID ||
+ "") as string;
diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx
index 3f718429..0698bda4 100644
--- a/src/pages/_document.tsx
+++ b/src/pages/_document.tsx
@@ -1,5 +1,8 @@
+import { GoogleAnalytics } from "@next/third-parties/google";
import { DocumentProps, Head, Html, Main, NextScript } from "next/document";
+import { ANALYTICS_ID } from "@/config/app";
+
interface MyDocumentProps extends DocumentProps {
emotionStyleTags: JSX.Element[];
}
@@ -21,6 +24,7 @@ export default function Document({ emotionStyleTags }: MyDocumentProps) {