{"id":16259393,"url":"https://github.com/daliborgogic/ga-module","last_synced_at":"2026-04-21T05:33:43.287Z","repository":{"id":52882138,"uuid":"148127021","full_name":"daliborgogic/ga-module","owner":"daliborgogic","description":"A Nuxt.js tiny client-side module for tracking with Google Analytics","archived":false,"fork":false,"pushed_at":"2021-04-15T08:28:04.000Z","size":280,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T13:50:50.628Z","etag":null,"topics":["analytics","nuxt","ssr","tracking","vue","vue-router"],"latest_commit_sha":null,"homepage":"","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/daliborgogic.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":"2018-09-10T08:56:10.000Z","updated_at":"2023-01-29T06:29:37.000Z","dependencies_parsed_at":"2022-08-23T12:42:04.475Z","dependency_job_id":null,"html_url":"https://github.com/daliborgogic/ga-module","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/daliborgogic/ga-module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daliborgogic%2Fga-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daliborgogic%2Fga-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daliborgogic%2Fga-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daliborgogic%2Fga-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daliborgogic","download_url":"https://codeload.github.com/daliborgogic/ga-module/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daliborgogic%2Fga-module/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32078964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T02:38:07.213Z","status":"ssl_error","status_checked_at":"2026-04-21T02:38:06.559Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["analytics","nuxt","ssr","tracking","vue","vue-router"],"created_at":"2024-10-10T16:01:47.878Z","updated_at":"2026-04-21T05:33:43.259Z","avatar_url":"https://github.com/daliborgogic.png","language":"JavaScript","readme":"# ga-module\n\n\u003e A [Nuxt.js](https://github.com/nuxt/nuxt.js) tiny client-side module for tracking with [Google Analytics](https://analytics.google.com)\n\n## Setup\n\n- Add `daliborgogic/ga-module` dependency using yarn or npm to your project\n- Add `daliborgogic/ga-module` to modules section of `nuxt.config.js`\n\nReplace ```UA-XXXXXXXX-X``` by your Google Analytics tracking ID.\n\n```javascript\n{\n  modules: [\n    [ 'ga-module', { trackingID: 'UA-XXXXXXXX-X' }]\n  ]\n}\n```\n\nVoilà, [Google Analytics](https://analytics.google.com) is integrated into your [Nuxt.js](https://github.com/nuxt/nuxt.js) application and will track every page view!\n\nFor `pageview` hits _only_, if no `params` are provided, then the `document.title` and `location.href` values will be auto-filled. This allows you to send valid requests by writing:\n\n```ga.send('pageview')``` is the same as ```ga.send('pageview', { dt:document.title, dl:location.href })```\n\n## API\n\n### ga(trackerID, options)\n\n#### trackingID\nType: `String`\n\nYour Google Analytics tracker ID; eg `UA-XXXXXXXX-X`\n\n#### options.aip\nType: `Integer`\u003cbr\u003e\nDefault: `0`\n\nAnonymize the sender's IP address. See [Anonymize IP](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#aip).\n\n#### options.an\nType: `String`\n\nSpecifies the application's name. See [Application Name](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#an).\n\n#### options.aid\nType: `String`\n\nSpecifies the application identifier. See [Application ID](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#aid).\n\n#### options.aiid\nType: `String`\n\nSpecifies the application installer identifier. See [Application Installer ID](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#aiid).\n\n#### options.av\nType: `String`\n\nSpecifies the application verison. See [Application Version](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#av).\n\n#### options.ds\nType: `String`\n\nIndicates the data source type of the hit; eg `web` or `app`. See [Data Source](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#ds).\n\n\n### ga.send(type, params)\n\n#### type\nType: `String`\u003cbr\u003e\nDefault: `pageview`\n\nThe type of hit to send. Must be one of these: `pageview`, `screenview`, `event`, `transaction`, `item`, `social`, `exception`, or `timing`.\n\n#### params\nType: `Object`\n\nThe parameters to send based on the `type` of hit.\n\nPlease follow the links for each available parameter set:\n\n* [Event](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#events)\n* [Exception](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#exception)\n* [Item](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#ecomm)\n* [Pageview](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#content)\n* [Screenview](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cd)\n* [Social](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#social)\n* [Timing](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#timing)\n* [Transaction](https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#ecomm)\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaliborgogic%2Fga-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaliborgogic%2Fga-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaliborgogic%2Fga-module/lists"}