5.0.1 • Published 11 months ago

@eisberg-labs/next-google-analytics v5.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Continuous Integration codecov npm downloads npm latest package Average time to resolve an issue Follow me

Next Google Analytics

NextJS React Component for Google analytics 4.

Installation

npm i --save @eisberg-labs/next-google-analytics

Usage

Add this on your page, either in pages/_app.tsx for global access, or if you're using NextJs 13 server components like me, include it in the root layout.

import { GoogleAnalytics } from '@eisberg-labs/next-google-analytics';

export default function MyApp({ Component, pageProps }) {
  return (
    <>
      <GoogleAnalytics trackingId={process.env.NEXT_PUBLIC_ANALYTICS_ID} />
      <Component {...pageProps} />
    </>
  );
}

License

MIT © Eisberg Labs

5.0.1

11 months ago

5.0.0

11 months ago

4.0.2

1 year ago

4.0.0

1 year ago

3.1.0

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

1.1.1

1 year ago