ℹ️
"This page will be available after 30-04-2024."
"We're adding new information to this page. Check back for updates on Analytics."
Setup
Create a new site on Plausible
(optional) Some adblockers block Plausible. To fix this, proxy the script through the nextjs /api. First add this to next.config.js:
next.config.js
async rewrites() {
return [
{
source: "/plausible/js/script.js",
destination: "https://plausible.io/js/script.js",
},
{
source: "/plausible/api/event",
destination: "https://plausible.io/api/event",
},
];
}
Then replace the Plausible script in the the main layout.js file:
layout.tsx
async rewrites() {
return [
{
source: "/plausible/js/script.js",
destination: "https://plausible.io/js/script.js",
},
{
source: "/plausible/api/event",
destination: "https://plausible.io/api/event",
},
];
}
If you want to use another tool, remove the Plausible script in the layout.js file.