Skip to content

doodzik/metalsmith-google-analytics

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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)

About

a metalsmith plugin to add google analytics to your html site

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published