Package Exports
- isogram
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (isogram) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
isogram
Generates Google's Universal Analytics code with any isogrammic parameters you like

Introduction
Story
Here is the default tracking code of Google's Universal Analytics. (cf. Introduction to Analytics.js)
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');It has the immediate invoked function with seven parameters i s o g r a m.
On the other hand, here is the tracking code used in the index.html of HTML5 Boilerplate.
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;e=o.createElement(i);r=o.getElementsByTagName(i)[0];e.src='//www.google-analytics.com/analytics.js';r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));As you can see, its parameters are b o i l e r, different from the original's.
This alteration full of fun is authored by Mathias Bynens, based on the way of optimization and minification he blogged.
After seeing that, I modularized Bynens's way as this program, isogram.
What it does
isogram is a code generator. It enables us to change the parameters of the Google Analytics tracking code, as we like, as long as they are isogrammic.
Isn't it very useful? Indeed, it is so. But, I think, isogram can surprise the poeple seeing the source of your website, such as Bynens's commit.
Installation
Make sure you have installed Node.
CLI executable
npm install -g isogramProgrammatic use on Node
Coming soon.
Usage
Use on command line
isogram [parameters] [options]Parameters
Default: GoOgle
[parameters] need to be a nonpattern word with 5, 6, or 7 characters, each of whom can be a valid JavaScript variable name.
For example, yummy is not valid, but YuMmy is valid.
Options
-h, --help output usage information
-V, --version output the version number
-i, --id <tracking ID> change tracking-ID
-d, --domain-name <domain> change domain name
-m, --minify minify output
--no-color output in a single colorExample
command
isogram Company --id 12345678-9 --domain-name your-company.comoutput
!function(C,o,m,p,a,n,y){C.GoogleAnalyticsObject=a,C[a]=C[a]||function(){(C[a].q=C[a].q||[]).push(arguments)},C[a].l=+new Date,n=o.createElement(m),y=o.getElementsByTagName(m)[0],n.src=p,y.parentNode.insertBefore(n,y)}(this,document,"script","//www.google-analytics.com/analytics.js","ga");
ga("create", "UA-12345678-9', 'your-company.com");
ga("send", "pageview");License
Copyright (c) 2013 - 2014 Shinnosuke Watanabe
Unless otherwise stated, all source code in this repository is licensed under the MIT license.




