‚̧Nimble Polyglot Microcosm
    Wondering what‚Äôs next for npm?Check out our public roadmap! ¬Ľ

    hbs-analyticsjs-snippet

    0.2.1¬†‚Äʬ†Public¬†‚Äʬ†Published

    hbs-analyticsjs-snippet

    Handlebars helper for the analytics.js snippet.

    Installation

    $ npm install hbs-analyticsjs-snippet
    

    Example

    var snippet = require('hbs-analyticsjs-snippet');
    var hbs = require('hbs');
     
    hbs.registerHelper('analyticsjs', snippet('WRITE_KEY'));
     <script>
        {{ analyticsjs }}
      </script> 

    API

    snippet(writeKey, options)

    Creates a handlebars helper for the analytics.js snippet, with a writeKey and custom options:

    {
      min: true, // minified snippet by default
      host: 'cdn.segment.com' // where your analytics.js is hosted
    }

    License

    WWWWWW||WWWWWW
     W W W||W W W
          ||
        ( OO )__________
         /  |           \
        /o o|    MIT     \
        \___/||_||__||_|| *
             || ||  || ||
            _||_|| _||_||
           (__|__|(__|__|
    

    Install

    npm i hbs-analyticsjs-snippet

    DownloadsWeekly Downloads

    6

    Version

    0.2.1

    License

    none

    Unpacked Size

    2.32 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar