Socket
Socket
Sign inDemoInstall

@eisberg-labs/next-google-analytics

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @eisberg-labs/next-google-analytics

NextJS React Component for Google analytics 4.


Version published
Weekly downloads
13
decreased by-27.78%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

5.0.1 (2023-06-18)

Bug Fixes

  • setup multi publish (d0b8b19)

Features

  • migrate next-google-analytics (734c19e)

BREAKING CHANGES

  • ga_id is trackingId, supports google analytics 4

Readme

Source

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

Keywords

FAQs

Last updated on 18 Jun 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc