https://github.com/ricomeetsworld/next-ga
Google Analytics📊 script component for NextJs to avoid recurrent setup in every build.
https://github.com/ricomeetsworld/next-ga
google-analytics google-analytics-4 next nextjs
Last synced: about 1 year ago
JSON representation
Google Analytics📊 script component for NextJs to avoid recurrent setup in every build.
- Host: GitHub
- URL: https://github.com/ricomeetsworld/next-ga
- Owner: ricomeetsworld
- License: mit
- Created: 2022-10-29T09:32:11.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-29T14:38:48.000Z (over 3 years ago)
- Last Synced: 2025-02-12T23:18:13.711Z (over 1 year ago)
- Topics: google-analytics, google-analytics-4, next, nextjs
- Language: TypeScript
- Homepage:
- Size: 727 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nextgas - Next Google Analytics📊
Google Analytics script component for NextJs to avoid recurrent setup in every build.
**How to install**
```
npm i nextgas
```
**How to use**
Grab your measurement ID from the Google Analytics dashboard and plug it into NextGA's mID prop. Use in `_app.tsx` entrypoint file.
```jsx
// app.tsx
import '../styles/globals.css'
import type { AppProps } from 'next/app'
import { NextGA } from 'nextgas'
function MyApp({ Component, pageProps }: AppProps) {
return (
<>
>
)
}
export default MyApp
```