node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



This is a plugin for Section, a static site generator, that adds the Google Analytics tracking code to html files.

Getting Started

This plugin requires the ~0.1.0 version of the grunt-section plugin.

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. You may install this plugin with this command:

npm install section-analytics --save

Example usage

Here’s an example Gruntfile.js config for Section using section-analytics:

  section: {
    target: {
      options: {
        analytics: {
          trackingID: 'UA-XXXXXXXX-Y'
      src: 'input/directory/',
      dest: 'output/directory/'


In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History


Initial version