{"id":20552463,"url":"https://github.com/lingobus/vue-gtagjs-directive","last_synced_at":"2026-04-20T01:34:41.282Z","repository":{"id":57396151,"uuid":"113202104","full_name":"lingobus/vue-gtagjs-directive","owner":"lingobus","description":"Vue directive for Google gtag.js","archived":false,"fork":false,"pushed_at":"2017-12-17T04:30:38.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T07:34:18.096Z","etag":null,"topics":["google-analytics","google-gtag","googleanalytics","gtag","vue","vue-gtagjs","vuejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lingobus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-05T15:51:56.000Z","updated_at":"2018-07-23T10:36:04.000Z","dependencies_parsed_at":"2022-09-18T12:10:28.344Z","dependency_job_id":null,"html_url":"https://github.com/lingobus/vue-gtagjs-directive","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/lingobus%2Fvue-gtagjs-directive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingobus%2Fvue-gtagjs-directive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingobus%2Fvue-gtagjs-directive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingobus%2Fvue-gtagjs-directive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lingobus","download_url":"https://codeload.github.com/lingobus/vue-gtagjs-directive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242131315,"owners_count":20076820,"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","google-gtag","googleanalytics","gtag","vue","vue-gtagjs","vuejs"],"created_at":"2024-11-16T02:36:20.770Z","updated_at":"2026-04-20T01:34:36.251Z","avatar_url":"https://github.com/lingobus.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-gtag-directive\n\nVue directive for Google gtag.js\n\nInstall\n====\n\u003e yarn add vue-gtagjs-directive\n\nUsage\n====\n\nFirst, include gtag.js in you page or use [vue-gtagjs](https://github.com/lingobus/vue-gtagjs)\n\n```js\nimport gtagHelper from 'vue-gtagjs-directive'\ngtagHelper.setTrackId('UA-XXXXXXXX-1')\n```\n\n## gtag('config',GA_TRACK_ID, {page_path:'/path'})\n```pug\n//- if you have setTrackId, track-id attribute can be omitted\nbutton(v-gtag.config=\"{page_path:'/path'}\", trigger-event=\"mouseup\", :before-send=\"beforeSend\", :after-send=\"afterSend\") test\n//- otherwise, track-id is mandatory\nbutton(v-gtag:config=\"{page_path:'/path'}\", track-id=\"UA-XXXXXXXX-1\", trigger-event=\"mouseup\") test\n```\n\n## gtag('event',EVENT_NAME, {event_category:'CATA','event_label':'Label'})\n```pug\nbutton(v-gtag:event=\"{event_category:'CATA','event_label':'Label'}\", event-name=\"EVENT-NAME\") test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flingobus%2Fvue-gtagjs-directive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flingobus%2Fvue-gtagjs-directive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flingobus%2Fvue-gtagjs-directive/lists"}