Section plugin that adds the Google Analytics tracking code to html files.
This is a plugin for Section, a static site generator, that adds the Google Analytics tracking code to html files.
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
Here’s an example
Gruntfile.js config for Section using
gruntinitConfigsection: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.