{"id":13829405,"url":"https://github.com/egoist/vue-ga","last_synced_at":"2025-04-08T04:19:15.019Z","repository":{"id":45275098,"uuid":"77272032","full_name":"egoist/vue-ga","owner":"egoist","description":"Google Analytics for Vue.js","archived":false,"fork":false,"pushed_at":"2022-12-06T14:35:20.000Z","size":341,"stargazers_count":141,"open_issues_count":19,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-24T08:17:57.514Z","etag":null,"topics":["google-analytics","vue"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/egoist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-24T07:40:03.000Z","updated_at":"2024-04-28T15:24:39.000Z","dependencies_parsed_at":"2023-01-24T02:01:14.986Z","dependency_job_id":null,"html_url":"https://github.com/egoist/vue-ga","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoist%2Fvue-ga","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoist%2Fvue-ga/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoist%2Fvue-ga/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/egoist%2Fvue-ga/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/egoist","download_url":"https://codeload.github.com/egoist/vue-ga/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773726,"owners_count":20993639,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google-analytics","vue"],"created_at":"2024-08-04T10:00:36.065Z","updated_at":"2025-04-08T04:19:14.988Z","avatar_url":"https://github.com/egoist.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Libraries and Plugins"],"sub_categories":["Other"],"readme":"# vue-ga\n\n[![NPM version](https://img.shields.io/npm/v/vue-ga.svg?style=flat-square)](https://npmjs.com/package/vue-ga) [![NPM downloads](https://img.shields.io/npm/dm/vue-ga.svg?style=flat-square)](https://npmjs.com/package/vue-ga) [![Build Status](https://img.shields.io/circleci/project/egoist/vue-ga/master.svg?style=flat-square)](https://circleci.com/gh/egoist/vue-ga) [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000\u0026style=flat-square)](https://github.com/egoist/donate)\n\nSimple Google Analytics binding for Vue.js apps, 534 bytes gzipped.\n\n## Install\n\n```bash\nyarn add vue-ga\n```\n\n## Usage\n\n### vue-router\n\n```js\n// ./router/index.js\nimport VueRouter from 'vue-router'\nimport ga from 'vue-ga'\n\nVue.use(VueRouter)\n\nconst router = new VueRouter()\nga(router, 'UA-XXXXX-Y')\n\nexport default router\n```\n\n### non vue-router\n\nIt works with all SPA, even in non-Vue apps, just invoke the `collect` function after route changes, for example:\n\n```js\nga(collect =\u003e {\n  // when hash changes\n  window.onhashchange = () =\u003e {\n    collect(location.pathname + location.hash)\n  }\n}, 'UA-XXXXX-Y')\n```\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n## Author\n\n**vue-ga** © [EGOIST](https://github.com/egoist), Released under the [MIT](https://egoist.mit-license.org/) License.\u003cbr\u003e\nAuthored and maintained by EGOIST with help from contributors ([list](https://github.com/egoist/vue-ga/contributors)).\n\n\u003e [egoistian.com](https://egoistian.com) · GitHub [@egoist](https://github.com/egoist) · Twitter [@rem_rin_rin](https://twitter.com/rem_rin_rin)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegoist%2Fvue-ga","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegoist%2Fvue-ga","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegoist%2Fvue-ga/lists"}