<?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>Web Cash &#187; Stat Tracking</title>
	<atom:link href="http://www.earn-web-cash.com/tag/stat-tracking/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.earn-web-cash.com</link>
	<description>Writing, Designing, and Making Money Online</description>
	<lastBuildDate>Sun, 04 Dec 2011 22:52:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Google Analytics: Inserting Into a WordPress Template</title>
		<link>http://www.earn-web-cash.com/2008/03/29/google-analytics-wordpress/</link>
		<comments>http://www.earn-web-cash.com/2008/03/29/google-analytics-wordpress/#comments</comments>
		<pubDate>Sat, 29 Mar 2008 17:00:48 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[Online Tools]]></category>
		<category><![CDATA[Redirected]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Analytics]]></category>
		<category><![CDATA[Stat Tracking]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/03/29/google-analytics-wordpress/</guid>
		<description><![CDATA[Google Analytics is a great tool for gathering data about your website. You can track and analyze all kinds of data about your visitors, their navigation paths, and the effectiveness of your content. To use Google Analytics, you need to place some javascript on your website. A commonly asked question in forums is, &#8220;How do [...]]]></description>
			<content:encoded><![CDATA[<p>Google Analytics is a great tool for gathering data about your website.  You can track and analyze all kinds of data about your visitors, their navigation paths, and the effectiveness of your content.</p>
<p>To use Google Analytics, you need to place some javascript on your website.  A commonly asked question in forums is, &#8220;How do I add Google Analytics to my WordPress template?&#8221;<br />
<span id="more-184"></span></p>
<h4>Where the Analytics Code Goes</h4>
<p>When you sign up for Google Analytics, Google provides you with a short piece of javascript to place on your site.  The code should look like this.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
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;));
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
var pageTracker = _gat._getTracker(&quot;UA-2894597-3&quot;);
pageTracker._initData();
pageTracker._trackPageview();
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

<p>According to Google&#8217;s instructions, this needs to be placed at the very end of your site &#8211; just before the closing body tag.  To do this, we need to find the closing body tag on the WordPress template.</p>
<h4>Look In Footer.php</h4>
<p>As we previously discovered, a <a href="http://www.earn-web-cash.com/2008/03/10/wordpress-template-basics/">WordPress template</a> is made up of a series of files.  Three basic files &#8211; header.php, sidebar.php, and footer.php &#8211; help build the components of the page.</p>
<p>If your WordPress template follows normal conventions, the closing body tag should be in the footer.php file.</p>
<p>Go to your themes directory of the WordPress installation, navigate to your current theme, and open footer.php.  You should see something like this at the end.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;?php wp_footer<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; ?&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<p>Add a blank line before the closing body tag.  Simply copy and paste the javascript code that Google provides on that blank line, save the file, and you&#8217;re good to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/03/29/google-analytics-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

