{"id":19501103,"url":"https://github.com/gitbookio/plugin-ga","last_synced_at":"2025-07-19T02:03:31.019Z","repository":{"id":16276309,"uuid":"19024684","full_name":"GitbookIO/plugin-ga","owner":"GitbookIO","description":"Google Analytics tracking for your book","archived":false,"fork":false,"pushed_at":"2017-02-18T22:30:07.000Z","size":33,"stargazers_count":52,"open_issues_count":6,"forks_count":23,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-03T16:12:24.431Z","etag":null,"topics":["gitbook","google-analytics"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GitbookIO.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":"2014-04-22T09:49:40.000Z","updated_at":"2023-11-05T03:06:34.000Z","dependencies_parsed_at":"2022-09-14T11:40:49.933Z","dependency_job_id":null,"html_url":"https://github.com/GitbookIO/plugin-ga","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/GitbookIO/plugin-ga","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fplugin-ga","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fplugin-ga/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fplugin-ga/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fplugin-ga/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GitbookIO","download_url":"https://codeload.github.com/GitbookIO/plugin-ga/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fplugin-ga/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265872063,"owners_count":23842121,"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":["gitbook","google-analytics"],"created_at":"2024-11-10T22:11:10.744Z","updated_at":"2025-07-19T02:03:30.996Z","avatar_url":"https://github.com/GitbookIO.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Google Analytics tracking for GitBook\n==============\n\nYou can use install it via **NPM**:\n\n```\n$ npm install gitbook-plugin-ga\n```\n\nAnd use it for your book with in the book.json:\n\n```\n{\n    \"plugins\": [\"ga\"]\n}\n```\n\nYou can set the Google Analytics tracking ID using the plugins configuration in the book.json:\n\n```\n{\n    \"plugins\": [\"ga\"],\n    \"pluginsConfig\": {\n        \"ga\": {\n            \"token\": \"UA-XXXX-Y\"\n        }\n    }\n}\n```\n\nYou can customize the tracker object by passing additional configuration options. You can either pass in `auto`, `none` or an object:\n\n```\n{\n    \"plugins\": [\"ga\"],\n    \"pluginsConfig\": {\n        \"ga\": {\n            \"token\": \"UA-XXXX-Y\",\n            \"configuration\": {\n                \"cookieName\": \"new_cookie_name\",\n                \"cookieDomain\": \"mynew.domain.com\"\n            }\n        }\n    }\n}\n```\n\nFor an overview of all available configuration parameters, please refer to the [analytics.js field reference](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#create).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitbookio%2Fplugin-ga","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitbookio%2Fplugin-ga","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitbookio%2Fplugin-ga/lists"}