google analytics – Grey Panthers Savannah https://grey-panther.net Just another WordPress site Sat, 29 Nov 2008 18:28:00 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.1 206299117 Measure twice… https://grey-panther.net/2008/11/measure-twice.html https://grey-panther.net/2008/11/measure-twice.html#respond Sat, 29 Nov 2008 18:28:00 +0000 https://grey-panther.net/?p=566 Some time ago I was twiddling with my blog template, when I had the “great” idea of modifying the Google Analytics tracking code such that it checks the successful loading the external script before calling the logging function, to avoid generating errors when the script failed to load (because of NoScript, hosts file entry or other reasons). So I modified it like this (warning! this contains errors!):

<script type="text/javascript">
_uacct = &quot;UA-432874-2&quot; if (urchinTracker) urchinTracker();
</script>

The “&quot;” encoding was needed because the blogger template needs to be valid XML. So what did I miss? The little fact that the two statements (assignment and if) were not separated by “;” or a newline, knocking out my analytics. This is not a big problem, since I’m not very interested in them, but it is still nice to have. Lesson learned (hopefully): measure twice, cut once. Now for the correct code if you wish to insert similar safeguards in your Blogger template:

The “old” style code:

<script src='http://www.google-analytics.com/urchin.js' type='text/javascript'>
</script>
<script type='text/javascript'>
_uacct = &quot;...your tracking code here...&quot;;
if (urchinTracker) urchinTracker();
</script>

The “new” style code:

<script type='text/javascript'>
var gaJsHost = ((&quot;https:&quot; == document.location.protocol) ? &quot;https://ssl.&quot; : &quot;http://www.&quot;);
document.write(unescape(&quot;%3Cscript src='&quot; + gaJsHost + &quot;google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E&quot;));
</script>
<script type='text/javascript'>
if (_gat) {
  var pageTracker = _gat._getTracker(&quot;...your tracking code here...&quot;);
  if (pageTracker) pageTracker._trackPageview();
}
</script>

]]>
https://grey-panther.net/2008/11/measure-twice.html/feed 0 566
If you want statistics, you better include the tracking code https://grey-panther.net/2007/01/if-you-want-statistics-you-better-include-the-tracking-code.html https://grey-panther.net/2007/01/if-you-want-statistics-you-better-include-the-tracking-code.html#respond Mon, 08 Jan 2007 08:23:00 +0000 https://grey-panther.net/?p=932 Around mid-December I did a redesign of my blog (actually I chose a different template and tweaked it a little bit :D) and forgot to include the Google Analytics tracking code in the new template. The result was that according to statistics I had 0 visitors in late December – early January. First I thought that this was because of the holiday seasons. The moment I became suspicious was when people started adding comments (so there was clearly activity on my site) and the statistics still said that no one looked at it. So I checked it out, and sure enough the tracking code was missing. I included it again, and now everything is fine.

A tip: if you want to get the tracking code for a certain site in Google Analytics (because you’re in a similar situation), go to Google Analytics, click on edit for the account and go to Check Status (it is a small link in the upper right corner of the table). You will find your tracking code there.

]]>
https://grey-panther.net/2007/01/if-you-want-statistics-you-better-include-the-tracking-code.html/feed 0 932
Economics, protecting the environment and Web 2.0 https://grey-panther.net/2006/10/economics-protecting-the-environment-and-web-2-0.html https://grey-panther.net/2006/10/economics-protecting-the-environment-and-web-2-0.html#respond Sun, 08 Oct 2006 17:46:00 +0000 https://grey-panther.net/?p=1050 What do these things have in common? During the weekend I was at at a conference of economics (weird, isn’t it?) and one of the presenters talked about how we must look at the economics if we want to achieve a given goal, for example protecting the environment. For example currently the computer manufacturing companies have no incentive to create a long living product because they sell them and their goal is to sell more. However usually we don’t buy computers because we need computers, but because we need some services. What he suggested was that if we would buy the service instead of the object (so that the computer would be leased to us instead of sold), the manufacturers would have an inherent interest in ensuring the longevity (both in the sense of quality and in the sense of being able to fulfill the given service) of their products, which in turn would reduce the environmental damage.

All this fits in nicely I think with the rush of AJAX-y / Web 2.0-y web applications that we are seeing. Because this liberates us from depending on a given computer / operating system and usually you don’t need a heavy weight machine to use them. This is a step in a “software as service” direction, so it might well be that if you are using Google Reader, you are helping the environment :).

On a more technical note: there are many advantages and disadvantages to these kind of “applications”, many of which have been already discussed years ago during the thin client versus fat client debate. It might well be that this is only a temporary phenomenon made possible by the increase of available bandwidth and that in the future the balance may again shift if the available bandwidth / average application size changes in the opposite direction (which I think is the main reason for choosing one solution over the other)

]]>
https://grey-panther.net/2006/10/economics-protecting-the-environment-and-web-2-0.html/feed 0 1050
How to exclude certain traffic from Google Analytics? https://grey-panther.net/2006/10/how-to-exclude-certain-traffic-from-google-analytics.html https://grey-panther.net/2006/10/how-to-exclude-certain-traffic-from-google-analytics.html#comments Thu, 05 Oct 2006 06:43:00 +0000 https://grey-panther.net/?p=1053 I use Google Analytics to get an idea about the traffic on my blog. However, being the low traffic volume site it is, my visits skew the results (this became clear to me when in the overview it showed me that almost 12% of my traffic came from beta.blogger.com, which is the admin interface for the blog). So I headed over to IPChicken, grabbed my IP address (having a static IP helps a lot) and added a filter. You can add filters by going in analytics settings mode and clicking edit for the site you want to add the filter for. Then select “Exclude all traffic from an IP address” and add your IP address. Be sure to replace the . with . since the string you enter is considered a regular expression. It seems that it doesn’t apply it retroactively (or maybe I just have to wait 24 hours for my stats to update), but hopefully this will lead for more accurate stats.

]]>
https://grey-panther.net/2006/10/how-to-exclude-certain-traffic-from-google-analytics.html/feed 1 1053