<?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>David Carrington &#187; Google Analytics</title>
	<atom:link href="http://davidcarrington.co.uk/tag/google-analytics/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidcarrington.co.uk</link>
	<description>UK web developer that loves phones</description>
	<lastBuildDate>Wed, 25 Jan 2012 13:53:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Dabr &amp; the three A&#8217;s</title>
		<link>http://davidcarrington.co.uk/2009/12/dabr-and-three-a/</link>
		<comments>http://davidcarrington.co.uk/2009/12/dabr-and-three-a/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 14:50:04 +0000</pubDate>
		<dc:creator>David Carrington</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Dabr]]></category>
		<category><![CDATA[Google AdSense]]></category>
		<category><![CDATA[Google AdWords]]></category>
		<category><![CDATA[Google Analytics]]></category>

		<guid isPermaLink="false">http://davidcarrington.co.uk/?p=234</guid>
		<description><![CDATA[Google Analytics is one of those great Google products that I&#8217;ve used from the start. It provides very useful statistics, graphs and alerts about site usage. I use it for all of my sites and have recently modified Dabr to work with it too &#8211; with only a handful of minor obstacles along the way. [...]]]></description>
			<content:encoded><![CDATA[<p>Google <strong>Analytics </strong>is one of those great Google products that I&#8217;ve used from the start. It provides very useful statistics, graphs and alerts about site usage. I use it for all of my sites and have recently modified <a title="Dabr, mobile Twitter" href="http://dabr.co.uk">Dabr</a> to work with it too &#8211; with only a handful of minor obstacles along the way.</p>
<p>First up was the fact that Google Analytics historically never had very good mobile support. Even once that was in place, I had to mess about with Google&#8217;s PHP code to <a title="Adding Opera Mini support to Google Analytics mobile tracking" href="http://davidcarrington.co.uk/2009/12/google-mobile-analytics-and-opera-mini/">add support for Opera Mini&#8217;s proxy servers</a>.</p>
<p>Then, once I had the tracking code in place and was starting to get some nice stats &#8211; I noticed a piece of text that I should have seen before I started anything:</p>
<blockquote><p>5M pageview cap per month for non AdWords advertisers.</p></blockquote>
<p>Whoops &#8211; Dabr has a <em>lot</em> more pageviews than that!</p>
<p><strong>AdWords </strong>is their service where you pay Google to show adverts that point to your site. Of course I&#8217;ve had to sign up to this (at an initial setup cost of £10) and there should begin to be a few Dabr adverts appearing on websites around the web. I&#8217;ve even started getting a few clicks.</p>
<p>Google charges me with every click of those adverts, which is a little annoying, so I&#8217;ve set up AdSense too.</p>
<p><strong>AdSense </strong>is the opposite of AdWords. It&#8217;s where I get to add other people&#8217;s adverts to my sites and I get a trickle of cash for doing so. Typically I&#8217;ve seen clicks earning me about 10p to £1 each, but clicks are fairly rare. I don&#8217;t (yet) know enough about CPM and those kind of fancy buzzwords to tell you any real figures. I&#8217;m sure I&#8217;ll blog something in the new year.</p>
<p>So now I&#8217;ve got the three A&#8217;s working nicely for Dabr:</p>
<ul>
<li><strong>AdWords </strong>to bring in potential new users,</li>
<li><strong>AdSense </strong>to bring in a little cash,</li>
<li>and <strong>Analytics </strong>to track site usage.</li>
</ul>
<p>Thanks Google :)</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 132px; width: 1px; height: 1px;"><span>5M pageview cap per month for non AdWords advertisers.</span></div>
]]></content:encoded>
			<wfw:commentRss>http://davidcarrington.co.uk/2009/12/dabr-and-three-a/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AdSense and Multiple Analytics accounts</title>
		<link>http://davidcarrington.co.uk/2009/12/adsense-and-multiple-analytics-account/</link>
		<comments>http://davidcarrington.co.uk/2009/12/adsense-and-multiple-analytics-account/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 23:46:26 +0000</pubDate>
		<dc:creator>David Carrington</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Dabr]]></category>
		<category><![CDATA[Google AdSense]]></category>
		<category><![CDATA[Google AdWords]]></category>
		<category><![CDATA[Google Analytics]]></category>

		<guid isPermaLink="false">http://davidcarrington.co.uk/?p=186</guid>
		<description><![CDATA[I have one AdSense account (the forced limit) and three Analytics accounts (work, personal, and Dabr). Can I link them up how I want to? No. The AdSense account is used to show ads down the side of this site, which I thought was an interesting idea to see what kind of money it can [...]]]></description>
			<content:encoded><![CDATA[<p>I have one AdSense account (the forced limit) and three Analytics accounts (work, personal, and Dabr). Can I link them up how I want to? No.</p>
<p>The AdSense account is used to show ads down the side of this site, which I thought was an interesting idea to see what kind of money it can pull in. It&#8217;s not much, about £1.67 in 40 days. It has highlighted something annoying to me though.</p>
<p><a href="http://www.flickr.com/photos/thox/4176956206/"><img class="alignright" title="Analytics AdSense screenshot" src="http://farm3.static.flickr.com/2503/4176956206_3755eaba32_m.jpg" alt="" width="200" height="240" /></a></p>
<p>Google lets you link up your Analytics account to your AdSense account so you can get some fairly interesting statistics like those shown in the screenshot on the right. I like it a lot as I&#8217;m a big fan of Analytics and what it can do. Unfortunately, they&#8217;ve made the next part a little frustrating: you can only link <em>one</em> of your Analytics accounts to AdSense (remember I have three).</p>
<p>So what if I want to show AdSense stats on another account? I can&#8217;t. You&#8217;re not even allowed to set up a second AdSense account because the sign up form specifically tells you not to (and makes you tick a box to agree to that). To add even more frustration, unlinking your Analytics and AdSense accounts is a manual process and you need to visit Google&#8217;s <a href="https://www.google.com/adsense/support/bin/request.py?contact_type=analyticsunlink">How do I unlink my AdSense account from Google Analytics?</a> page to contact their team to do it for you.</p>
<p>All that for some stats? Thankfully my other experience with both products has been rather smooth &#8211; for now at least! In a few days the Dabr account will go over the 5M pageviews/month limit for free accounts and I may need to sign up to AdWords to keep that working. Fun fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidcarrington.co.uk/2009/12/adsense-and-multiple-analytics-account/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google Mobile Analytics and Opera Mini</title>
		<link>http://davidcarrington.co.uk/2009/12/google-mobile-analytics-and-opera-mini/</link>
		<comments>http://davidcarrington.co.uk/2009/12/google-mobile-analytics-and-opera-mini/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 22:36:12 +0000</pubDate>
		<dc:creator>David Carrington</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[Opera Mini]]></category>

		<guid isPermaLink="false">http://davidcarrington.co.uk/?p=175</guid>
		<description><![CDATA[Google Analytics is a popular web statistics site with lots of useful features, I&#8217;ve been a big fan since the start. Google recently added a bunch of new features, and an important one out of those for me is mobile web tracking. Typically, Google&#8217;s way of tracking site usage is to ask you to put [...]]]></description>
			<content:encoded><![CDATA[<p>Google Analytics is a popular web statistics site with lots of useful features, I&#8217;ve been a big fan since the start. Google <a href="http://analytics.blogspot.com/2009/12/holiday-bonus-more-great-features.html">recently added</a> a bunch of new features, and an important one out of those for me is <em>mobile web tracking</em>.</p>
<p>Typically, Google&#8217;s way of tracking site usage is to ask you to put a small snippet of HTML onto your site which is essentially a javascript call to their servers. Great &#8211; except a lot of mobile phones don&#8217;t actually support javascript. So the only good solution is to run some code on the server. I don&#8217;t know if it&#8217;s related to <a href="http://googleblog.blogspot.com/2009/11/investing-in-mobile-future-with-admob.html">Google&#8217;s purchase of AdMob</a>, but they&#8217;ve done exactly that and provided server side code in various programming languages (C#, PHP, etc) to achieve this. See <a href="https://ssl.gstatic.com/analytics/20091201/mobile/ga.php">ga.php</a> as a real example.</p>
<p>Great, now I&#8217;ve got beautiful graphs showing me how people use my site. But what&#8217;s that? 25% of my users live in the country <em>(not set)</em>? I&#8217;ve not heard of the place! It turns out those users more or less all used one browser: Opera Mini.</p>
<p><a href="http://www.flickr.com/photos/thox/4172396551/"><img class="alignright" title="Photo of Opera Mini looking at dabr.co.uk" src="http://farm3.static.flickr.com/2644/4172396551_09fa706773_m.jpg" alt="" width="180" height="240" /></a>Oh Opera Mini, what a strange beast you are. While the Opera browser is a full normal browser, Opera Mini is a service that installs a thin client on your phone and Norwegian proxy servers visit the site for you. Norway? Well that&#8217;s a little better than living in <em>(not set)</em>.</p>
<p>Luckily, this whole problem is fixed by a teensy change in their server side code. Rather than always fetching the browser&#8217;s current IP address, I tweaked Google&#8217;s PHP code so that it detects Opera Mini is in use and sends the real user&#8217;s IP address. To be honest, I&#8217;m a little confused why this isn&#8217;t in Google&#8217;s code in the first place.</p>
<p>So here it is. A minor fix to Google&#8217;s ga.php file (line 162) to improve Opera Mini handling:</p>
<p>Original line: <code>"&amp;utmip=" . getIP($_SERVER["REMOTE_ADDR"]);</code></p>
<p>and my version: <code> "&amp;utmip=" . getIP((stristr($_SERVER['HTTP_USER_AGENT'], 'opera mini') &amp;&amp; array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER)) ? $_SERVER['HTTP_X_FORWARDED_FOR']: $_SERVER["REMOTE_ADDR"]);</code></p>
<p>That&#8217;s all. Now I get real country stats :)</p>
]]></content:encoded>
			<wfw:commentRss>http://davidcarrington.co.uk/2009/12/google-mobile-analytics-and-opera-mini/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

