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

Consider referencing `head.js` pattern for Next.js appDir installations #84

Closed timfee closed 1 year ago

timfee commented 1 year ago

You may want to update installation instructions given the newest guidance at https://beta.nextjs.org/docs/api-reference/file-conventions/head

I was able to get my instance working using:


// head.tsx
import PlausibleProvider from 'next-plausible'

export default function Head() {
  return (
    <>
      <meta charSet="utf-8" />
      {/* snip */}
      <PlausibleProvider domain="foobar.com" taggedEvents />
    </>
  )
}
4lejandrito commented 1 year ago

Hi @timfee! Makes sense. I'll do when I have time. You can also send a PR if you want 🙂.

Thanks!!

timfee commented 1 year ago

Closing as head.js is deprecated