GAS – A collection of power features for the Google Analytics Tracking API

Javascript / Added on December 14, 2012 / Add to favorites

GAS is a wrapper around the Google Analytics Tracking API that offers a useful collection of power features. Installing GAS is very easy – Download the script and put it somewhere on your website and then install the basic snippet on every page of your website:

var _gas = _gas || [];
_gas.push(['_setAccount', 'UA-YYYYYY-Y']); // REPLACE WITH YOUR GA NUMBER
_gas.push(['_setDomainName', '']); // REPLACE WITH YOUR DOMAIN
_gas.push(['_gasTrackYoutube', {force: true}]);
_gas.push(['_gasTrackVimeo', {force: true}]);

(function() {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = '//';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
  • YannisDran

    a description of those “power features” would be handy.. Why otherwise would I bother with it?

    hint: yes, I saw those “_gas.push”, what I say is that you should be more descriptive…