feat: add plausible.io script
This commit is contained in:
parent
1ac56a3ee6
commit
698a11c28f
20
package-lock.json
generated
20
package-lock.json
generated
|
@ -34,6 +34,7 @@
|
||||||
"mongodb": "^3.6.6",
|
"mongodb": "^3.6.6",
|
||||||
"multiselect-react-dropdown": "^2.0.17",
|
"multiselect-react-dropdown": "^2.0.17",
|
||||||
"next": "12",
|
"next": "12",
|
||||||
|
"next-plausible": "^3.1.6",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"open": "^7.3.1",
|
"open": "^7.3.1",
|
||||||
"papaparse": "^5.3.0",
|
"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": {
|
"node_modules/next/node_modules/postcss": {
|
||||||
"version": "8.4.5",
|
"version": "8.4.5",
|
||||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.5.tgz",
|
"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": {
|
"node-abi": {
|
||||||
"version": "3.8.0",
|
"version": "3.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.8.0.tgz",
|
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.8.0.tgz",
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
"mongodb": "^3.6.6",
|
"mongodb": "^3.6.6",
|
||||||
"multiselect-react-dropdown": "^2.0.17",
|
"multiselect-react-dropdown": "^2.0.17",
|
||||||
"next": "12",
|
"next": "12",
|
||||||
|
"next-plausible": "^3.1.6",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"open": "^7.3.1",
|
"open": "^7.3.1",
|
||||||
"papaparse": "^5.3.0",
|
"papaparse": "^5.3.0",
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
import 'nprogress/nprogress.css';
|
import "nprogress/nprogress.css";
|
||||||
import '../styles/main.css';
|
import "../styles/main.css";
|
||||||
|
|
||||||
import Router from 'next/router';
|
import Router from "next/router";
|
||||||
import NProgress from 'nprogress';
|
import NProgress from "nprogress";
|
||||||
|
|
||||||
|
import PlausibleProvider from "next-plausible";
|
||||||
|
|
||||||
Router.events.on("routeChangeStart", (as, { shallow }) => {
|
Router.events.on("routeChangeStart", (as, { shallow }) => {
|
||||||
console.log(shallow);
|
console.log(shallow);
|
||||||
|
@ -14,7 +16,11 @@ Router.events.on("routeChangeComplete", () => NProgress.done());
|
||||||
Router.events.on("routeChangeError", () => NProgress.done());
|
Router.events.on("routeChangeError", () => NProgress.done());
|
||||||
|
|
||||||
function MyApp({ Component, pageProps }) {
|
function MyApp({ Component, pageProps }) {
|
||||||
return <Component {...pageProps} />;
|
return (
|
||||||
|
<PlausibleProvider domain="metaforecast.org">
|
||||||
|
<Component {...pageProps} />
|
||||||
|
</PlausibleProvider>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default MyApp;
|
export default MyApp;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user