<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Digital Life of Keith Baker.&#187; analytics and metrics Archives  &#8211; iKeif &#8211; tech and social media geek, mootools fan, and a ton of links</title>
	<atom:link href="http://ikeif.net/category/web/analytics-and-metrics/feed/" rel="self" type="application/rss+xml" />
	<link>http://ikeif.net</link>
	<description>iKeif.net - Web developer, father, and brewer.</description>
	<lastBuildDate>Sat, 08 May 2010 03:07:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Google Analytics Moo-ized</title>
		<link>http://ikeif.net/2008/10/14/google-analytics-mooized/</link>
		<comments>http://ikeif.net/2008/10/14/google-analytics-mooized/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 04:49:49 +0000</pubDate>
		<dc:creator>keif</dc:creator>
				<category><![CDATA[analytics and metrics]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[metrics]]></category>
		<category><![CDATA[tagging]]></category>

		<guid isPermaLink="false">http://ikeif.net/?p=295</guid>
		<description><![CDATA[As both David Walsh and I wrote about Google Analytics Tracking utilizing Mootools to make your outbound link tracking easier, and David did setup a variable for the Google Tracking code *before* we run the code to tag our outbound links.
Upon second review, it&#8217;s a little different than the modified code I presented yesterday, but [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>As both <a href="http://davidwalsh.name">David Walsh</a> and I wrote about Google Analytics Tracking utilizing Mootools to make your outbound link tracking easier, and David did setup a variable for the Google Tracking code *before* we run the code to tag our outbound links.</p>
<p>Upon second review, it&#8217;s a little different than the modified code I presented yesterday, but I dig using the href replacement on your outgoing string.</p>
<p>Here&#8217;s the updated code:<br />
[sourcecode language='javascript']<br />
window.addEvent(&#8216;load&#8217;,function(){<br />
// Double-checking in case your drop this site wide<br />
// Do anchors exist on the page?<br />
if ($$(&#8216;a&#8217;)){<br />
$$(&#8216;a&#8217;).each(function(anchor){<br />
var href = anchor.get(&#8216;href&#8217;);<br />
// if it matches my site or is an absolute path it&#8217;s outgoing<br />
if(href.indexOf(&#8216;http://ikeif.net&#8217;) == -1 &#038;&#038; href.indexOf(&#8216;/&#8217;) !== 0) {<br />
anchor.addEvent(&#8216;click&#8217;, function(e){<br />
var track = &#8220;pageTracker._trackPageview(&#8216;/outgoing/&#8217;&#8221; + href.replace(&#8216;http://&#8217;,&#8221;);<br />
}<br />
}<br />
});<br />
}<br />
});<br />
[/sourcecode]</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://ikeif.net">The Digital Life of Keith Baker.</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@ikeif.net so we can take legal action immediately.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://ikeif.net/2008/10/14/google-analytics-mooized/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using MooTools and Google Analytics to track outbound links</title>
		<link>http://ikeif.net/2008/10/14/mootools-google-analytics-track-outbound-links/</link>
		<comments>http://ikeif.net/2008/10/14/mootools-google-analytics-track-outbound-links/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 15:46:26 +0000</pubDate>
		<dc:creator>keif</dc:creator>
				<category><![CDATA[analytics and metrics]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[duplicity]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[tagging]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://ikeif.net/?p=279</guid>
		<description><![CDATA[This seems to be something that people always want to do at some point &#8211; are people clicking on my outbound links?
How Google recommends external tracking
They currently recommend you tag your links like:
&#60;a href="http://www.example.com" onClick="javascript: pageTracker._trackPageview("/G1/example.com");"&#62;
Just as a point of reference &#8211; the /G1/example.com is purely symbolic &#8211; you can use the artificial pagename as [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>This seems to be something that people always want to do at some point &#8211; are people clicking on my outbound links?</p>
<h2>How Google recommends external tracking</h2>
<p>They <a href="http://www.google.com/support/analytics/bin/answer.py?hl=en&amp;answer=72712">currently recommend</a> you tag your links like:</p>
<pre><span style="font-family: Courier New,Courier,monospace;">&lt;a href="http://www.example.com" onClick="javascript: pageTracker._trackPageview("/G1/example.com");"&gt;</span></pre>
<p>Just as a point of reference &#8211; the /G1/example.com is purely symbolic &#8211; you can use the artificial pagename as the Goal URL in your analytics, as google shows:</p>
<pre><span style="font-family: Courier New,Courier,monospace;">/G1/example_com</span></pre>
<p>or</p>
<pre><span style="font-family: Courier New,Courier,monospace;">http://mysite.com/G1/example_com</span></pre>
<p>Kind of tedious, wouldn&#8217;t you say? Do you really want to run through your site and specifically tag each link that goes somewhere else? I&#8217;ve seen functions attached that basically duplicate this functionality &#8211; but if you&#8217;re moving the &#8220;onclick&#8221; into a function, it seems pretty much a moot effort.</p>
<p>So, boom goes the dynamite, and in comes javascript.</p>
<h2>Add outbound tracking javascript</h2>
<p>This code from Jamie Huskisson accomplishes it simply:<br />
[sourcecode language='javascript']<br />
if (document.getElementsByTagName){<br />
var ahrefs = document.getElementsByTagName(&#8216;a&#8217;);<br />
for(var i=0;i<ahrefs .length;i++){<br />
if(ahrefs[i].href.indexOf('http://ikeif.net') == -1 &amp;&amp; !ahrefs[i].onclick){<br />
ahrefs[i].onclick = function(){<br />
var track = this.href + "pageTracker._trackPageview('/outgoing/'"+track.substring(7));<br />
}<br />
}<br />
}<br />
}<br />
[/sourcecode]<br />
Nice and succint, as code should be. In this example, it checks to see if we can grab tags - grabs all anchors, and then we check to see if they reference my site and there is no onclick event, and if so - assign the onclick! Technically, you don't necessarilly need the track.substring(7) - you can call it something else if you like.</p>
<h2>Do the same &#8211; but with MooTools!<br />
As I&#8217;m sure you&#8217;ve figured it out, I&#8217;m a fan of <a href="http://mootools.net">mootools</a> &#8211; one of the many well done javascript frameworks. The above code is just as easilly executed:<br />
[sourcecode language='javascript']<br />
window.addEvent(&#8216;domready&#8217;,function(){<br />
if ($$(&#8216;a&#8217;)){<br />
$$(&#8216;a&#8217;).each(function(anchor){<br />
var href = anchor.get(&#8216;href&#8217;);<br />
if(href.indexOf(&#8216;http://ikeif.net&#8217;) == -1 &amp;&amp; href.indexOf(&#8216;/&#8217;) !== 0) {<br />
anchor.addEvent(&#8216;click&#8217;, function(e){<br />
var track = this.href +&#8221;pageTracker._trackPageview(&#8216;/outgoing/&#8217;&#8221; + track.substring(7);<br />
}<br />
}<br />
});<br />
}<br />
});<br />
[/sourcecode]<br />
[Edit: It just so happens that <a href="http://davidwalsh.name">David Walsh</a> hit the same topic!]</ahrefs></p>
<hr/>Copyright &copy; 2010 <strong><a href="http://ikeif.net">The Digital Life of Keith Baker.</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@ikeif.net so we can take legal action immediately.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://ikeif.net/2008/10/14/mootools-google-analytics-track-outbound-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Filtering Yourself Out of Google Analytics</title>
		<link>http://ikeif.net/2008/07/28/filtering-yourself-out-of-google-analytics/</link>
		<comments>http://ikeif.net/2008/07/28/filtering-yourself-out-of-google-analytics/#comments</comments>
		<pubDate>Mon, 28 Jul 2008 08:48:13 +0000</pubDate>
		<dc:creator>keif</dc:creator>
				<category><![CDATA[analytics and metrics]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[google analytics]]></category>
		<category><![CDATA[metrics]]></category>
		<category><![CDATA[sem]]></category>

		<guid isPermaLink="false">http://ikeif.net/?p=152</guid>
		<description><![CDATA[As a developer and an enthusiast of metrics and media, it&#8217;s handy to help flesh out your numbers and &#8220;weed yourself out.&#8221; Numbers &#8211; especially metrics &#8211; can help define success or failure of campaigns.
Why would I filter myself?
Why should you neglect yourself? Ever number counts, right? Well, because as a developer (or author, or [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>As a developer and an enthusiast of metrics and media, it&#8217;s handy to help flesh out your numbers and &#8220;weed yourself out.&#8221; Numbers &#8211; especially metrics &#8211; can help define success or failure of campaigns.</p>
<h2>Why would I filter myself?</h2>
<p>Why should you neglect yourself? Ever number counts, right? Well, because as a developer (or author, or editor, or paranoid owner) you can skew your metrics numbers by visiting, testing, reloading, hitting the page again and again &#8211; throwing off all your numbers. You need unadulterated materials to work with &#8211; so at launch when all the employees are visiting that cool new micro site, you know that those million visits were filtered out, which makes the million other visits a lot more relevant.</p>
<h2>How to: filter by IP address</h2>
<p>Google makes it incredibly easy &#8211; you just need to follow a few basic steps.</p>
<ol>
<li>Collect the IP addresses you need blocked (i.e. the network you want blocked).</li>
<li>Log in to <a href="http://www.google.com/analytics">Google Analytics</a> and select &#8220;edit&#8221; under profile, in the same row as your site.
<p><div id="attachment_153" class="wp-caption alignright" style="width: 150px">
	<a rel="attachment wp-att-153" href="http://ikeif.net/2008/07/28/filtering-yourself-out-of-google-analytics/picture-3/"><img class="size-thumbnail wp-image-153" title="Analytics Settings" src="http://ikeif.net/wp-content/uploads/2008/07/picture-3-150x150.gif" alt="Google Analytics Dashboard Snap-shot" width="150" height="150" /></a>
	<p class="wp-caption-text">Google Analytics Dashboard Snap-shot</p>
</div></li>
<li>Go to the section &#8216;Filters applied to profile&#8217; and select &#8216;+Add Filter.&#8217;</li>
<li>For this example we want to choose ‘Exclude all traffic from an IP address’</li>
<li>Enter the IP address(es) you collected, and in true coders fashion, we are going to &#8216;escape&#8217; the &#8216;.&#8217; using a backslash  &#8211; like xxx\.xxx\.xx\.xx</li>
</ol>
<h2>How to: filter by domain</h2>
<p>Working on a recent project, I noticed that their hits were skyrocketing &#8211; due to the massive amounts of hits from my testing (and their testing, and QA). They had no filters set up on their development site!</p>
<p>As a developer, this should be standard practice &#8211; or, if you have a metrics person to work with, have them set up the filter for you. You don&#8217;t want to &#8220;comment out&#8221; the analytics code &#8211; this can cause you to forget to uncomment it, or worse case, find another developer has deleted the un-used code (and if you don&#8217;t have a subversion repository, you could lose whatever custom code was being used). Fortunately, it&#8217;s just as easy to filter out your test domains &#8211; On step four, you just select ‘Exclude all traffic from a domain’ and enter it in &#8211; a la &#8216;dev.test.com.&#8217;</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://ikeif.net">The Digital Life of Keith Baker.</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@ikeif.net so we can take legal action immediately.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">Plugin</a> by <a href="http://www.taragana.com/">Taragana</a></span>]]></content:encoded>
			<wfw:commentRss>http://ikeif.net/2008/07/28/filtering-yourself-out-of-google-analytics/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
