0.7.0 • Published 2 days ago

next-google-analytics v0.7.0

Weekly downloads
30
License
MIT
Repository
-
Last release
2 days ago

next-google-analytics

Add Google Analytics to your Next.js App in 60 seconds.

Usage

Set environment variable NEXT_PUBLIC_GA_MEASUREMENT_ID to your Google Analytics tracking id.

yarn add next-google-analytics

pages/_app.tsx:

+ import * as GoogleAnalytics from 'next-google-analytics';

  const App = (...) => {
+   GoogleAnalytics.useAppInit();
    ...
  };

+ export { reportWebVitals } from 'next-google-analytics';

pages/_document.tsx

+ import * as GoogleAnalytics from 'next-google-analytics';

  <Html lang="en">
    <Head>
+     <GoogleAnalytics.Head />
      ...
    </Head>
    ...
  </Html>
0.7.0

2 days ago

0.6.0

2 years ago

0.5.0

2 years ago

0.4.0

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago