{"_id":"@elisiondesign/vue-gtm","_rev":"3-ab5f3a84315494ad1fd960add5f6e29c","name":"@elisiondesign/vue-gtm","dist-tags":{"latest":"2.3.2"},"versions":{"2.3.0":{"name":"@elisiondesign/vue-gtm","version":"2.3.0","description":"Google Tag Manager implementation in Vue application","main":"./dist/vue-gtm.min.js","author":{"name":"Manish Kumar"},"license":"Apache-2.0","homepage":"https://github.com/mib200/vue-gtm","scripts":{"build":"webpack --config webpack.config.js --progress --hide-modules"},"repository":{"type":"git","url":"git+https://github.com/mib200/vue-gtm.git"},"bugs":{"url":"https://github.com/mib200/vue-gtm/issues"},"jshintConfig":{"esversion":6},"keywords":["analytics","universal analytics","google analytics","google tag manager","vue analytics","vue tag manager","vue google tag manager","vue js google tag manager","vuejs google tag manager","vue js analytics","vue gtm","vuejs gtm","vue js gtm","vuejs","tracking","Vue2","vue","google"],"devDependencies":{"babel-core":"^6.26.3","babel-loader":"^6.2.10","babel-preset-es2015":"^6.24.1","babel-preset-stage-2":"^6.24.1","webpack":"^2.7.0"},"gitHead":"c80cd7c022145be0a04f249733f8e06974733f65","_id":"@elisiondesign/vue-gtm@2.3.0","_nodeVersion":"13.5.0","_npmVersion":"6.14.3","dist":{"integrity":"sha512-fqyjqRTNXwlWdB0JSXQ7L2vQrZF1/B8pdWrQeuBYPth6peRc3Vd8QWtU0sxfU2hldmYfxr7LEGyqOiEihW0dWQ==","shasum":"e6d5da57875c713b30d4be7b4f9e208e92bb22a8","tarball":"https://registry.npmjs.org/@elisiondesign/vue-gtm/-/vue-gtm-2.3.0.tgz","fileCount":11,"unpackedSize":27526,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqXtoCRA9TVsSAnZWagAA7ooP/RwAlX3+f5iizREKUO6D\nXUyWoudvB+wofDsKeVQOraf7XfcC7E+8ylLMqmw1qnU4S8mqNLYfoqKc2c+M\nKrLSKpcU4m8x9uSqaQLuPPY4JI4dd6mdXHadrpq9RIoESoDe6Y/nDSEEfTIg\nyRY6eXZPo3ZLjM7RlKB8IT93S1ml7JZDYzUEiGZHHX/9BpoPoB21LZTEajZG\nBT7QiLe2NCDIFHBcqBZ09ciokgP5TJpVBXVf2v0KdbG5aA8u3OkyOlmrfNV1\nHb0LNOaZGEEoO1sIlgzuLqLt5KZ5rqnOK7Hf0gNAQ91BM3CWieLdiPqpJKI2\nCzKNSuNYw6Rrzg0gt1KW+rhqlHhRlbGdWxCOryx1nQj6GweRvQh7rxCJp7gu\nxw7w9TT3ojfu40CmXWsWPPLppFIn5Qv7FD13ouo89NwlQC0uBwMm9D7uV2rC\nlzLsDdBAqRFXkUmcHe3N/QDsAvMT+LmD7npmJsINFRgO02waEI0jh5zJxAOB\nTlTzaN6c9BDAuh/LMI4NN8iax+QEDyRxTBUpu7zh9eXl45U7y+vpEIL3D6QP\nisdgqYXtHZbA0Ii8AC4DjutNnVH7UQ+iD0g8ZrQUg4PXoUF40obV4jOMRnqH\nSBEQ6aGOhvDYnVUqVJdSgJVdmCeWGopxwEgCiP7QsPj3aJIHX6UfRlsMTvzP\nXHkh\r\n=MUQI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1MPbSdUAuclDumcGLJKZg7oC+FlnnaPc+b9THZhuaMAIgIeOmCH1Vt0k/Fr0oRWyI0tkQgNUKTEP4LjrgoeZDet4="}]},"maintainers":[{"name":"xcharvat","email":"dan@elision.design"},{"name":"xbilek18","email":"honza@elision.design"}],"_npmUser":{"name":"xbilek18","email":"honza@elision.design"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-gtm_2.3.0_1588165480358_0.46109973924339265"},"_hasShrinkwrap":false},"2.3.1":{"name":"@elisiondesign/vue-gtm","version":"2.3.1","description":"Google Tag Manager implementation in Vue application","main":"./dist/vue-gtm.min.js","author":{"name":"Manish Kumar"},"license":"Apache-2.0","homepage":"https://github.com/mib200/vue-gtm","scripts":{"build":"webpack --config webpack.config.js --progress --hide-modules"},"repository":{"type":"git","url":"git+https://github.com/mib200/vue-gtm.git"},"bugs":{"url":"https://github.com/mib200/vue-gtm/issues"},"jshintConfig":{"esversion":6},"keywords":["analytics","universal analytics","google analytics","google tag manager","vue analytics","vue tag manager","vue google tag manager","vue js google tag manager","vuejs google tag manager","vue js analytics","vue gtm","vuejs gtm","vue js gtm","vuejs","tracking","Vue2","vue","google"],"devDependencies":{"babel-core":"^6.26.3","babel-loader":"^6.2.10","babel-preset-es2015":"^6.24.1","babel-preset-stage-2":"^6.24.1","webpack":"^2.7.0"},"gitHead":"28068c6aaba6766041fbd68fce29b684585c5810","_id":"@elisiondesign/vue-gtm@2.3.1","_nodeVersion":"13.5.0","_npmVersion":"6.14.3","dist":{"integrity":"sha512-wx9aIXFAnGRWGkpIkuC58o/ef2T/u7oT4iqTbCOjZxEfi6Rm/TJwozyOYNVn891oC77R8sZhf/ekdU4dcW5eVA==","shasum":"7a9a5f063ee416b47e36d082d3f3cec56f6b2f17","tarball":"https://registry.npmjs.org/@elisiondesign/vue-gtm/-/vue-gtm-2.3.1.tgz","fileCount":11,"unpackedSize":27552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqX/NCRA9TVsSAnZWagAAS+cP/AhNkdRGMtJR6qFwoR2s\nnx7ou23jieCAfF0TdkP5+Vt5s2tNjoI8UGWiqvSwfG9LepYTvnamx7kkq6rZ\nNty/0rKMdGtHZSqaUaCi4TwUzkqaGyE14UZQ5CS/eeeDOi53t+/IuRzsl4v5\nwEhXSO6AejsM1ULuz1bh+fuhmO3QJOhgXlek6DZbs5SpnpIfhsoqaCcsMdNk\nKTDauYP6fewuM2i9pGnguqVRh1dLSNaVbj9E0Gt9mCK/MWf0F/DhOxKVOl2X\n7C/mUFnih8zF6bmJpGhNGo+cKyYMrmurbmky9vNadFNu6730G/rF5jlqxX2E\n0lvkH8x6zBU5VXycLPS33xiMU3Ux3i/PV4OeIS6v6a/eG3syC7UDuR9zvdJ6\nPk4bm9oDlWqzHjEIkcLHd77d6XNBoEhtomFzSbXJrFfaBRxYIMQmiiRTl/oU\nXQbrO6ZPMebfjonVgoV11ZKBidCq9vGOTS2JzG5U9lamZQSHNmdF/DpmNCA7\nHrWeHTkUoQyooJivaNCDyAEBpa2zzJ6b2yCRTAXcuCZvEd9eznRarjyf/ti9\nIJHKuvGwUSGQ3xuhZNoJY4+ViCpJcnzyV8Q63zLt0M65sOou4EfqCHY60167\nV672gd0PAY9uvtX3eojI7HsC873AoZN5YsYYsajanK/uK7JsizN4meo747wg\ncVul\r\n=zrF/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDoXrTwiCfDLN2kMuOXbJwz42jCNXmaAl5wP49urVCORwIhAI1tt7F4f0//N0CTvhc4JHbCvgqBbQLwqM/Sr0XOMJxn"}]},"maintainers":[{"name":"xbilek18","email":"honza@elision.design"},{"name":"xcharvat","email":"dan@elision.design"}],"_npmUser":{"name":"xbilek18","email":"honza@elision.design"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-gtm_2.3.1_1588166605473_0.5612817755611925"},"_hasShrinkwrap":false},"2.3.2":{"name":"@elisiondesign/vue-gtm","version":"2.3.2","description":"Google Tag Manager implementation in Vue application","main":"./dist/vue-gtm.min.js","author":{"name":"Manish Kumar"},"license":"Apache-2.0","homepage":"https://github.com/mib200/vue-gtm","scripts":{"build":"webpack --config webpack.config.js --progress --hide-modules"},"repository":{"type":"git","url":"git+https://github.com/mib200/vue-gtm.git"},"bugs":{"url":"https://github.com/mib200/vue-gtm/issues"},"jshintConfig":{"esversion":6},"keywords":["analytics","universal analytics","google analytics","google tag manager","vue analytics","vue tag manager","vue google tag manager","vue js google tag manager","vuejs google tag manager","vue js analytics","vue gtm","vuejs gtm","vue js gtm","vuejs","tracking","Vue2","vue","google"],"devDependencies":{"babel-core":"^6.26.3","babel-loader":"^6.2.10","babel-preset-es2015":"^6.24.1","babel-preset-stage-2":"^6.24.1","webpack":"^2.7.0"},"gitHead":"2901788d4ab271f90d8b9a0e77ec2afc35b572fc","_id":"@elisiondesign/vue-gtm@2.3.2","_nodeVersion":"13.5.0","_npmVersion":"6.14.3","dist":{"integrity":"sha512-QEp+kOIHt3ULeE0417uACNuzb89X8CG0MQk4QrMDMeXthJHluaW61mw+aDUVBWLGN0ZoC31QHRmmh01rMniT0w==","shasum":"ec16850e78aacd8adc7147c062b12ad7c18094fb","tarball":"https://registry.npmjs.org/@elisiondesign/vue-gtm/-/vue-gtm-2.3.2.tgz","fileCount":11,"unpackedSize":27782,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqYEqCRA9TVsSAnZWagAAIhwP/R0Y4oP6OYaORI4P/2/j\nOb4C/vFF7d7IKJbcN7OMqGC237VjDlELhZzk16qU2FZnSra/8AuxlrpHDfUY\nLSrnBgufFN1sTh+OiSZzPPM5oUOCjaugvfhAJGHmIT5tII1XWksTz2OXmXni\ny2hGL4LxqlOahS5Y7YKm5/gvKTFmV/OQDuOx/lgWLNmWGFwid/HqMSjOWp08\nNo4yMkt37NEjp7kaRn80gb72xEciUfEDxRBfsgHzitAP3WvABX83/dB2Yz/p\ndzI9XFC73LjnCro9HHhzhps8CaA/O3Sj/uhl+oHCBA5sP0HXlcTT22y7nM6L\n8/mwcruXmzSro3dfghk3xJrkPhB3kt9OLHcsWtbdi4t/2EStZIl5vpkgfBHG\nFPADseg3Pr2f/m0/i5Tl9b8C+vLQRX+j/jmla+r+fQepsqjYO04A66TKQFoP\nJqy24csF1wmsJIUY0ozQxCLQh+nCtgo2+dHwgAWH7nH28XSMwQpcMXJToCEh\nE6GEVPbfIB1yHHvamT7GzH6UEpFLn7vM3uBQ68CuP6p+CqpqE/eh5no3yJ4s\nZMgkNJdXUHVoMGLRGvvxYstR8VLK+Thx6tw/YMphYdY0GU8EuQfmQgdahd/Z\nu8QNR2SrADDFncKSzk+l/PQ3szIP71Xx88twaCEWENRTKlFcREU36Cxeuenx\nXeUX\r\n=tRBN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDO1W18J2DVFvmgeqSNBuzaiyRm0XyfDDc1pDIS84CCdQIgRQs47InxnJfyiGQmBz09GMn9jOBGF7hbwwmqv4d1UDo="}]},"maintainers":[{"name":"xbilek18","email":"honza@elision.design"},{"name":"xcharvat","email":"dan@elision.design"}],"_npmUser":{"name":"xbilek18","email":"honza@elision.design"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-gtm_2.3.2_1588166954051_0.6208848489495093"},"_hasShrinkwrap":false}},"time":{"created":"2020-04-29T13:04:40.180Z","2.3.0":"2020-04-29T13:04:40.580Z","modified":"2022-04-05T07:12:12.099Z","2.3.1":"2020-04-29T13:23:25.601Z","2.3.2":"2020-04-29T13:29:14.193Z"},"maintainers":[{"name":"xbilek18","email":"honza@elision.design"},{"name":"xcharvat","email":"dan@elision.design"}],"description":"Google Tag Manager implementation in Vue application","homepage":"https://github.com/mib200/vue-gtm","keywords":["analytics","universal analytics","google analytics","google tag manager","vue analytics","vue tag manager","vue google tag manager","vue js google tag manager","vuejs google tag manager","vue js analytics","vue gtm","vuejs gtm","vue js gtm","vuejs","tracking","Vue2","vue","google"],"repository":{"type":"git","url":"git+https://github.com/mib200/vue-gtm.git"},"author":{"name":"Manish Kumar"},"bugs":{"url":"https://github.com/mib200/vue-gtm/issues"},"license":"Apache-2.0","readme":"<h1 align=\"center\">\n  Vue Google Tag Manager\n  <br>\n  <br>\n</h1>\n\n<h4 align=\"center\">Simple implementation of Google Tag Manager in Vue.js</h4>\n\n<p align=\"center\">\n  <a href=\"https://github.com/feross/standard\"><img src=\"https://cdn.rawgit.com/feross/standard/master/badge.svg\" alt=\"Standard - JavaScript Style Guide\"></a>\n</p>\n<br>\n\nThis plugin will helps you in your common GTM tasks.\n\n**Note: If you are looking to track all Vuex mutations, you can use [Vuex GTM plugin](https://gist.github.com/matt-e-king/ebdb39088c50b96bbbbe77c5bc8abb2b)**\n\n# Requirements\n\n* **Vue.js.** >= 2.0.0\n* **Google Tag Manager account.** To send data to\n\n**Optionnals dependencies**\n\n* **Vue Router** >= 2.x - In order to use auto-tracking of screens\n\n# Configuration\n\n`npm install vue-gtm -S` or `yarn add vue-gtm` if you use [Yarn package manager](https://yarnpkg.com/)\n\nHere is an example of configuration, compose with it on your own :\n\n```javascript\nimport VueGtm from 'vue-gtm';\nimport VueRouter from 'vue-router';\nconst router = new VueRouter({ routes, mode, linkActiveClass });\n\nVue.use(VueGtm, {\n  id: 'GTM-xxxxxxx' or ['GTM-xxxxxxx', 'GTM-xxxxxxx'], // Your GTM single container ID or array of container ids ['GTM-xxxxxxx', 'GTM-yyyyyyy']\n  queryParams: { // Add url query string when load gtm.js with GTM ID (optional)\n    gtm_auth:'AB7cDEf3GHIjkl-MnOP8qr',\n    gtm_preview:'env-4',\n    gtm_cookies_win:'x'\n  },\n  enabled: true, // defaults to true. Plugin can be disabled by setting this to false for Ex: enabled: !!GDPR_Cookie (optional)\n  debug: true, // Whether or not display console logs debugs (optional)\n  loadScript: true, // Whether or not to load the GTM Script (Helpful if you are including GTM manually, but need the dataLayer functionality in your components) (optional) \n  vueRouter: router, // Pass the router instance to automatically sync with router (optional)\n  ignoredViews: ['homepage'] // If router, you can exclude some routes name (case insensitive) (optional)\n});\n```\n\nThis injects the tag manager script in the page, except when `enabled` is set to `false`.\nIn that case it will be injected when calling `this.$gtm.enable(true)` for the first time.\n\nRemember to enable the History Change Trigger for router changes to be sent through GTM.\n\n# Documentation\n\nOnce the configuration is completed, you can access vue gtm instance in your components like that :\n\n```javascript\nexport default {\n  name: 'MyComponent',\n  data() {\n    return {\n      someData: false\n    };\n  },\n  methods: {\n    onClick: function() {\n      this.$gtm.trackEvent({\n        event: null, // Event type [default = 'interaction'] (Optional)\n        category: 'Calculator',\n        action: 'click',\n        label: 'Home page SIP calculator',\n        value: 5000,\n        noninteraction: false // Optional\n      });\n    }\n  },\n  mounted() {\n    this.$gtm.trackView('MyScreenName', 'currentpath');\n  }\n};\n```\n\nThe passed variables are mapped with GTM data layer as follows\n\n```\ndataLayer.push({\n\t'event': event || 'interaction',\n\t'target': category,\n\t'action': action,\n\t'target-properties': label,\n\t'value': value,\n\t'interaction-type': noninteraction,\n\t...rest\n});\n```\n\nYou can also access the instance anywhere whenever you imported `Vue` by using `Vue.gtm`. It is especially useful when you are in a store module or\nsomewhere else than a component's scope.\n\n## Sync gtm with your router\n\nThanks to vue-router guards, you can automatically dispatch new screen views on router change !\nTo use this feature, you just need to inject the router instance on plugin initialization.\n\nThis feature will generate the view name according to a priority rule :\n\n* If you defined a meta field for you route named `gtm` this will take the value of this field for the view name.\n* Otherwise, if the plugin don't have a value for the `meta.gtm` it will fallback to the internal route name.\n\nMost of time the second case is enough, but sometimes you want to have more control on what is sent, this is where the first rule shine.\n\nExample :\n\n```javascript\nconst myRoute = {\n  path: 'myRoute',\n  name: 'MyRouteName',\n  component: SomeComponent,\n  meta: { gtm: 'MyCustomValue' }\n};\n```\n\n> This will use `MyCustomValue` as the view name.\n\n## Methods\n\n### Enable plugin\n\nCheck if plugin is enabled\n\n```\nthis.$gtm.enabled()\n```\n\nEnable plugin\n\n```\nthis.$gtm.enable(true)\n```\n\nDisable plugin\n\n```\nthis.$gtm.enable(false)\n```\n\n### Debug plugin\n\nCheck if plugin is in debug mode\n\n```\nthis.$gtm.debugEnabled()\n```\n\nEnable debug mode\n\n```\nthis.$gtm.debug(true)\n```\n\nDisable plugin\n\n```\nthis.$gtm.debug(false)\n```\n\n## Credits\n\n[ScreamZ vue-analytics](https://github.com/ScreamZ/vue-analytics)\n","readmeFilename":"README.md"}