4lejandrito / next-plausible

Simple integration for https://nextjs.org and https://plausible.io analytics
https://next-plausible.vercel.app
MIT License
603 stars 33 forks source link

Changes as of Next.js 14.0.3 break the Plausible script #107

Closed justrealmilk closed 11 months ago

justrealmilk commented 1 year ago

I did the whole check version by version thing and it breaks as of .13. So then I looked and found https://github.com/vercel/next.js/commit/797fecb0c642be9db0d7586bcc54b4a2fe3b7653 and https://github.com/vercel/next.js/pull/58335

tldr both the plausible script and nextjs overwrite the browser api lol

4lejandrito commented 12 months ago

Hi @justrealmilk, thanks for reporting this!

I have tested it and I see the first pageview event is sent properly but subsequent navigations will not trigger new events. Is that what you are seeing?

I think though this is a problem with plausible itself and not with next-plausible since it just includes the official scripts.

justrealmilk commented 12 months ago

That's what I see yes. Why Plausible? Next.js is what changed 🫤

4lejandrito commented 12 months ago

That's what I see yes. Why Plausible? Next.js is what changed 🫤

Well yeah you're right. What I mean is that there is little I can do on next-plausible side to fix this.

Can you report this directly to next?

4lejandrito commented 11 months ago

Same as https://github.com/4lejandrito/next-plausible/issues/114#issuecomment-1837446680?

4lejandrito commented 11 months ago

Fixed in https://github.com/vercel/next.js/releases/tag/v14.0.4-canary.40.