Skip to content

next-google-analytics 5.0.1

Install from the command line:
Learn more about npm packages
$ npm install @eisberg-labs/next-google-analytics@5.0.1
Install via package.json:
"@eisberg-labs/next-google-analytics": "5.0.1"

About this version

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

Details


Assets

  • next-google-analytics-5.0.1.tgz

Download activity

  • Total downloads 14
  • Last 30 days 0
  • Last week 0
  • Today 0