{"_id":"@bacongobbler/ngx-gtag","_rev":"2-059d18a316ddc22075dc9b1ea7dfdc8c","name":"@bacongobbler/ngx-gtag","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@bacongobbler/ngx-gtag","version":"1.0.0","author":{"name":"Matthew Fisher","email":"matt.fisher@fishworks.io"},"repository":{"type":"git","url":"git+https://github.com/bacongobbler/ngx-gtag.git"},"license":"MIT","private":false,"peerDependencies":{"@angular/common":"^15.0.0","@angular/core":"^15.0.0"},"dependencies":{"tslib":"^2.3.0"},"keywords":["angular","google analytics","gtag.js"],"gitHead":"947d2fde340ee10ce02ffa5f2432628a65bed274","description":"A simple Google Analytics [gtag.js](https://developers.google.com/analytics/devguides/collection/gtagjs/) package for Angular.","bugs":{"url":"https://github.com/bacongobbler/ngx-gtag/issues"},"homepage":"https://github.com/bacongobbler/ngx-gtag#readme","_id":"@bacongobbler/ngx-gtag@1.0.0","_nodeVersion":"19.1.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-K//M/wqYIiFvQP/yf4PmN3Rj9phRAzpErz2lLigFRfjqrSs+ybTEqfoFEMrf4bIoY9cMZTwvxP40MKAX0Wrj9w==","shasum":"dae3234b43840fbaa35c902dae4e9bfc51cf8616","tarball":"https://registry.npmjs.org/@bacongobbler/ngx-gtag/-/ngx-gtag-1.0.0.tgz","fileCount":12,"unpackedSize":7820,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4IAmszasAigaEh5A8A1hPMAOQSBIjdq9n4v2FrBtQgwIhAPeBkjqiCumPO8IVKbVzQDx0rIEtNrG8t/Rl0l41wChM"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmlzTACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoI9Q/+JVdgLUoAtXxTGo7wbZnwDV/byEgU12IoATQvM+8DdzSN6+fh\r\n0+mPg63eP+Zd8T1lppgEOtKAUPtr7EEby9Yk0R81k6Px0ZMQMPFr1P0S8zyh\r\nzGt0IrTQIf9YeCRSgprQm9XWm7KmflX4q6l7qnvJKPqNtP5zT8dSHxNAm41v\r\n5WlFt2AuzUyLOXGL15vSRGI+Rqttl3mcMWcWrnw0RWtRBSA7gj33yfSM+/vg\r\nhXLoE+Zefu+Byt+TX194laQ7QPY1YxItGbmJIFwkpAwZP/623gZ13zhGHWaM\r\n9gok/AmzMv+Kcn6rmBTEoeVNZ7mLux79/u3pa7OS7yHhplIAifYGC2hBVUPa\r\n6YLAenI6yB3ccFJVDrSDCp7j4MMKJCb+9Af8By0incInR9VJF8/90nAkUoGK\r\nl3CYXTBVsJtV3csiOiRP7XEkwWv48ujAPqVQHsoIetAEmVUQhrhHbzwrYRvd\r\nzRPV93//Q71yZCKfiHTBuV/hSz2G04z+SHXva5EpLkDMsamP3rg5P8ViMRhZ\r\ndsjhAiNincpb+R5uDDPl8zF6GPrpYfIj45C1rHmxLoXXSKYDrfgB2LeDV+Hh\r\nTpJXsd7PZQLC+1zJo6p7TrZMFKXo22q/ZWIv9LAUwm0YvZRghjA0n5L3Q1R2\r\nKTk0AUA53E/WXOjDrIbOo+V9aNnleJv2PX8=\r\n=IWDE\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bacongobbler","email":"me@bacongobbler.com"},"directories":{},"maintainers":[{"name":"bacongobbler","email":"me@bacongobbler.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ngx-gtag_1.0.0_1671060690876_0.7419902660474074"},"_hasShrinkwrap":false},"1.0.1":{"name":"@bacongobbler/ngx-gtag","version":"1.0.1","author":{"name":"Matthew Fisher","email":"matt.fisher@fishworks.io"},"repository":{"type":"git","url":"git+https://github.com/bacongobbler/ngx-gtag.git"},"license":"MIT","private":false,"peerDependencies":{"@angular/common":"^15.0.0","@angular/core":"^15.0.0"},"dependencies":{"tslib":"^2.3.0"},"keywords":["angular","google analytics","gtag.js"],"module":"fesm2015/bacongobbler-ngx-gtag.mjs","es2020":"fesm2020/bacongobbler-ngx-gtag.mjs","esm2020":"esm2020/bacongobbler-ngx-gtag.mjs","fesm2020":"fesm2020/bacongobbler-ngx-gtag.mjs","fesm2015":"fesm2015/bacongobbler-ngx-gtag.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","esm2020":"./esm2020/bacongobbler-ngx-gtag.mjs","es2020":"./fesm2020/bacongobbler-ngx-gtag.mjs","es2015":"./fesm2015/bacongobbler-ngx-gtag.mjs","node":"./fesm2015/bacongobbler-ngx-gtag.mjs","default":"./fesm2020/bacongobbler-ngx-gtag.mjs"}},"sideEffects":false,"gitHead":"947d2fde340ee10ce02ffa5f2432628a65bed274","description":"A simple Google Analytics [gtag.js](https://developers.google.com/analytics/devguides/collection/gtagjs/) package for Angular.","bugs":{"url":"https://github.com/bacongobbler/ngx-gtag/issues"},"homepage":"https://github.com/bacongobbler/ngx-gtag#readme","_id":"@bacongobbler/ngx-gtag@1.0.1","_nodeVersion":"19.1.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-aWvYIfkn0FSmYTvj4ekCxYAju1NAeqncgZabBQED5bWydEX+E/rxnxT3mszVO5JvUShgYmJ0z/tUJrV2z1NkKw==","shasum":"2c4d06a00eea326d9bc16ad8d1296027204282c6","tarball":"https://registry.npmjs.org/@bacongobbler/ngx-gtag/-/ngx-gtag-1.0.1.tgz","fileCount":18,"unpackedSize":50688,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUb9I5zSdST5GM7GjZANovp3wW9mlIuLHEmKQcWyEeXQIgItg7+L/qjiG+bqq9WHzfaByGjAvhJTF2lgk3y14q/nk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjml5sACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqsxA/6AjTg/yC37gbTxpOCV7FSRpHDvYkgSDkBIGj0zGtlj0b/9eQA\r\nMXNwElkLg7K+P3M75NqSEUsjTLzK+hhlqYeiOc64rxVM9gBlIB1RJOuTrUbS\r\niT8qfog1PifrO0k1d3dxGAn39CjZSpBF766Fsg3sm9Mq9h85qRuZ/3/aRJuM\r\nuiOjBwXwVqgR9oeYh51a8fMbtN5hP9IFSdi69gI4/GvPy5ydi8NdphkM6lfb\r\nsEFxwBbj62hHCygR40oqYOb3D4ka42bpPcPf/WHi2XzJPYAdzF1QpHOMxBd7\r\n1Rv3lmQticI3CqXWXwalMicknO99gde5fRp6XXC5fuBi3SrD6aavZb6d3MF5\r\n/9b5oHawcT9FNCld9dYuPjyfGMAdN2Pt+F5FrjO+mXDBl97C9cr2ZpB30b0E\r\ngkxtUpAZvrl9xDGzTmxlDyQWlwrSrK6RGUmSPnQM7Eabr30dqoXNFVxW7TIi\r\neYVU97Q+yFVq7oABmxLWIiy4gsAlAm8U+ga74JtR3UPsAAQebCIYdUikORfc\r\nc2/K1JAvqKmfv7BgJoqPzewNunlf6ALRsQ2imiOfqrhaYnnF4XR6cnGuIPXG\r\nW2UvyF22xsawb/vBWdANs1TWHR4JnBjO6HpyCq4UM2I9GqMKH23rJUrSaPc7\r\n26QUT5tlxbKlVs6ZkoMh+N+dwq41k0fsDEY=\r\n=6cDm\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bacongobbler","email":"me@bacongobbler.com"},"directories":{},"maintainers":[{"name":"bacongobbler","email":"me@bacongobbler.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ngx-gtag_1.0.1_1671061100326_0.5267984313096683"},"_hasShrinkwrap":false},"1.1.0":{"name":"@bacongobbler/ngx-gtag","version":"1.1.0","author":{"name":"Matthew Fisher","email":"matt.fisher@fishworks.io"},"repository":{"type":"git","url":"git+https://github.com/bacongobbler/ngx-gtag.git"},"license":"MIT","private":false,"peerDependencies":{"@angular/common":"^15.0.0","@angular/core":"^15.0.0"},"dependencies":{"tslib":"^2.3.0"},"keywords":["angular","google analytics","gtag.js"],"module":"fesm2015/bacongobbler-ngx-gtag.mjs","es2020":"fesm2020/bacongobbler-ngx-gtag.mjs","esm2020":"esm2020/bacongobbler-ngx-gtag.mjs","fesm2020":"fesm2020/bacongobbler-ngx-gtag.mjs","fesm2015":"fesm2015/bacongobbler-ngx-gtag.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","esm2020":"./esm2020/bacongobbler-ngx-gtag.mjs","es2020":"./fesm2020/bacongobbler-ngx-gtag.mjs","es2015":"./fesm2015/bacongobbler-ngx-gtag.mjs","node":"./fesm2015/bacongobbler-ngx-gtag.mjs","default":"./fesm2020/bacongobbler-ngx-gtag.mjs"}},"sideEffects":false,"gitHead":"8a9659c9be79bf5592f9e41fdae70b9af9d2e90a","description":"A simple Google Analytics [gtag.js](https://developers.google.com/analytics/devguides/collection/gtagjs/) package for Angular.","bugs":{"url":"https://github.com/bacongobbler/ngx-gtag/issues"},"homepage":"https://github.com/bacongobbler/ngx-gtag#readme","_id":"@bacongobbler/ngx-gtag@1.1.0","_nodeVersion":"19.1.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-fKfp9rMRzuAtxwt3DLK3HNitZf3wihWF6qxEGOmxSUC3QshoNUF6D4/1W5vBGWKvQRf8Syehgdluu6Vk5IKaYQ==","shasum":"c26e1794521fb856dcc81201217f441920cc761d","tarball":"https://registry.npmjs.org/@bacongobbler/ngx-gtag/-/ngx-gtag-1.1.0.tgz","fileCount":18,"unpackedSize":49084,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNBnGRaYg3jz+nxB2g2tkJUd/bZ/g1gyx20qQKVRll8AIgaVnPK5FdN2qGZ07Md+m9epJpiKuNb4hPF8wWX3ip2hc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmq0DACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpvpQ/7Bq6Yk7pb+XFhgIj9dQ3YfFN4fh13emXGrQfO2D3HjMsGCNRG\r\nnTFzZmpsTvWk63IqeONdtITRSs2GQ3OjaY8X8GjMrXTl3d6Hnp+1K6bF5LwK\r\njaAOt7qTOj++iEtcFX586GQVLTJ44q9YS8gGi0F8+TXp4zGT6FjGzNAEEkro\r\n8/c12U0fbhotUGQhImMMLopVQTeRsgJMQ01lk5+4JGEA85J+W6/5yJFR1nDV\r\nkL3LgN6RNLUWAUnACI/RLJp/jQ3Cy6ctj2DbrIqqODt/TUZJZkkVK5/pmy8O\r\ntfqSsq6Lb4vNbeP6vwkhR0NVjLmuyAvgZIs7HMw+igZEqn4CetSInfX+kDtA\r\nWdt/Q8ih0t3luNMI+q6n3kpAdEsL1pN5xMDVgIF0iy7zxv3zwK2FkZOa/yHI\r\nEzGW7l1H446htYjPLEyadk3gW5NTgrKoGUApwUvIthVveyMC8F2Eja6JB256\r\nawi7DjFxXp4Wfy4AgzdNVTFF568ALWgxiLKWPWk3rtrXew1MjubTIfxm3+7F\r\n8xUEcuygc+n33AMYocihGN2U4Ze74hVuZl5H7K4F9JuHdsKDGHdk50lDlWq2\r\nCf88cUfEsHWfmPpUk0PX4kGZDLTC1a1EvuU+YQ85HHFfeBnR2GbJUEL99FNC\r\nOfvmoyXa0IVX0VxG3fcX0T0EqEm24DGPA58=\r\n=czdR\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bacongobbler","email":"me@bacongobbler.com"},"directories":{},"maintainers":[{"name":"bacongobbler","email":"me@bacongobbler.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ngx-gtag_1.1.0_1671081219015_0.776306248851865"},"_hasShrinkwrap":false}},"time":{"created":"2022-12-14T23:31:30.765Z","1.0.0":"2022-12-14T23:31:31.086Z","modified":"2022-12-15T05:13:39.275Z","1.0.1":"2022-12-14T23:38:20.485Z","1.1.0":"2022-12-15T05:13:39.201Z"},"maintainers":[{"name":"bacongobbler","email":"me@bacongobbler.com"}],"description":"A simple Google Analytics [gtag.js](https://developers.google.com/analytics/devguides/collection/gtagjs/) package for Angular.","homepage":"https://github.com/bacongobbler/ngx-gtag#readme","keywords":["angular","google analytics","gtag.js"],"repository":{"type":"git","url":"git+https://github.com/bacongobbler/ngx-gtag.git"},"author":{"name":"Matthew Fisher","email":"matt.fisher@fishworks.io"},"bugs":{"url":"https://github.com/bacongobbler/ngx-gtag/issues"},"license":"MIT","readme":"# Angular gtag.js\n\nA simple Google Analytics [gtag.js](https://developers.google.com/analytics/devguides/collection/gtagjs/) package for Angular.\n\nThis project is a successor to [@codediodeio's angular-gtag](https://github.com/codediodeio/angular-gtag) project.\n\n## Install\n\n```\nnpm install @bacongobbler/ngx-gtag --save\n```\n\nAdd the package to to your `app.module.ts`:\n\n```ts\nimport { GtagModule } from 'ngx-gtag';\n\n@NgModule({\n  imports: [\n    GtagModule.forRoot({ trackingId: 'YOUR_TRACKING_ID' })\n  ]\n})\n```\n\n## Pageviews\n\nThe package will listen to route changes by default.\n\nYou just need to instantiate the service in the root of the project.\n\n```ts\nexport class AppComponent {\n  constructor(gtag: GtagService) { }\n}\n```\n\nGtag is a service that also allows you to track pageviews manually.\n\n```ts\ngtag.pageview();\n\n// or with custom params\n\ngtag.pageview({\n  page_title: 'Lesson Feed',\n  page_path: '/lessons',\n  page_location: 'https://angularfirebase.com/lessons'\n});\n```\n\n## Events\n\n[Events](https://developers.google.com/analytics/devguides/collection/gtagjs/events) expect an action.\n\n```ts\ngtag.event('view_promotion')\n```\n\nYou can optionally pass in addtional params.\n\n\n```ts\ngtag.event('login', {\n  method: 'Instagram',\n  event_category: 'engagemnt',\n  event_label: 'New user logged in via OAuth'\n});\n```\n\n\n## Event Directive\n\nMany analytics events are tracked based on user interaction, such as button clicks. Just tell it which DOM event to track.\n\n```html\n<button gtagEvent trackOn=\"click\">Track Me</button>\n```\n\nThis will register a general event in Google Analytics based on the event name.\n\n![](https://firebasestorage.googleapis.com/v0/b/firestarter-96e46.appspot.com/o/assets%2Fevent-gtag.png?alt=media&token=8f70e408-0300-472b-ab99-75893bef26fb)\n\nYou can pass optional params to the directive like so:\n\n```html\n<div gtagEvent\n     trackOn=\"dragstart\"\n     action=\"product_dragged\"\n     category=\"ecommerce\"\n     [params]=\"{ event_label: 'Something cool just happened' }\">\n\n   Some Product...\n\n</div>\n```\n\nThe directive will produce the following event on dragstart:\n\n![](https://firebasestorage.googleapis.com/v0/b/firestarter-96e46.appspot.com/o/assets%2Fevent-gtag2.png?alt=media&token=213e2c60-6892-42a9-ac21-e828114e423a)","readmeFilename":"README.md"}