<?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>Thin &#38; Light &#187; Google Analytics</title>
	<atom:link href="http://thinlight.org/tag/google-analytics/feed/" rel="self" type="application/rss+xml" />
	<link>http://thinlight.org</link>
	<description>Passion for the web</description>
	<lastBuildDate>Sun, 30 May 2010 06:04:01 +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 with WordPress &#8211; Exclude Your Own Visits</title>
		<link>http://thinlight.org/2007/12/14/google-analytics-with-wordpress-exclude-your-own-visits/</link>
		<comments>http://thinlight.org/2007/12/14/google-analytics-with-wordpress-exclude-your-own-visits/#comments</comments>
		<pubDate>Fri, 14 Dec 2007 16:28:16 +0000</pubDate>
		<dc:creator>thinlight</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Google Analytics]]></category>

		<guid isPermaLink="false">http://thinlight.org/2007/12/14/google-analytics-with-wordpress-exclude-your-own-visits/</guid>
		<description><![CDATA[When I started to use Google Analytics last year, I was in a big LAN. To exclude my own traffic from Google Analytics, I created a filter to exclude a small range of IP addresses. Though it may wrongly filter out some visits of people in the same LAN, it&#8217;s tolerable.
Today I&#8217;m connected to the [...]]]></description>
			<content:encoded><![CDATA[<p>When I started to use <a href="http://www.google.com/analytics/">Google Analytics</a> last year, I was in a big LAN. To exclude my own traffic from Google Analytics, I created a filter to exclude a small range of IP addresses. Though it may wrongly filter out some visits of people in the same LAN, it&#8217;s tolerable.</p>
<p>Today I&#8217;m connected to the Internet by some DSL service of an ISP and the IP address changes from time to time, not limited in a C-class range. So I can no longer exclude my visits by simply creating a filter of IP address.</p>
<p>I searched the <a href="http://www.google.com/analytics/support_overview.html">help</a> system of Google Analytics, and got a method of <a href="http://www.google.com/support/analytics/bin/answer.py?hl=en&#038;answer=55481">excluding by cookie</a>.</p>
<p>Yes, it&#8217;s great. But still it&#8217;s not convenient to set the cookie because cookies will expire one day or you may clear them by hand.</p>
<p>I was led to the wrong way since the beginning. Since we&#8217;re using Google Analytics on such a specific system &#8211; WordPress, we should discard the idea of excluding by IP and consider <strong>excluding by user</strong>.</p>
<p>Then I found some Google Analytics plugins for WordPress. For example, <a href="http://www.oratransplant.nl/uga/">Ultimate GA</a>. It provides an option of not adding analytics code to the page when it&#8217;s requested by a logged on user. And of course a lot of other great features.</p>
<p>I don&#8217;t want to use a plugin to slow down my WordPress for such a small requirement. Just surround your analytics code (usually in footer.php of current theme) with an &#8220;if&#8221; statement:</p>
<p><code>&lt;?php if (!$user_ID) { ?&gt;<br />
...your Google Analytics code...<br />
&lt;?php } ?&gt;</code></p>
<p>and it&#8217;s done.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinlight.org/2007/12/14/google-analytics-with-wordpress-exclude-your-own-visits/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
