Socket
Socket
Sign inDemoInstall

gitbook-plugin-ga

Package Overview
Dependencies
0
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gitbook-plugin-ga

Track page views of your book into Google Analytics


Version published
Weekly downloads
266
decreased by-27.91%
Maintainers
2
Install size
81.7 kB
Created
Weekly downloads
 

Readme

Source

Google Analytics tracking for GitBook

You can use install it via NPM:

$ npm install gitbook-plugin-ga

And use it for your book with in the book.json:

{
    "plugins": ["ga"]
}

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

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

You can customize the tracker object by passing additional configuration options. You can either pass in auto, none or an object:

{
    "plugins": ["ga"],
    "pluginsConfig": {
        "ga": {
            "token": "UA-XXXX-Y",
            "configuration": {
                "cookieName": "new_cookie_name",
                "cookieDomain": "mynew.domain.com"
            }
        }
    }
}

For an overview of all available configuration parameters, please refer to the analytics.js field reference.

FAQs

Last updated on 18 Feb 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc