0.1.5 • Published 10 days ago

@thgh/next-gtm v0.1.5

Weekly downloads
-
License
MIT
Repository
-
Last release
10 days ago

Google Tag Manager for Next.js 13 RSC

Install

yarn add @thgh/next-gtm

Add your GTM ID as an environment variable in .env or .env.local

NEXT_PUBLIC_GTM_ID=GTM-3X4MP7E

Add this snippet in app/layout.tsx

import { GoogleTagManagerBody, GoogleTagManagerHead } from '@thgh/next-gtm'

export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html>
      <head>{GoogleTagManagerHead}</head>
      <body>
        {children}
        {GoogleTagManagerBody}
      </body>
    </html>
  )
}
0.1.5

10 days ago

0.1.4

10 months ago

0.1.3

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago