<?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>Giedrius Majauskas blog &#187; google analytics</title>
	<atom:link href="http://www.majauskas.com/tag/google-analytics/feed" rel="self" type="application/rss+xml" />
	<link>http://www.majauskas.com</link>
	<description></description>
	<lastBuildDate>Thu, 02 Feb 2012 15:37:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>When Google analytics is not enough: monitoring bad links</title>
		<link>http://www.majauskas.com/when-google-analytics-is-not-enough-monitoring-bad-links</link>
		<comments>http://www.majauskas.com/when-google-analytics-is-not-enough-monitoring-bad-links#comments</comments>
		<pubDate>Mon, 10 Aug 2009 17:00:01 +0000</pubDate>
		<dc:creator>Giedrius Majauskas</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[SEM]]></category>
		<category><![CDATA[404]]></category>
		<category><![CDATA[awstats]]></category>
		<category><![CDATA[google analytics]]></category>

		<guid isPermaLink="false">http://www.majauskas.com/?p=187</guid>
		<description><![CDATA[Google analytics does good job at monitoring pages visited, but what about pages that are not found on your server and thus never displayed? You can get these pages by moving the content around, having errors in your links, getting malformed links from various webmasters (often they are caused by bad software on their side [...]]]></description>
			<content:encoded><![CDATA[<p>Google analytics does good job at monitoring pages visited, but what about pages that are not found on your server and thus never displayed? You can get these pages by moving the content around, having errors in your links, getting malformed links from various webmasters (often they are caused by bad software on their side or miscommunication) or for other reasons. Even a soft like wordpress does not check comment links, which might generate 404 errors (page not found).  How to detect such links? Well, you have 3 choices, each of them have their own drawbacks.</p>
<p>1.	<a  href="http://www.google.com/webmasters">Google webmaster tools</a>. Adding your site to google webmaster tools is good idea, and there you will get information about links not found. It is most simple way, but worst as well. This is because Google detects the links that are linked and indexed. However, there might be plenty other links that need to be taken care of. For example, advertisement campaigns use non-followed (often javascript) links.</p>
<p>2.	Log analysis. That is the best method if you have access to log files and you can process them. I prefer using <a  href="http://www.awstats.org/">Awstats</a> for that, however you can do it by hand for smaller sites on apache, as errors are logged to separate file as well. The single problem with manual analysis is that error log has less information than common log. There is no referrer link mentioned in the error log. However, this can be solved by using grep to scan access log for 404 error codes as well. The drawback is that some CMS processes all requests and do not generate error codes successfully. This means that you will not see such errors in logs even if they exist.</p>
<p>3.	If you can’t access error logs, the best way of action is to use custom error pages and create a log from them. You have to log both referrer path and request uri for best result.  This approach can be implemented in many of the abovementioned CMS’es too.</p>
<p>So, what to do with bad links? This depends on what causes these links. If it is an advertisement campaign or a referrer site, you will have to create a redirect from bad link to the appropriate good one. In cases this is a malformed comment link, I would just delete it from database.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.majauskas.com/when-google-analytics-is-not-enough-monitoring-bad-links/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How not to screw yourself with Google Analytics on multi-domain sites</title>
		<link>http://www.majauskas.com/how-not-to-screw-yourself-with-google-analytics-on-multi-domain-sites</link>
		<comments>http://www.majauskas.com/how-not-to-screw-yourself-with-google-analytics-on-multi-domain-sites#comments</comments>
		<pubDate>Sat, 08 Aug 2009 17:00:59 +0000</pubDate>
		<dc:creator>Giedrius Majauskas</dc:creator>
				<category><![CDATA[SEM]]></category>
		<category><![CDATA[google analytics]]></category>

		<guid isPermaLink="false">http://www.majauskas.com/?p=184</guid>
		<description><![CDATA[I use Google analytics for site visitor monitoring like majority of webmasters today. It is free, reliable and quite good in many of the respects. However, there are couple particular cases where you can screw yourself and analyze its results incorrectly. Here we will discuss one particular problem that is not too common, but happens [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">I use Google analytics for site visitor monitoring like majority of webmasters today. It is free, reliable and quite good in many of the respects. However, there are couple particular cases where you can screw yourself and analyze its results incorrectly. Here we will discuss one particular problem that is not too common, but happens quite often: by default, Google analytics handles multi-domain website visitors incorrectly.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Google analytics is geared towards having separate accounts on each subdomain. This means following: A visitor coming from one subdomain to another one is counted as completely new visit. This inflates your traffic ranks (effectively doubles them or more). This might happen even in cases if there are no redirects between versions without www and with www. Additionally, pages with same uri on different domains are shown as one and the same page in analysis. This is not as bad, but undesired behavior, as it makes harder to track everything on your analytics accounts.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Sure, inflating your search traffic might seem handy when selling sites or bragging about daily visitor count. However, it will not help you in the long term.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">How to solve it? I have used partial solution for quite a while, where you add custom filter to put subdomain information in uri. However, it did not solve the problem with visitor amount. Recently, I have found a full solution.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">You have to add a custom filter first :</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">o<span style="white-space: pre;"> </span>Name: Subdomain_fullurl_hack</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">o<span style="white-space: pre;"> </span>Type: Custom filter &#8211; Advanced</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">o<span style="white-space: pre;"> </span>Field A -&gt; Extract A: Hostname &gt; (.*)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">o<span style="white-space: pre;"> </span>Field B -&gt; Extract B: Request URI &gt; (.*)</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">o<span style="white-space: pre;"> </span>Output To -&gt; Constructor: Request URI &gt; /$A1$B1</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Secondly, you need to modify tracker code to set domain to your domain.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">This is done by adding a line after your tracker is initialized (below var pageTracker = …. line) :</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">pageTracker._setDomainName(&#8220;.yourdomain.com&#8221;);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Btw, thank you folks at searchdigital!</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">If you want to check the results, I suggest comparing ones you get from google analytics with ones you get with log analyzers, like awstats.</div>
<p>I use Google analytics for site visitor monitoring like majority of webmasters today. It is free, reliable and quite good in many of the respects. However, there are couple particular cases where you can screw yourself and analyze its results incorrectly. Here we will discuss one particular problem that is not too common, but happens quite often: by default, Google analytics handles multi-domain website visitors incorrectly.</p>
<p>Google analytics is geared towards having separate accounts on each subdomain. This means following: A visitor coming from one subdomain to another one is counted as completely new visit. This inflates your traffic ranks (effectively doubles them or more). This might happen even in cases if there are no redirects between versions without www and with www. Additionally, pages with same uri on different domains are shown as one and the same page in analysis. This is not as bad, but undesired behavior, as it makes harder to track everything on your analytics accounts.</p>
<p><img class="alignnone size-full wp-image-185" title="analytics" src="http://www.majauskas.com/wp-content/uploads/2009/08/analytics.jpg" alt="analytics" width="615" height="260" /></p>
<p>Note &#8211; there is no real traffic decrease, however the traffic is shown 2x higher before fixing problems with subdomains.</p>
<p>Sure, inflating your search traffic might seem handy when selling sites or bragging about daily visitor count. However, it will not help you in the long term.</p>
<p>How to solve it? I have used partial solution for quite a while, where you add custom filter to put subdomain information in uri. However, it did not solve the problem with visitor amount. Recently, I have found a full solution.</p>
<p>You have to add a custom filter first :</p>
<ul>
<li>Name: Subdomain_fullurl_hack</li>
<li>Type: Custom filter &#8211; Advanced</li>
<li>Field A -&gt; Extract A: Hostname &gt; (.*)</li>
<li>Field B -&gt; Extract B: Request URI &gt; (.*)</li>
<li>Output To -&gt; Constructor: Request URI &gt; /$A1$B1</li>
</ul>
<p>Secondly, you need to modify tracker code to set domain to your domain.  This is done by adding a line after your tracker is initialized (below var pageTracker = …. line) :</p>
<p>pageTracker._setDomainName(&#8220;.yourdomain.com&#8221;);</p>
<p>Btw, thank you folks at <a  href="http://searchlightdigital.com/guides/8-awesome-google-analytics-tips-tricks/">searchdigital for this guide</a>!</p>
<p>If you want to check the results, I suggest comparing ones you get from google analytics with ones you get with log analyzers, like awstats.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.majauskas.com/how-not-to-screw-yourself-with-google-analytics-on-multi-domain-sites/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

