Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 608 Bytes

add_google_analytics_to_gitbook.md

File metadata and controls

27 lines (18 loc) · 608 Bytes

Add Google Analytics to gitbook

npm install gitbook-plugin-ga

In the file book.json (which you may need to create) --

You can set the Google Analytics tracking ID using the plugins configuration in the book.json:

{
	"plugins": ["ga"],
	"pluginsConfig": {
		"ga": {
			"token": "UA-XXXX-Y"
		}
	}
}

There is also traffic reporting at gitbook (assuming you've published your book that way)

Source

See also