Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plausible not detected on website - 404 script error #85

Open
jtiulentino opened this issue Feb 1, 2023 · 2 comments
Open

Plausible not detected on website - 404 script error #85

jtiulentino opened this issue Feb 1, 2023 · 2 comments

Comments

@jtiulentino
Copy link

Hi, we're new to using next-plausible and just installed v3.7.1.

We followed the instructions here for our _app.js file:

<PlausibleProvider domain="domain.com" enabled={true}>
    <Component {...pageProps} />
</PlausibleProvider>

We're using next dev to run both locally and in prod.

We're getting this error in the browser console, both locally and in prod:
Screenshot 2023-02-01 at 15 40 09

Any pointers you have would be appreciated! We also followed the Troubleshooting guide in the Plausible docs but got stuck there as well.

@4lejandrito
Copy link
Owner

Hi @jtiulentino!

Can you please paste your next.config.js file?

@jtiulentino
Copy link
Author

sure thing!

const { withPlausibleProxy } = require("next-plausible");

/** @type {import('next').NextConfig} */
const nextConfig = {
    reactStrictMode: true,
    swcMinify: true,
    webpack: (config, { isServer }) => {
        if (isServer) {
            require("./sitemap-utils/generate-sitemap");
        }
        return config;
    },
    images: {
        domains: [
            "storage.googleapis.com",
            "cdn.sanity.io",
            "***.supabase.co",
        ],
    },
    experimental: {
        fontLoaders: [{ loader: "@next/font/google", options: { subsets: ["latin"] } }],
    },
};

module.exports = withPlausibleProxy()(nextConfig);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants