<?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 Pringle &#187; subdomain tracking</title>
	<atom:link href="http://brettpringle.com/index.php/tag/subdomain-tracking/feed/" rel="self" type="application/rss+xml" />
	<link>http://brettpringle.com</link>
	<description>The parts between search, social and marketing</description>
	<lastBuildDate>Wed, 07 Apr 2010 08:56:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Subdomain tracking using custom analytics tracking script &amp; filters</title>
		<link>http://brettpringle.com/analytics/subdomain-tracking-using-custom-analytics-tracking-script-filters/</link>
		<comments>http://brettpringle.com/analytics/subdomain-tracking-using-custom-analytics-tracking-script-filters/#comments</comments>
		<pubDate>Sun, 17 May 2009 13:13:09 +0000</pubDate>
		<dc:creator>Brett Pringle</dc:creator>
				<category><![CDATA[Analytics]]></category>
		<category><![CDATA[subdomain tracking]]></category>

		<guid isPermaLink="false">http://brettpringle.com/?p=132</guid>
		<description><![CDATA[There are a few pro&#8217;s and con&#8217;s to setting up individual Google Analytics website profiles for subdomains VS using a custom script to track to track your visitors across a website&#8217;s various subdomains. This post will cover using a custom Google Analytics script to track your visitor data across various subdomains within your website. If [...]<p><a href="http://brettpringle.com/analytics/subdomain-tracking-using-custom-analytics-tracking-script-filters/">Subdomain tracking using custom analytics tracking script &#038; filters</a> is a post from: <a href="http://brettpringle.com">The Pringle</a></p>


<h3>Related Posts</h3>
<ol>
		<li><a href="http://brettpringle.com/analytics/exclude-filter-in-analytics-for-wordpress-post-page-previews/" rel="bookmark">Exclude filter in analytics for WordPress post/page previews</a><!-- (2)--></li>
		<li><a href="http://brettpringle.com/analytics/google-analytics-creating-multiple-goals/" rel="bookmark">Google Analytics &#8211; creating multiple goals</a><!-- (2)--></li>
		<li><a href="http://brettpringle.com/analytics/what-is-bounce-rate/" rel="bookmark">What is bounce rate? Answer is not always call to actions</a><!-- (2)--></li>
	</ol>
]]></description>
			<content:encoded><![CDATA[<p>There are a few pro&#8217;s and con&#8217;s to setting up individual <a title="Google Analytics" href="http://www.google.com/analytics/" target="_blank">Google Analytics</a> website profiles for subdomains VS using a custom script to track to track your visitors across a website&#8217;s various subdomains. This post will cover using a custom Google Analytics script to <strong>track your visitor data across various subdomains within your website</strong>. If you are concerned on how you will be able to differ between the various subdomains from your analytics data, not to worry, i will cover that further within this post.</p>
<p>I recently had the task of creating a new analytics account for a client, where the website had a few key subdomains, each with their own unique content, however the parent domain was simply a landing page, used to direct users to the relevant subdomains depending on the content needs. Now as the parent domain performs well within search engines (<em>as well as the central point of contact for any <a title="Navigational/Branded Search (Slide 7)" href="http://www.slideshare.net/brettpringle/blended-search-results-have-changed-search-behaviour" target="_blank">navigational search</a></em>), the need to track visitor data from the parent domain and then across all subdomains became a necessity.</p>
<h2>Custom GA tracking script</h2>
<p>After creating your analytics account and your first website profile (<em>for your parent domain</em>), you will need to make a <strong>small change to the GA tracking script</strong>, which you will be installing on the parent domain and across all subdomains and their pages.</p>
<p style="text-align: center;"><em><a href="http://brettpringle.com/wp-content/uploads/2009/05/setdomainname-customscript-subdomains1.png"><img class="aligncenter size-full wp-image-150" title="setDomainName tracker for custom analytic script" src="http://brettpringle.com/wp-content/uploads/2009/05/setdomainname-customscript-subdomains1.png" alt="setDomainName tracker for custom analytic script" width="620" height="133" /></a><br />
</em></p>
<p>In the above screenshot, we have added an additional line of code to the script (<em>directly under the UA tracking line</em>),  <strong>pagetracker._setDomainName(&#8220;.example.com&#8221;);</strong>. This allows Google Analytics to use the same cookies across the various subdomains to track visitor data. The downside to this would be that you will not be able to differ between similar page names within the subdomains, such as <strong><em>area.example.com/index.html</em></strong> and <em><strong>location.example.com/index.html</strong></em> (<em>Analytics reports only display the request URI</em>)<em>. </em>Adding custom filters to your profiles will however allow you to to differ between the subdomain pages.</p>
<h2>Create additional website profiles for each of your subdomains</h2>
<p style="text-align: center;"><em><a href="http://brettpringle.com/wp-content/uploads/2009/05/subdomain-google-analytics-profiles.png"><img class="aligncenter size-full wp-image-143" title="create website profiles in analytics for each subdomain" src="http://brettpringle.com/wp-content/uploads/2009/05/subdomain-google-analytics-profiles.png" alt="create website profiles in analytics for each subdomain" width="523" height="125" /></a></em></p>
<h2>Creating custom filters</h2>
<p>Now it&#8217;s time to start <strong>setting up filters</strong> for each of your subdomain website profiles. The current tracking script customisation tracks visits across all subdomains, therefore we will need to <strong>add a filter to each subdomain profile</strong> to only include traffic from that specific domain for your reports. Select the edit option associated with the subdomain profile and add a new filter. I only want to see visitor data associated with the subdomain profile i&#8217;ve created, now create a <strong>custom filter</strong> to include only from the subdomain associated with our profile.</p>
<p style="text-align: center;"><em><a href="http://brettpringle.com/wp-content/uploads/2009/05/subdomain-analytics-filter-screenshot.png"><img class="aligncenter size-full wp-image-144" title="custom filter for subdomain website profiles" src="http://brettpringle.com/wp-content/uploads/2009/05/subdomain-analytics-filter-screenshot.png" alt="custom filter for subdomain website profiles" width="426" height="343" /></a></em></p>
<p>As seen in the above screenshot, i am filtering all traffic to display only traffic associated with the specific subdomain website profile within the filter pattern. You will need to create a custom filter for each of the subdomain website profiles you have created within your Google Analytics account to track individual subdomain visitor data.</p>
<p style="text-align: center;"><em><a href="http://brettpringle.com/wp-content/uploads/2009/05/subdomain-google-analytics-profiles-with-filters.png"><img class="aligncenter size-full wp-image-145" title="Google Analytics subdomain profiles with custom filters" src="http://brettpringle.com/wp-content/uploads/2009/05/subdomain-google-analytics-profiles-with-filters.png" alt="Google Analytics subdomain profiles with custom filters" width="520" height="185" /></a></em></p>
<p>Finally, our <strong>parent domain profile will also require a filter</strong>, as mentioned earlier, Google Analytics only displays the request URI, therefore it will be difficult to differ between pages with the same name. For this i need to create an advanced filter for the parent domain website profile that will <strong>append the hostname to the request URI</strong> to display in the analytics reports.</p>
<p style="text-align: center;"><em><a href="http://brettpringle.com/wp-content/uploads/2009/05/google-analytics-advancedfilter-track-display-subdomain-urls.png"><img class="aligncenter size-full wp-image-146" title="Advanced filter on parent domain website profile in analytics" src="http://brettpringle.com/wp-content/uploads/2009/05/google-analytics-advancedfilter-track-display-subdomain-urls.png" alt="Advanced filter on parent domain website profile in analytics" width="622" height="439" /></a></em></p>
<p>Ensure that the field <strong>entries for the advanced filter are entered in identically to the ones within the screenshot</strong> above. Save the filter and we are now complete. Your Analytics account setup should look similar to the diagram below.</p>
<p style="text-align: center;"><em><a href="http://brettpringle.com/wp-content/uploads/2009/05/google-analytics-website-profiles-subdomainfilter-advanced-filter.png"><img class="aligncenter size-full wp-image-147" title="Google Analytics website profiles for domains including filters" src="http://brettpringle.com/wp-content/uploads/2009/05/google-analytics-website-profiles-subdomainfilter-advanced-filter.png" alt="Google Analytics website profiles for domains including filters" width="518" height="186" /></a></em></p>
<p>Now you are ready to track subdomain specific data within the individual website profiles created, as well as see an overview report from the parent domain profile for all data across the subdomains and parent domain for all your reporting needs.</p>
<p><a href="http://brettpringle.com/analytics/subdomain-tracking-using-custom-analytics-tracking-script-filters/">Subdomain tracking using custom analytics tracking script &#038; filters</a> is a post from: <a href="http://brettpringle.com">The Pringle</a></p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Subdomain+tracking+using+custom+analytics+tracking+script+%26+filters+-+&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://brettpringle.com/analytics/subdomain-tracking-using-custom-analytics-tracking-script-filters/&amp;title=Subdomain+tracking+using+custom+analytics+tracking+script+%26+filters&amp;summary=There%20are%20a%20few%20pro%27s%20and%20con%27s%20to%20setting%20up%20individual%20Google%20Analytics%20website%20profiles%20for%20subdomains%20VS%20using%20a%20custom%20script%20to%20track%20to%20track%20your%20visitors%20across%20a%20website%27s%20various%20subdomains.%20This%20post%20will%20cover%20using%20a%20custom%20Google%20Analytics%20script%20to%20track%20your%20visitor%20data%20across%20vari&amp;source=The Pringle" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://brettpringle.com/analytics/subdomain-tracking-using-custom-analytics-tracking-script-filters/&amp;title=Subdomain+tracking+using+custom+analytics+tracking+script+%26+filters" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://brettpringle.com/analytics/subdomain-tracking-using-custom-analytics-tracking-script-filters/&amp;t=Subdomain+tracking+using+custom+analytics+tracking+script+%26+filters" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-sphinn">
			<a href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http://brettpringle.com/analytics/subdomain-tracking-using-custom-analytics-tracking-script-filters/" rel="nofollow" class="external" title="Sphinn this on Sphinn">Sphinn this on Sphinn</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://brettpringle.com/analytics/subdomain-tracking-using-custom-analytics-tracking-script-filters/&amp;title=Subdomain+tracking+using+custom+analytics+tracking+script+%26+filters" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://brettpringle.com/analytics/subdomain-tracking-using-custom-analytics-tracking-script-filters/&amp;title=Subdomain+tracking+using+custom+analytics+tracking+script+%26+filters" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-googlereader">
			<a href="http://www.google.com/reader/link?url=http://brettpringle.com/analytics/subdomain-tracking-using-custom-analytics-tracking-script-filters/&amp;title=Subdomain+tracking+using+custom+analytics+tracking+script+%26+filters&amp;srcUrl=http://brettpringle.com/analytics/subdomain-tracking-using-custom-analytics-tracking-script-filters/&amp;srcTitle=Subdomain+tracking+using+custom+analytics+tracking+script+%26+filters&amp;snippet=There%20are%20a%20few%20pro%27s%20and%20con%27s%20to%20setting%20up%20individual%20Google%20Analytics%20website%20profiles%20for%20subdomains%20VS%20using%20a%20custom%20script%20to%20track%20to%20track%20your%20visitors%20across%20a%20website%27s%20various%20subdomains.%20This%20post%20will%20cover%20using%20a%20custom%20Google%20Analytics%20script%20to%20track%20your%20visitor%20data%20across%20vari" rel="nofollow" class="external" title="Add this to Google Reader">Add this to Google Reader</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>



<h3>Related Posts</h3>
<ol>
		<li><a href="http://brettpringle.com/analytics/exclude-filter-in-analytics-for-wordpress-post-page-previews/" rel="bookmark">Exclude filter in analytics for WordPress post/page previews</a><!-- (2)--></li>
		<li><a href="http://brettpringle.com/analytics/google-analytics-creating-multiple-goals/" rel="bookmark">Google Analytics &#8211; creating multiple goals</a><!-- (2)--></li>
		<li><a href="http://brettpringle.com/analytics/what-is-bounce-rate/" rel="bookmark">What is bounce rate? Answer is not always call to actions</a><!-- (2)--></li>
	</ol>
]]></content:encoded>
			<wfw:commentRss>http://brettpringle.com/analytics/subdomain-tracking-using-custom-analytics-tracking-script-filters/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
