Fixes bug 940560 - implement optional analytics

adds an optional setting for a google analytics token and modifies
the base template to include the necessary JS if the token exists