Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

feat(builder): Add google analytics to the project (#7860)

Swifty4c32b46d405a
diff --git a/rnd/autogpt_builder/.env.example b/rnd/autogpt_builder/.env.example
index 0eeef7c2ef..cdf5af6029 100644
--- a/rnd/autogpt_builder/.env.example
+++ b/rnd/autogpt_builder/.env.example
@@ -11,3 +11,4 @@ NEXT_PUBLIC_AGPT_MARKETPLACE_URL=http://localhost:8001/api/v1/market
## This should be {domain}/auth/callback
## Only used if you're using Supabase and OAuth
AUTH_CALLBACK_URL=http://localhost:3000/auth/callback
+GA_MEASUREMENT_ID=G-FH2XK2W4GN
diff --git a/rnd/autogpt_builder/package.json b/rnd/autogpt_builder/package.json
index e63fb977a2..789508868f 100644
--- a/rnd/autogpt_builder/package.json
+++ b/rnd/autogpt_builder/package.json
@@ -11,6 +11,7 @@
},
"dependencies": {
"@hookform/resolvers": "^3.9.0",
+ "@next/third-parties": "^14.2.5",
"@radix-ui/react-avatar": "^1.1.0",
"@radix-ui/react-checkbox": "^1.1.1",
"@radix-ui/react-collapsible": "^1.1.0",
diff --git a/rnd/autogpt_builder/src/app/layout.tsx b/rnd/autogpt_builder/src/app/layout.tsx
index a07d69632a..9873b5dda1 100644
--- a/rnd/autogpt_builder/src/app/layout.tsx
+++ b/rnd/autogpt_builder/src/app/layout.tsx
@@ -7,6 +7,7 @@ import { cn } from "@/lib/utils";
import "./globals.css";
import TallyPopupSimple from "@/components/TallyPopup";
+import { GoogleAnalytics } from "@next/third-parties/google";
const inter = Inter({ subsets: ["latin"] });
@@ -37,6 +38,10 @@ export default function RootLayout({
</div>
</Providers>
</body>
+
+ <GoogleAnalytics
+ gaId={process.env.GA_MEASUREMENT_ID || "G-FH2XK2W4GN"} // This is the measurement Id for the Google Analytics dev project
+ />
</html>
);
}
diff --git a/rnd/autogpt_builder/yarn.lock b/rnd/autogpt_builder/yarn.lock
index 88c385e361..2b98e35ef4 100644
--- a/rnd/autogpt_builder/yarn.lock
+++ b/rnd/autogpt_builder/yarn.lock
@@ -205,6 +205,13 @@
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.4.tgz#e65a1c6539a671f97bb86d5183d6e3a1733c29c7"
integrity sha512-tkLrjBzqFTP8DVrAAQmZelEahfR9OxWpFR++vAI9FBhCiIxtwHwBHC23SBHCTURBtwB4kc/x44imVOnkKGNVGg==
+"@next/third-parties@^14.2.5":
+ version "14.2.5"
+ resolved "https://registry.yarnpkg.com/@next/third-parties/-/third-parties-14.2.5.tgz#7161d266547cabfb61b8af9721f83f8b5463a572"
+ integrity sha512-PDRJm8RZ3rnGNporHKjcdCeZqoW8iJ5uP0clo1Z08TqJiQzuntJ66zrGYCJyqTakx62UJNOp73YsQCFo6kbYYg==
+ dependencies:
+ third-party-capital "1.0.20"
+
"@nodelib/[email protected]":
version "2.1.5"
resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz"
@@ -4415,6 +4422,11 @@ thenify-all@^1.0.0:
dependencies:
any-promise "^1.0.0"
+ version "1.0.20"
+ resolved "https://registry.yarnpkg.com/third-party-capital/-/third-party-capital-1.0.20.tgz#e218a929a35bf4d2245da9addb8ab978d2f41685"
+ integrity sha512-oB7yIimd8SuGptespDAZnNkzIz+NWaJCu2RMsbs4Wmp9zSDUM8Nhi3s2OOcqYuv3mN4hitXc8DVx+LyUmbUDiA==
+
tiny-invariant@^1.3.1:
version "1.3.3"
resolved "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz"