Better Analytics

Better Analytics 3.1.1

No permission to download
Hello, @digitalpoint, thanks for this addon.

What happens with this addon if you have already customized your google_analytics template? For example, I've added a "_gaq.push(['_setDomainName', 'tmswiki.org']);" line to that template. I also de-minified the code a bit by pasting in the non-universal code from Google. I did that because my javascript isn't good enough to feel comfortable adding the "_gaq.push(['_setDomainName', 'tmswiki.org']);" into the slightly minified version that is there normally (see http://mathiasbynens.be/notes/async-analytics-snippet ).
Code:
<xen:if is="{$xenOptions.googleAnalyticsWebPropertyId}">
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-6933989-9']);
  _gaq.push(['_setDomainName', 'tmswiki.org']);
  _gaq.push(['_trackPageview']);
  (function() {
  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>
<xen:comment><!--NOT Adapted from http://mathiasbynens.be/notes/async-analytics-snippet--></xen:comment></xen:if>
 
If you have made your own changes to the defsult GA code, you wouldn't want to use this addon, because it would overwrite those changes.
 
Are you going to implement a way to differentiate between members and guests? There is an add-on that does that but I prefer yours because it seems more complete.
 
Top Bottom