feat: add plausible.io script

This commit is contained in:
NunoSempere 2022-03-27 17:19:06 -04:00
parent 1ac56a3ee6
commit 698a11c28f
3 changed files with 32 additions and 5 deletions

20
package-lock.json generated
View File

@ -34,6 +34,7 @@
"mongodb": "^3.6.6",
"multiselect-react-dropdown": "^2.0.17",
"next": "12",
"next-plausible": "^3.1.6",
"nprogress": "^0.2.0",
"open": "^7.3.1",
"papaparse": "^5.3.0",
@ -32010,6 +32011,19 @@
}
}
},
"node_modules/next-plausible": {
"version": "3.1.6",
"resolved": "https://registry.npmjs.org/next-plausible/-/next-plausible-3.1.6.tgz",
"integrity": "sha512-9L1l3f59122IBNjVDqZEE2y5kA/a8rk3xYqWWfHH9LLxtWw6hqiL43RQGT7xYjHofGdn+RX3WTVRGIv0Iq/wKA==",
"funding": {
"url": "https://github.com/4lejandrito/next-plausible?sponsor=1"
},
"peerDependencies": {
"next": "^11.1.0 || ^12.0.0",
"react": "^16.8.0 || ^17.0.0",
"react-dom": "^16.8.0 || ^17.0.0"
}
},
"node_modules/next/node_modules/postcss": {
"version": "8.4.5",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.5.tgz",
@ -58788,6 +58802,12 @@
}
}
},
"next-plausible": {
"version": "3.1.6",
"resolved": "https://registry.npmjs.org/next-plausible/-/next-plausible-3.1.6.tgz",
"integrity": "sha512-9L1l3f59122IBNjVDqZEE2y5kA/a8rk3xYqWWfHH9LLxtWw6hqiL43RQGT7xYjHofGdn+RX3WTVRGIv0Iq/wKA==",
"requires": {}
},
"node-abi": {
"version": "3.8.0",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.8.0.tgz",

View File

@ -52,6 +52,7 @@
"mongodb": "^3.6.6",
"multiselect-react-dropdown": "^2.0.17",
"next": "12",
"next-plausible": "^3.1.6",
"nprogress": "^0.2.0",
"open": "^7.3.1",
"papaparse": "^5.3.0",

View File

@ -1,8 +1,10 @@
import 'nprogress/nprogress.css';
import '../styles/main.css';
import "nprogress/nprogress.css";
import "../styles/main.css";
import Router from 'next/router';
import NProgress from 'nprogress';
import Router from "next/router";
import NProgress from "nprogress";
import PlausibleProvider from "next-plausible";
Router.events.on("routeChangeStart", (as, { shallow }) => {
console.log(shallow);
@ -14,7 +16,11 @@ Router.events.on("routeChangeComplete", () => NProgress.done());
Router.events.on("routeChangeError", () => NProgress.done());
function MyApp({ Component, pageProps }) {
return <Component {...pageProps} />;
return (
<PlausibleProvider domain="metaforecast.org">
<Component {...pageProps} />
</PlausibleProvider>
);
}
export default MyApp;