Skip to content
This repository was archived by the owner on Dec 26, 2023. It is now read-only.

Commit 41785f7

Browse files
committed
chore: add plausible.io analytics
1 parent d745b50 commit 41785f7

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

frontend/next.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
const { withPlausibleProxy } = require('next-plausible');
12
const { i18n } = require('./next-i18next.config');
23

3-
module.exports = {
4+
module.exports = withPlausibleProxy({
45
i18n,
5-
};
6+
});

frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"jest": "^27.2.0",
2121
"next": "^11.1.2",
2222
"next-i18next": "^8.8.0",
23+
"next-plausible": "^3.1.4",
2324
"react": "^17.0.2",
2425
"react-confetti": "^6.0.1",
2526
"react-dom": "^17.0.2",

frontend/src/pages/_app.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { AppProps } from 'next/app';
99

1010
import { DEVELOPER_DAO_WEBSITE } from '../utils/DeveloperDaoConstants';
1111
import { theme } from '../theme';
12+
import PlausibleProvider from 'next-plausible';
1213

1314
const socialBanner = `${DEVELOPER_DAO_WEBSITE}/social-banner.png`;
1415

@@ -134,9 +135,11 @@ user's mobile device or desktop. See https://developers.google.com/web/fundament
134135
const App = ({ Component, pageProps }: AppProps) => (
135136
<>
136137
<SEO />
137-
<ChakraProvider theme={theme}>
138-
<Component {...pageProps} />
139-
</ChakraProvider>
138+
<PlausibleProvider domain="developerdao.com">
139+
<ChakraProvider theme={theme}>
140+
<Component {...pageProps} />
141+
</ChakraProvider>
142+
</PlausibleProvider>
140143
</>
141144
);
142145

frontend/yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7494,6 +7494,11 @@ next-i18next@^8.8.0:
74947494
i18next-fs-backend "^1.0.7"
74957495
react-i18next "^11.8.13"
74967496

7497+
next-plausible@^3.1.4:
7498+
version "3.1.4"
7499+
resolved "https://registry.yarnpkg.com/next-plausible/-/next-plausible-3.1.4.tgz#a386ff4e2327995cb4a1307e53e1b4af70817b52"
7500+
integrity sha512-NMLKJ0AKlKuvYU//RytyqSES5NtLRoH/ym3fCC02w2Ed1SrTgNRUrgpxyJrcguY/DYGPncQ3a0/nQ358vUTAwQ==
7501+
74977502
next-tick@~1.0.0:
74987503
version "1.0.0"
74997504
resolved "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz"

0 commit comments

Comments
 (0)