{"_id":"@bradgarropy/next-google-analytics","_rev":"3-ca86b80966b2d03ba0c712e8fc783ee0","name":"@bradgarropy/next-google-analytics","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@bradgarropy/next-google-analytics","version":"1.0.0","description":"📊 google analytics for next.js","keywords":["typescript","react","next","eslint","prettier","jest","google","google-analytics"],"homepage":"https://github.com/bradgarropy/next-google-analytics","bugs":{"url":"https://github.com/bradgarropy/next-google-analytics/issues"},"license":"MIT","author":{"name":"Brad Garropy","email":"bradgarropy@gmail.com","url":"https://bradgarropy.com"},"main":"dist/index.js","types":"dist/types/index.d.ts","repository":{"type":"git","url":"git+https://github.com/bradgarropy/next-google-analytics.git"},"scripts":{"start":"tsc --watch","build":"tsc","lint":"eslint .","lint:fix":"eslint --fix .","format":"prettier --check .","format:fix":"prettier --write .","test":"jest --passWithNoTests","test:watch":"jest --passWithNoTests --watch","contributors":"all-contributors generate","prepare":"tsc"},"devDependencies":{"@bradgarropy/eslint-config":"^1.1.0","@bradgarropy/eslint-config-react":"^1.0.0","@bradgarropy/eslint-config-typescript":"^1.0.1","@testing-library/jest-dom":"^5.11.10","@testing-library/react":"^12.0.0","@testing-library/react-hooks":"^7.0.0","@testing-library/user-event":"^13.1.9","@types/jest":"^27.4.0","@types/react":"^17.0.0","@types/react-dom":"^17.0.0","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","all-contributors-cli":"^6.20.0","babel-eslint":"^10.1.0","eslint":"^8.8.0","eslint-config-prettier":"^8.2.0","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.22.0","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-simple-import-sort":"^7.0.0","husky":"^5.1.3","jest":"^27.0.5","lint-staged":"^10.5.4","next":"^12.0.10","prettier":"^2.2.1","react":"^17.0.1","react-dom":"^17.0.1","ts-jest":"^27.0.3","tslib":"^2.1.0","typescript":"^4.1.3"},"peerDependencies":{"next":">=12","react":">=16"},"engines":{"node":">=10"},"gitHead":"71dff9ed4f23bdfd696c569b368de13ac8f8bd01","_id":"@bradgarropy/next-google-analytics@1.0.0","_nodeVersion":"14.18.3","_npmVersion":"6.14.15","dist":{"integrity":"sha512-EpFeWw2s8kD5T72adBYn2fCOd+4eR6u7xpNK2UmR6YzQuwG2tRkVzMLv/mXkUsMWY0clT5K0eWXh/QEQ5ioWMQ==","shasum":"50fc6fca6c55d2b833e68a561b6081d9448fdb61","tarball":"https://registry.npmjs.org/@bradgarropy/next-google-analytics/-/next-google-analytics-1.0.0.tgz","fileCount":12,"unpackedSize":10733,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/XWICRA9TVsSAnZWagAAwCEP/AuMXMdyb695gbARUvbK\nHXmgFogEvFvT3H0wdmW8MdbCra6gO/ZAb6SnzRRqvh//CJge3C8XthG+Ucky\nAgF2f6Xl12Xikw/fv/jNl3tdz6Q+gWqeGh7Ounga3ZXmp4aQQbrq2wLDZKUB\ngM5i5yTEL7KG6hL9qnz89EwofrYn693moAGiiT5p7LAtST5jvG0t72zK5423\nFHqR+MjemzeWsk/5htcMhFI0Csw95K/oOxueIQQdBiiZtqYMuKSU49mDpNC+\npb2rtsfPER8lWtawba/jvQOiQAqoc0ysZ1yVY2gFNoxGsqXoF2vi+p9uFd6Q\n4hnjcndovPKoWCa7ZP+BPcCtlSD9gUwQovqwK0wtLVqYah/cVj3657eoMt85\nkxiuAMBSk/oapo8jQmFpoHtyZqV2rIjtBasy3BRBGaXT/+X8w9WMsxMtDz04\nddps+8dVvZJVIJz3oX2VJIAQRvIzVvubV+FnuWPxZGVGnr7oIe8wBsOaPVg0\nZjsetkihOKQCbUrI0RW4+9y7Vu6qftncoVEqbx+B+ksDIgeO7b45oHbl/PPm\nI5xKjgWLB1FK4pvbBcVZFfgCOQzpPEziAgoyBSJEwdcgEPZgsIioSQd+8lkw\nHmV0+XoqINU01B2eN5600DWOZpSQkG1lSVIkcFm4h6Gl364zcUAH4G0RFAU8\n4FWE\r\n=bMDi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFz5GrbgTcxON4MSHZbHdtjlyK0aH6xGUtqorxvINxJ4AiEA1tCZ1o0GPkXWkaqj/EBiE/hkxcOLbpqJJ0xLPASaM+I="}]},"_npmUser":{"name":"bradgarropy","email":"bradgarropy@gmail.com"},"directories":{},"maintainers":[{"name":"bradgarropy","email":"bradgarropy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/next-google-analytics_1.0.0_1644000647829_0.38961785515830405"},"_hasShrinkwrap":false},"1.0.1":{"name":"@bradgarropy/next-google-analytics","version":"1.0.1","description":"📊 google analytics for next.js","keywords":["typescript","react","next","eslint","prettier","jest","google","google-analytics"],"homepage":"https://github.com/bradgarropy/next-google-analytics","bugs":{"url":"https://github.com/bradgarropy/next-google-analytics/issues"},"license":"MIT","author":{"name":"Brad Garropy","email":"bradgarropy@gmail.com","url":"https://bradgarropy.com"},"main":"dist/index.js","types":"dist/types/index.d.ts","repository":{"type":"git","url":"git+https://github.com/bradgarropy/next-google-analytics.git"},"scripts":{"start":"tsc --watch","build":"tsc","lint":"eslint .","lint:fix":"eslint --fix .","format":"prettier --check .","format:fix":"prettier --write .","test":"jest --passWithNoTests","test:watch":"jest --passWithNoTests --watch","contributors":"all-contributors generate","prepare":"tsc"},"devDependencies":{"@bradgarropy/eslint-config":"^1.1.0","@bradgarropy/eslint-config-react":"^1.0.0","@bradgarropy/eslint-config-typescript":"^1.0.1","@testing-library/jest-dom":"^5.11.10","@testing-library/react":"^12.0.0","@testing-library/react-hooks":"^7.0.0","@testing-library/user-event":"^13.1.9","@types/jest":"^27.4.0","@types/react":"^17.0.0","@types/react-dom":"^17.0.0","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","all-contributors-cli":"^6.20.0","babel-eslint":"^10.1.0","eslint":"^8.8.0","eslint-config-prettier":"^8.2.0","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.22.0","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-simple-import-sort":"^7.0.0","husky":"^5.1.3","jest":"^27.0.5","lint-staged":"^10.5.4","next":"^12.0.10","prettier":"^2.2.1","react":"^17.0.1","react-dom":"^17.0.1","ts-jest":"^27.0.3","tslib":"^2.1.0","typescript":"^4.1.3"},"peerDependencies":{"next":">=12","react":">=16"},"engines":{"node":">=10"},"gitHead":"bbd06ee14146874f9aa8c60843c20c9043d7fdf2","_id":"@bradgarropy/next-google-analytics@1.0.1","_nodeVersion":"14.18.3","_npmVersion":"6.14.15","dist":{"integrity":"sha512-YNdkzXDA7a6MAcYLnx3SxtteZtM+nf2dcpi97rsCEXPH2sWYr0YVtOH8cRNEDYmeAY/TmTUxWsmUz1tHOZeRdg==","shasum":"5fce68d42191f3d68da3b9b6147a05b2d041a4b3","tarball":"https://registry.npmjs.org/@bradgarropy/next-google-analytics/-/next-google-analytics-1.0.1.tgz","fileCount":12,"unpackedSize":11744,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/YeHCRA9TVsSAnZWagAAGSkP/3B/mY374sRWoWIlntVL\nC6H3/viuKi8eQKAjuhjnP9UntwLQ1IMLvxnF9igOE8lwe7EkOIvb8xCPFzOt\nxgneoV7oMAVJ8eV4gLfY1DlRQiUP0pCYxTKxWfdciRa14Yl16HmqnUzHr4tQ\nnm1kSB3sFLKXmXuRglWVPFRsOMXy0BYniykz8LepnjjpvnAhwmJQiYpzq/Z3\nMVMh4F3sngBSEBQggI55ylc4DTqrQhdw31S969cneV/5SVdBfarZb3y3672x\nGJpZQ4mmo6ON6y1vfJsVr/xo8PZ1WH+DAAyY/v/5s0KDgDGJ2sBIHQbg/PCm\n1NA3P2+Vo4FqU9Dd6NiFKRarDvd5LF2hvTol93qpORN4cogKwamxDqdVcZhG\n+dLlD2F48vLzpjdf3rGB3ahOZ5RjChuJ8ciG994lVeLXCUUq/agxul+HilDS\nHcY/putQ0+deiZ8nd8aCxYdm3E+fyZfwstRscs4Y+Qt6hz3LedGQJskD9+E8\nbzXp8kN1X1hg6r1C22K4jGFwSND/kC20PW83r4TMNfQ7TUYSnea3cHeSwGOp\nU87Q0FyPJQVWD+SO9+tTh7RAwB/tLQ4SpkRvSlTb68zZLqyeqe7ubZzW+thU\nGrp1KI7W/Q/6PZLfMNcwvli5LIwuONz8j0nq2EUhhAntdfqouORDpKg/u6Ek\nHD5N\r\n=tz6m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLk/4tdDwSPg0wBGWKUlwd6p3iHVIc0oSotf523LtS2gIgVGb85QE3HTiHB9YhK8Cr3NcOHu3LXLmOknC/7cSsIE8="}]},"_npmUser":{"name":"bradgarropy","email":"bradgarropy@gmail.com"},"directories":{},"maintainers":[{"name":"bradgarropy","email":"bradgarropy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/next-google-analytics_1.0.1_1644005255354_0.18956231933631962"},"_hasShrinkwrap":false},"1.0.2":{"name":"@bradgarropy/next-google-analytics","version":"1.0.2","description":"📊 google analytics for next.js","keywords":["typescript","react","next","eslint","prettier","jest","google","google-analytics"],"homepage":"https://github.com/bradgarropy/next-google-analytics","bugs":{"url":"https://github.com/bradgarropy/next-google-analytics/issues"},"license":"MIT","author":{"name":"Brad Garropy","email":"bradgarropy@gmail.com","url":"https://bradgarropy.com"},"main":"dist/index.js","types":"dist/types/index.d.ts","repository":{"type":"git","url":"git+https://github.com/bradgarropy/next-google-analytics.git"},"scripts":{"start":"tsc --watch","build":"tsc","lint":"eslint .","lint:fix":"eslint --fix .","format":"prettier --check .","format:fix":"prettier --write .","test":"jest --passWithNoTests","test:watch":"jest --passWithNoTests --watch","contributors":"all-contributors generate","prepare":"tsc"},"devDependencies":{"@bradgarropy/eslint-config":"^1.1.0","@bradgarropy/eslint-config-react":"^1.0.0","@bradgarropy/eslint-config-typescript":"^1.0.1","@testing-library/jest-dom":"^5.11.10","@testing-library/react":"^12.0.0","@testing-library/react-hooks":"^7.0.0","@testing-library/user-event":"^13.1.9","@types/jest":"^27.4.0","@types/react":"^17.0.0","@types/react-dom":"^17.0.0","@typescript-eslint/eslint-plugin":"^5.10.2","@typescript-eslint/parser":"^5.10.2","all-contributors-cli":"^6.20.0","babel-eslint":"^10.1.0","eslint":"^8.8.0","eslint-config-prettier":"^8.2.0","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.22.0","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-simple-import-sort":"^7.0.0","husky":"^5.1.3","jest":"^27.0.5","lint-staged":"^10.5.4","next":"^12.0.10","prettier":"^2.2.1","react":"^17.0.1","react-dom":"^17.0.1","ts-jest":"^27.0.3","typescript":"^4.1.3"},"peerDependencies":{"next":">=12","react":">=16"},"engines":{"node":">=10"},"gitHead":"67f07af81dcfb9d4b680e7129f4d79c5a3b1ca7a","_id":"@bradgarropy/next-google-analytics@1.0.2","_nodeVersion":"14.19.0","_npmVersion":"6.14.16","dist":{"integrity":"sha512-Xhli9NkdJbmvs1QNAcC9At3w/GIlXunVIMQzcAYfVP8tQSX3Q4un0doZfQknNvRz+QO6we+8lDE4/dMOio0vzQ==","shasum":"057b77d77f590939da4dce3575255b1f37411910","tarball":"https://registry.npmjs.org/@bradgarropy/next-google-analytics/-/next-google-analytics-1.0.2.tgz","fileCount":12,"unpackedSize":12193,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC/0NCRA9TVsSAnZWagAASJAP/AsooIpClzwNSdKYxOkk\natJ8/hxsbHeEeMR/GR6doOLNnRf1B7IkTGK6Npn+TiwvL9Cn1c+aGxCdBSRt\nhDm7kElMS1uv83WGyXvhzvs9flCau2PI/d0SJyYwbCS/xUNhK7YvGsN0ZiUj\nWAqbOkPPemJkZhafYB6CL3zhUKleuxJDYNsVj7n/azvZGXTJ+cEu+V0p5LWj\nMMMxYs+2sZW1PpktBK3sC5lNzTFEv8LYzS4m1wAy/rLZsjqcJqQAIwyVPNGO\n1SFVb/X/cMuvZkJCFfnwvrh72EZUgYHMILHVlJblHYmrYJuN3a1/c3T2SmmU\nwoUnlKfxCrqNOlUExlqlNcon7DwCqwvCLIv8VkHZ1MIKOdPtmdfjlK6m9kOh\nZhR4EvlHPInvk+UN2AqybClkE2RMXP+JTZuPazqCDQAXZXgu2g4Jw0VhfJhY\nb1Lecux8bBH4yOuHHRHJVYitMjydiASjdDGoI4e6Ko/DlEx8cMM+9HZyD4iu\n2/wXSrVJzvpMv2ldUGurKJGGeB8WC2ORJJR+trzhng/zKAJKkwyoqAqQ9SSY\nU7mAS/E3lkreUM6LeVxeYlrdMYJdrgqGHMlObC76zKdEnLV4/pcLxGWyo5HA\ntHlSunIlkLnvnbyazKzrZ/nsGn2BzozpgEYtOSzsXktEKJvRuCWzD3jPceIw\nTBjs\r\n=DiSX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDL8L1xhhQndJoJFvwr5gkXahDsUQi437pSr6McLqRBfgIhAPaRRRz5/Y6YmRn9aUKx1C7Dqn4l0rslZq4QPgpV5mzi"}]},"_npmUser":{"name":"bradgarropy","email":"bradgarropy@gmail.com"},"directories":{},"maintainers":[{"name":"bradgarropy","email":"bradgarropy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/next-google-analytics_1.0.2_1644952845060_0.7035967701988075"},"_hasShrinkwrap":false}},"time":{"created":"2022-02-04T18:50:47.759Z","1.0.0":"2022-02-04T18:50:48.066Z","modified":"2022-04-04T20:20:03.221Z","1.0.1":"2022-02-04T20:07:35.533Z","1.0.2":"2022-02-15T19:20:45.234Z"},"maintainers":[{"name":"bradgarropy","email":"bradgarropy@gmail.com"}],"description":"📊 google analytics for next.js","homepage":"https://github.com/bradgarropy/next-google-analytics","keywords":["typescript","react","next","eslint","prettier","jest","google","google-analytics"],"repository":{"type":"git","url":"git+https://github.com/bradgarropy/next-google-analytics.git"},"author":{"name":"Brad Garropy","email":"bradgarropy@gmail.com","url":"https://bradgarropy.com"},"bugs":{"url":"https://github.com/bradgarropy/next-google-analytics/issues"},"license":"MIT","readme":"# 📊 next google analytics\n\n[![version][version-badge]][npm]\n[![downloads][downloads-badge]][npm]\n[![size][size-badge]][bundlephobia]\n[![github actions][github-actions-badge]][github-actions]\n[![coverage][codecov-badge]][codecov]\n[![typescript][typescript-badge]][typescript]\n[![contributing][contributing-badge]][contributing]\n[![contributors][contributors-badge]][contributors]\n[![discord][discord-badge]][discord]\n\n_[Google Analytics 4][ga4] for [Next.js][nextjs]._\n\n## 📦 Installation\n\nThis package is hosted on [`npm`][npm].\n\n```bash\nnpm install @bradgarropy/next-google-analytics\n```\n\n## 🥑 Usage\n\nThis component integrates [Google Analytics 4][ga4] into your [Next.js][nextjs] website. It downloads and initializes the `gtag` script, and no further setup is required. In order to work, this component must be placed in the `pages/_app.js` file.\n\n```jsx\n// pages/_app.js\nimport GoogleAnalytics from \"@bradgarropy/next-google-analytics\"\n\nconst App = ({Component, pageProps}) => {\n    return (\n        <>\n            <GoogleAnalytics measurementId=\"G-XXXXXXXXXX\" />\n            <Component {...pageProps} />\n        </>\n    )\n}\n```\n\nTo ensure that Google Analytics is working, you can check a few things.\n\n1. A network request was made to `https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX`.\n2. `window.dataLayer` exists and includes your Measurement ID.\n3. When you navigate your site, items are added to the `window.dataLayer` array.\n\n## 📖 API Reference\n\n### `<GoogleAnalytics>`\n\n| Name            | Required | Default | Example          | Description                                        |\n| :-------------- | :------: | :-----: | :--------------- | :------------------------------------------------- |\n| `measurementId` |  `true`  |         | `\"G-XXXXXXXXXX\"` | Google Analytics [Measurement ID][measurement-id]. |\n\nThe example below shows how to use the component.\n\n```jsx\n<GoogleAnalytics measurementId=\"G-XXXXXXXXXX\" />\n```\n\n## ❔ Questions\n\n🐛 report bugs by filing [issues][issues]  \n📢 provide feedback with [issues][issues] or on [twitter][twitter]  \n🙋🏼‍♂️ use my [ama][ama] or [twitter][twitter] to ask any other questions\n\n## ✨ contributors\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n  <tr>\n    <td align=\"center\"><a href=\"https://bradgarropy.com\"><img src=\"https://avatars.githubusercontent.com/u/11336745?v=4?s=100\" width=\"100px;\" alt=\"\"/><br /><sub><b>Brad Garropy</b></sub></a><br /><a href=\"https://github.com/bradgarropy/next-google-analytics/commits?author=bradgarropy\" title=\"Code\">💻</a> <a href=\"https://github.com/bradgarropy/next-google-analytics/commits?author=bradgarropy\" title=\"Documentation\">📖</a> <a href=\"https://github.com/bradgarropy/next-google-analytics/commits?author=bradgarropy\" title=\"Tests\">⚠️</a> <a href=\"#infra-bradgarropy\" title=\"Infrastructure (Hosting, Build-Tools, etc)\">🚇</a></td>\n  </tr>\n</table>\n\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\n[codecov]: https://app.codecov.io/gh/bradgarropy/next-google-analytics\n[contributing]: https://github.com/bradgarropy/next-google-analytics/blob/master/contributing.md\n[contributors]: #-contributors\n[npm]: https://www.npmjs.com/package/@bradgarropy/next-google-analytics\n[codecov-badge]: https://img.shields.io/codecov/c/github/bradgarropy/next-google-analytics?style=flat-square\n[version-badge]: https://img.shields.io/npm/v/@bradgarropy/next-google-analytics.svg?style=flat-square\n[downloads-badge]: https://img.shields.io/npm/dt/@bradgarropy/next-google-analytics?style=flat-square\n[contributing-badge]: https://img.shields.io/badge/PRs-welcome-success?style=flat-square\n[contributors-badge]: https://img.shields.io/github/all-contributors/bradgarropy/next-google-analytics?style=flat-square\n[issues]: https://github.com/bradgarropy/next-google-analytics/issues\n[twitter]: https://twitter.com/bradgarropy\n[ama]: https://bradgarropy.com/ama\n[bundlephobia]: https://bundlephobia.com/result?p=@bradgarropy/next-google-analytics\n[size-badge]: https://img.shields.io/bundlephobia/minzip/@bradgarropy/next-google-analytics?style=flat-square\n[github-actions]: https://github.com/bradgarropy/next-google-analytics/actions\n[github-actions-badge]: https://img.shields.io/github/workflow/status/bradgarropy/next-google-analytics/%F0%9F%9A%80%20release?style=flat-square\n[typescript]: https://www.typescriptlang.org/dt/search?search=%40bradgarropy%2Fnext-google-analytics\n[typescript-badge]: https://img.shields.io/npm/types/@bradgarropy/next-google-analytics?style=flat-square\n[discord]: https://bradgarropy.com/discord\n[discord-badge]: https://img.shields.io/discord/748196643140010015?style=flat-square\n[ga4]: https://analytics.google.com\n[nextjs]: https://nextjs.org\n[measurement-id]: https://www.youtube.com/watch?v=eWpTwBO9bNg&t=27s\n","readmeFilename":"readme.md"}