Skip to content

Commit

Permalink
feat: Replace plausible with umami for monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Peek-A-Booo committed Jul 23, 2023
1 parent 2582586 commit 041ed83
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 30 deletions.
1 change: 1 addition & 0 deletions CHANGE_LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Remove sentry
- Temporarily remove prompt market, refactor and go online before next weekend
- Refactor most of the logic related to zustand status, greatly reduce the number of renders, and improve the overall performance.
- Replace plausible with umami for monitoring

## v0.7.4

Expand Down
1 change: 1 addition & 0 deletions CHANGE_LOG.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- 移除 sentry
- 暂时移除 prompt market,下周末之前重构好上线
- 重构 zustand 状态相关的大部分逻辑,极大的减少 render 次数,提升整体性能
- 移除 plausible,替换监控为 umami

## v0.7.4

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"next": "13.4.12",
"next-auth": "4.22.3",
"next-intl": "2.19.0",
"next-plausible": "3.10.1",
"next-themes": "0.2.1",
"nodemailer": "6.9.4",
"postcss": "8.4.27",
Expand Down
15 changes: 0 additions & 15 deletions pnpm-lock.yaml

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

5 changes: 5 additions & 0 deletions src/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ export default async function LocaleLayout({
return (
<html lang={locale} className={inter.className} suppressHydrationWarning>
<Script src="/disableSafariScalable.js" />
<script
async
src={process.env.NEXT_PUBLIC_UMAMI_SCRIPT_URL}
data-website-id={process.env.NEXT_PUBLIC_UMAMI_WEBSITE_ID}
></script>
<body>
<Providers locale={locale} messages={messages}>
<Announcement />
Expand Down
21 changes: 7 additions & 14 deletions src/app/providers.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"use client";

import PlausibleProvider from "next-plausible";
import { SessionProvider } from "next-auth/react";
import { ThemeProvider } from "next-themes";
import { NextIntlClientProvider, type AbstractIntlMessages } from "next-intl";
Expand All @@ -15,18 +14,12 @@ export default function Providers({
messages: AbstractIntlMessages;
}) {
return (
<PlausibleProvider
domain={process.env.NEXT_PUBLIC_PLAUSIBLE_DOMAIN || ""}
selfHosted
customDomain={process.env.NEXT_PUBLIC_PLAUSIBLE_CUSTOM_DOMAIN}
>
<SessionProvider>
<ThemeProvider attribute="class">
<NextIntlClientProvider locale={locale} messages={messages}>
{children}
</NextIntlClientProvider>
</ThemeProvider>
</SessionProvider>
</PlausibleProvider>
<SessionProvider>
<ThemeProvider attribute="class">
<NextIntlClientProvider locale={locale} messages={messages}>
{children}
</NextIntlClientProvider>
</ThemeProvider>
</SessionProvider>
);
}

1 comment on commit 041ed83

@vercel
Copy link

@vercel vercel bot commented on 041ed83 Jul 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.