<?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>Top SEO Tips &#187; Website Statistics</title>
	<atom:link href="http://www.topsemtips.com/category/websitestatistics/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.topsemtips.com</link>
	<description>SEO and Link Building Tips</description>
	<lastBuildDate>Sat, 30 Jan 2010 22:31:19 +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 Cross Domain Setup</title>
		<link>http://www.topsemtips.com/2008/09/google-analytics-cross-domain-setup/</link>
		<comments>http://www.topsemtips.com/2008/09/google-analytics-cross-domain-setup/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 17:40:43 +0000</pubDate>
		<dc:creator>Dylan</dc:creator>
				<category><![CDATA[Website Statistics]]></category>

		<guid isPermaLink="false">http://www.topsemtips.com/?p=377</guid>
		<description><![CDATA[
			
				
			
		
I recently had quite a problem with a site that used a different website name for the checkout process compared to the regular non-secure site. For example non-secure site is www.site.com, secure site is secure.site.com. This is addressed in the Google Analytics FAQ in a number of places, mostly to do with 3rd party shopping [...]<p>Post from: <a href="http://www.topsemtips.com">Top SEO Tips</a><br/><br/><a href="http://www.topsemtips.com/2008/09/google-analytics-cross-domain-setup/">Google Analytics Cross Domain Setup</a></p>



Related posts:<ol><li><a href='http://www.topsemtips.com/2005/11/selecting-a-quality-domain-name/' rel='bookmark' title='Permanent Link: Selecting a Quality Domain Name'>Selecting a Quality Domain Name</a></li>
<li><a href='http://www.topsemtips.com/2005/11/5-ways-google-will-help-you-with-your-traffic/' rel='bookmark' title='Permanent Link: 5 Ways Google Will Help You With Your Traffic'>5 Ways Google Will Help You With Your Traffic</a></li>
<li><a href='http://www.topsemtips.com/2007/04/use-google-maps-to-help-customers-find-you-local/' rel='bookmark' title='Permanent Link: Use Google Maps to Help Customers Find You Local'>Use Google Maps to Help Customers Find You Local</a></li>
<li><a href='http://www.topsemtips.com/2005/12/googles-site-targeting-giving-control-back-to-the-advertis/' rel='bookmark' title='Permanent Link: Google&#39;s Site Targeting: &#34;Giving Control Back to the Advertis'>Google&#39;s Site Targeting: &#34;Giving Control Back to the Advertis</a></li>
<li><a href='http://www.topsemtips.com/2006/09/a-beginners-guide-to-google-adwords/' rel='bookmark' title='Permanent Link: A Beginner&#8217;s Guide to Google AdWords'>A Beginner&#8217;s Guide to Google AdWords</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin: 0 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.topsemtips.com%2F2008%2F09%2Fgoogle-analytics-cross-domain-setup%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.topsemtips.com%2F2008%2F09%2Fgoogle-analytics-cross-domain-setup%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I recently had quite a problem with a site that used a different website name for the checkout process compared to the regular non-secure site. For example non-secure site is www.site.com, secure site is secure.site.com. This is addressed in the Google Analytics FAQ in a number of places, mostly to do with 3rd party shopping carts which doesn&#8217;t really apply here. In addition this issue is mentioned by a number of other people but their solutions were missing something as well.</p>
<p>After much digging around and wrong turns from the Google Analytics FAQ I came up with the following code that seems to handle this situation perfectly.</p>
<pre style="padding-left: 30px;">&lt;!-- Start of Google Tracking --&gt;
&lt;script type="text/javascript"&gt;
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
&lt;/script&gt;
&lt;script type="text/javascript"&gt;
var pageTracker = _gat._getTracker("UA-123456-0");
pageTracker._setDomainName("<span style="color: #ff0000;">.site.com</span>");
pageTracker._setAllowHash(false);
pageTracker._setAllowLinker(true);
pageTracker._initData();
pageTracker._trackPageview();
&lt;/script&gt;
&lt;!-- End of Google Tracking --&gt;</pre>
<p>The important part I highlighted in red. Notice the peiod &#8216;.&#8217; mark before the domain name. This signifies to Analytics that the cookie it sets should be available to any subdomain from this main domain thus allowing www.site.com and secure.site.com to reference the exact same cookie. If you don&#8217;t set the text in red then the www. and secure. will set two separate cookied and your tracking will not link your sale to your referring source correctly.</p>
<p>Post from: <a href="http://www.topsemtips.com">Top SEO Tips</a><br/><br/><a href="http://www.topsemtips.com/2008/09/google-analytics-cross-domain-setup/">Google Analytics Cross Domain Setup</a></p>


<p>Related posts:<ol><li><a href='http://www.topsemtips.com/2005/11/selecting-a-quality-domain-name/' rel='bookmark' title='Permanent Link: Selecting a Quality Domain Name'>Selecting a Quality Domain Name</a></li>
<li><a href='http://www.topsemtips.com/2005/11/5-ways-google-will-help-you-with-your-traffic/' rel='bookmark' title='Permanent Link: 5 Ways Google Will Help You With Your Traffic'>5 Ways Google Will Help You With Your Traffic</a></li>
<li><a href='http://www.topsemtips.com/2007/04/use-google-maps-to-help-customers-find-you-local/' rel='bookmark' title='Permanent Link: Use Google Maps to Help Customers Find You Local'>Use Google Maps to Help Customers Find You Local</a></li>
<li><a href='http://www.topsemtips.com/2005/12/googles-site-targeting-giving-control-back-to-the-advertis/' rel='bookmark' title='Permanent Link: Google&#39;s Site Targeting: &#34;Giving Control Back to the Advertis'>Google&#39;s Site Targeting: &#34;Giving Control Back to the Advertis</a></li>
<li><a href='http://www.topsemtips.com/2006/09/a-beginners-guide-to-google-adwords/' rel='bookmark' title='Permanent Link: A Beginner&#8217;s Guide to Google AdWords'>A Beginner&#8217;s Guide to Google AdWords</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.topsemtips.com/2008/09/google-analytics-cross-domain-setup/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
