Skip to content

Commit 9fba016

Browse files
committed
Remove Plausible analytics integration (#7525)
# Remove Plausible Analytics Integration This PR removes the Plausible Analytics integration from our applications: - Removed `next-plausible` dependency from the dashboard app - Removed Plausible script tags from dashboard, playground-web, and portal layouts - Removed the Plausible proxy configuration from the Next.js config - Updated the webpack configuration to work without the Plausible proxy wrapper <!-- start pr-codex --> --- ## PR-Codex overview This PR removes the usage of `next-plausible` from various files and updates dependencies accordingly. It also cleans up the code by removing unnecessary `<head>` elements and script imports across multiple layout files. ### Detailed summary - Removed `next-plausible` dependency from `apps/dashboard/package.json`. - Deleted `<Script>` components related to Plausible from `layout.tsx` files in `apps/playground-web`, `apps/dashboard`, and `apps/portal`. - Cleaned up `next.config.ts` by removing `withPlausibleProxy`. - Updated `pnpm-lock.yaml` to reflect the removal of `next-plausible`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Removed Plausible analytics integration and related dependencies from the dashboard. * Removed external script loading from the layouts of the playground-web and portal apps. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 4b8badb commit 9fba016

File tree

6 files changed

+19
-71
lines changed

6 files changed

+19
-71
lines changed

apps/dashboard/next.config.ts

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -208,35 +208,29 @@ function getConfig(): NextConfig {
208208
const withBundleAnalyzer = require("@next/bundle-analyzer")({
209209
enabled: process.env.ANALYZE === "true",
210210
});
211-
// eslint-disable-next-line @typescript-eslint/no-var-requires
212-
const { withPlausibleProxy } = require("next-plausible");
211+
213212
// eslint-disable-next-line @typescript-eslint/no-var-requires
214213
const { withSentryConfig } = require("@sentry/nextjs");
215214
return withBundleAnalyzer(
216-
withPlausibleProxy({
217-
customDomain: "https://pl.thirdweb.com",
218-
scriptName: "pl",
219-
})(
220-
withSentryConfig(
221-
{
222-
...baseNextConfig,
223-
// @ts-expect-error - this is a valid option
224-
webpack: (config) => {
225-
if (config.cache) {
226-
config.cache = Object.freeze({
227-
type: "memory",
228-
});
229-
}
230-
config.module = {
231-
...config.module,
232-
exprContextCritical: false,
233-
};
234-
// Important: return the modified config
235-
return config;
236-
},
215+
withSentryConfig(
216+
{
217+
...baseNextConfig,
218+
// @ts-expect-error - this is a valid option
219+
webpack: (config) => {
220+
if (config.cache) {
221+
config.cache = Object.freeze({
222+
type: "memory",
223+
});
224+
}
225+
config.module = {
226+
...config.module,
227+
exprContextCritical: false,
228+
};
229+
// Important: return the modified config
230+
return config;
237231
},
238-
SENTRY_OPTIONS,
239-
),
232+
},
233+
SENTRY_OPTIONS,
240234
),
241235
);
242236
}

apps/dashboard/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"ipaddr.js": "^2.2.0",
4949
"lucide-react": "0.525.0",
5050
"next": "15.3.5",
51-
"next-plausible": "^3.12.4",
5251
"next-themes": "^0.4.6",
5352
"nextjs-toploader": "^1.6.12",
5453
"nuqs": "^2.4.3",

apps/dashboard/src/app/(app)/layout.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import "../../global.css";
22
import type { Metadata } from "next";
33
import { Inter } from "next/font/google";
4-
import PlausibleProvider from "next-plausible";
54
import NextTopLoader from "nextjs-toploader";
65
import { DashboardRouterTopProgressBar } from "@/lib/DashboardRouter";
76
import { cn } from "@/lib/utils";
@@ -52,14 +51,6 @@ export default function RootLayout({
5251
}) {
5352
return (
5453
<html lang="en" suppressHydrationWarning>
55-
<head>
56-
<PlausibleProvider
57-
customDomain="https://pl.thirdweb.com"
58-
domain="thirdweb.com"
59-
selfHosted
60-
/>
61-
</head>
62-
6354
<body
6455
className={cn("bg-background font-sans antialiased", fontSans.variable)}
6556
>

apps/playground-web/src/app/layout.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { Metadata } from "next";
22
import { Fira_Code, Inter } from "next/font/google";
3-
import Script from "next/script";
43
import { metadataBase } from "@/lib/constants";
54
import { cn } from "@/lib/utils";
65
import { AppSidebar } from "./AppSidebar";
@@ -36,15 +35,6 @@ export default async function RootLayout({
3635
const sidebarLinks = getSidebarLinks();
3736
return (
3837
<html lang="en" suppressHydrationWarning>
39-
<head>
40-
<Script
41-
data-api="https://pl.thirdweb.com/api/event"
42-
data-domain="playground.thirdweb.com"
43-
defer
44-
src="https://thirdweb.com/js/pl.js"
45-
/>
46-
</head>
47-
4838
<body
4939
className={cn(
5040
"bg-background font-sans antialiased ",

apps/portal/src/app/layout.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import "./globals.css";
22
import { Fira_Code, Inter } from "next/font/google";
3-
import Script from "next/script";
43
import { ThemeProvider } from "next-themes";
54
import NextTopLoader from "nextjs-toploader";
65
import { createMetadata } from "@/components/Document";
@@ -34,15 +33,6 @@ export default function RootLayout({
3433
}) {
3534
return (
3635
<html lang="en" suppressHydrationWarning>
37-
<head>
38-
<Script
39-
data-api="https://pl.thirdweb.com/api/event"
40-
data-domain="portal.thirdweb.com"
41-
defer
42-
src="https://thirdweb.com/js/pl.js"
43-
/>
44-
</head>
45-
4636
<body
4737
className={cn(sansFont.variable, monoFont.variable, "font-sans")}
4838
suppressHydrationWarning

pnpm-lock.yaml

Lines changed: 0 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)