Snippets

Dan Bochichio Google Analytics on Steroids

Created by Former user

File google-analytics.html Added

  • Ignore whitespace
  • Hide word diff
+<script type="text/javascript">
+var _gas = _gas || [];
+_gas.push(['_setAccount', 'UA-YYYYYY-Y']); 
+_gas.push(['_setDomainName', '.mydomain.com']); 
+_gas.push(['_trackPageview']);
+_gas.push(['_gasTrackForms']);
+_gas.push(['_gasTrackOutboundLinks']);
+_gas.push(['_gasTrackMaxScroll']);
+_gas.push(['_gasTrackDownloads']);
+_gas.push(['_gasTrackVideo']);
+_gas.push(['_gasTrackAudio']);
+_gas.push(['_gasTrackYoutube', {force: true}]);
+_gas.push(['_gasTrackVimeo', {force: true}]);
+_gas.push(['_gasTrackMailto']);
+
+(function() {
+var ga = document.createElement('script');
+ga.id = 'gas-script';
+ga.setAttribute('data-use-dcjs', 'false'); // CHANGE TO TRUE FOR DC.JS SUPPORT
+ga.type = 'text/javascript';
+ga.async = true;
+ga.src = '//cdnjs.cloudflare.com/ajax/libs/gas/1.11.0/gas.min.js';
+var s = document.getElementsByTagName('script')[0];
+s.parentNode.insertBefore(ga, s);
+})();
+</script> 
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.