metalsmith-google-analytics

0.0.1 • Public • Published

metalsmith-google-analytics

A Metalsmith plugin to add the google analytics code to all html files

Installation

$ npm install --save metalsmith-google-analytics

Example

var Metalsmith      = require('metalsmith')
var googleAnalytics = require('metalsmith-google-analytics')
 
Metalsmith(__dirname)
 
  // Build your full site here...
 
  .use(googleAnalytics('API-KEY'))
 
  .build()

Options

googleAnalytics(apiKey [,asyncScript])

asyncScript (optional)

( default: true )

  • specify if you want to load the synchronous or asynchronous script (doesn't support ie9)

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    12
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    12

Package Sidebar

Install

npm i metalsmith-google-analytics

Weekly Downloads

12

Version

0.0.1

License

MIT

Last publish

Collaborators

  • doodzik