<?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>dannytalk ™ A Danny Ng Blog &#187; Google Analytics</title>
	<atom:link href="http://www.dannytalk.com/category/google-analytics/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dannytalk.com</link>
	<description>Danny Ng blogs about SEO, Web Development, Christianity, and Life in General</description>
	<lastBuildDate>Sun, 11 Jul 2010 13:03:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Google Analytics: Advanced Filters Guide</title>
		<link>http://www.dannytalk.com/2009/07/11/google-analytics-advanced-filters-guide/</link>
		<comments>http://www.dannytalk.com/2009/07/11/google-analytics-advanced-filters-guide/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 13:07:21 +0000</pubDate>
		<dc:creator>danny</dc:creator>
				<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[advanced filters]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[regular expressions]]></category>

		<guid isPermaLink="false">http://www.dannytalk.com/?p=623</guid>
		<description><![CDATA[Thought I&#8217;d share a post on how to use advanced filters in Google Analytics and what are some scenarios where they can come in handy. Advanced filters are very useful for extracting information from available fields (i.e. campaign source, campaign term) using regular expressions and then using the extracted information to manipulate other fields in [...]]]></description>
			<content:encoded><![CDATA[<p>Thought I&#8217;d share a post on how to use advanced filters in <a href="http://www.dannytalk.com/category/google-analytics/">Google Analytics</a> and what are some scenarios where they can come in handy.</p>
<p>Advanced filters are very useful for extracting information from available fields (i.e. campaign source, campaign term) using regular expressions and then using the extracted information to manipulate other fields in <a href="http://www.dannytalk.com/category/google-analytics/">Google Analytics</a> so that you can customise how data is recorded in your reports.</p>
<p style="text-align: left;"><a title="Advanced Filters" rel="lightbox" href="http://www.dannytalk.com/wp-content/uploads/2009/07/advanced-filters.png"><img class="aligncenter size-full wp-image-624" title="advanced-filters" src="http://www.dannytalk.com/wp-content/uploads/2009/07/advanced-filters.png" alt="advanced-filters" width="577" height="396" /></a></p>
<p>First of all, before you use advanced filters, it is important that you have some kind of basic knowledge on <a title="Regular Expressions Tutorial" href="http://www.regular-expressions.info/" target="_blank">regular expressions</a>. If you don&#8217;t, then perhaps it&#8217;s a good idea to read up on what those cryptic symbols mean and how they&#8217;re very useful in pattern matching.</p>
<p style="text-align: left;"><span id="more-623"></span>Once you&#8217;ve gotten a handle on some basic regular expressions, go to your filter manager and create a new filter. In filter type, select custom filter and then the advanced radio button. You will see three drop down menus with a text field next to each one of them. In the drop down menus, you will see a <a title="Google Analytics Fields" href="http://www.google.com/support/analytics/bin/answer.py?answer=55588" target="_blank">list of fields available</a> in <a href="http://www.dannytalk.com/tag/google/">Google</a> Analytics available for you to use.</p>
<p style="text-align: left;">Each advanced filter allows you to extract information from a maximum of 2 fields, field A and field B while allowing you to write information to a maximum of 1 field, the constructor.</p>
<p style="text-align: left;">Once you&#8217;ve selected a desired field to extract information from, you will need to enter the regular expression in the text field beside it. In your regular expressions, the parenthesis () is used to extract the matching parts of the field value and then storing these matches into variables. The variables $A and $B refer to fields and the numbers refer to the order of the parenthesis (i.e. $A3 corresponds to the 3rd parenthesis of field A&#8217;s matched regular expression.). These variables can then be accessed in the constructor to return the extracted value.</p>
<p style="text-align: left;">So let&#8217;s look at an example. Let&#8217;s say I wanted to append the category name based on the URL query string parameter to the page title because my CMS can&#8217;t seem to generate the category names in the page title and I can&#8217;t get any meaningful insights into which categories are popular from the content reports.</p>
<p style="text-align: center;"><a title="Advanced Filter Example" rel="lightbox" href="../wp-content/uploads/2009/07/filter-example.png"><img class="aligncenter" title="filter-example" src="../wp-content/uploads/2009/07/filter-example.png" alt="filter-example" width="577" height="396" /></a></p>
<p style="text-align: left;">In field A, I will choose <em>Request URI</em> and next to it, my regular expression <em>(\?|&amp;)cat=([^&amp;])*</em> which means extract the category value from the URL. This is stored in $A2 because the value I want is in the 2nd parenthesis.</p>
<p style="text-align: left;">In field B, I&#8217;ll just select everything because I want to append $A2 to whatever is already there. This is stored as $B1.</p>
<p style="text-align: left;">Then in the constructor, I&#8217;m telling <a href="http://www.dannytalk.com/tag/google/">Google</a> Analytics to append the value in $A2 to the value in $B1. So if the category value extracted is &#8216;Shoes&#8217; and my original page title is &#8216;Online Shopping&#8217;, then the modified page title will be &#8216;Online Shopping Shoes&#8217;. This should be reflected in the content reports.</p>
<p style="text-align: left;">I will need the request URI and page title field so I&#8217;ll make field A and B as required. By selecting yes for the override output field means that if that field already has a value, override it with the new value. Finally since this isn&#8217;t case sensitive, I&#8217;ll select no.</p>
<p style="text-align: left;">That&#8217;s pretty much it! I&#8217;ve written an example to <a href="http://www.dannytalk.com/2009/03/07/google-analytics-adding-true-search-query-terms-using-advanced-filters/">append true searched terms</a> to the keywords report so you can have a look at that example too.</p>
<p style="text-align: left;">Remember to always test filters in a test profile before applying it to your main profile.</p>
<img src="http://www.dannytalk.com/?ak_action=api_record_view&id=623&type=feed" alt="" /><h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.dannytalk.com/2009/05/26/goal-funnel-setup-in-google-analytics/" title="Goal &#038; Funnel Setup Guide in Google Analytics">Goal &#038; Funnel Setup Guide in Google Analytics</a></li><li><a href="http://www.dannytalk.com/2009/04/05/how-to-track-sub-domains-cross-domains-in-google-analytics/" title="How To Track Sub-Domains / Cross-Domains in Google Analytics">How To Track Sub-Domains / Cross-Domains in Google Analytics</a></li><li><a href="http://www.dannytalk.com/2009/03/07/google-analytics-adding-true-search-query-terms-using-advanced-filters/" title="Google Analytics: Adding True Search Query Terms Using Advanced Filters ">Google Analytics: Adding True Search Query Terms Using Advanced Filters </a></li><li><a href="http://www.dannytalk.com/2009/10/05/seo-implications-of-using-css-display-noneimage-replacement/" title="SEO Implications of using CSS Display None/Image Replacement">SEO Implications of using CSS Display None/Image Replacement</a></li><li><a href="http://www.dannytalk.com/2009/09/30/geo-targeting-localisation-on-google-bing-yahoo/" title="Geo Targeting / Localisation on Google Bing Yahoo">Geo Targeting / Localisation on Google Bing Yahoo</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dannytalk.com/2009/07/11/google-analytics-advanced-filters-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update to Adwords Cost Data Import</title>
		<link>http://www.dannytalk.com/2009/06/24/update-to-adwords-cost-data-import/</link>
		<comments>http://www.dannytalk.com/2009/06/24/update-to-adwords-cost-data-import/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 12:55:45 +0000</pubDate>
		<dc:creator>danny</dc:creator>
				<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[campaign tracking]]></category>
		<category><![CDATA[gaiq]]></category>
		<category><![CDATA[google adwords]]></category>
		<category><![CDATA[google analytics individual qualification]]></category>
		<category><![CDATA[linkedin]]></category>

		<guid isPermaLink="false">http://www.dannytalk.com/?p=606</guid>
		<description><![CDATA[If you&#8217;ve read my previous post about the GAIQ exam tips, you&#8217;ll notice in the section called Adwords Information, I talked about how the initial update by Google on how their cost data import update affected traffic reports in Google Analytics and how we&#8217;ve been debating in the GAAC forums about accounts that don&#8217;t have [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve read my previous post about the <a title="GAIQ Exam Tips" href="http://www.dannytalk.com/2009/04/02/google-analytics-individual-qualification-tips-i-just-passed-my-test/">GAIQ exam tips</a>, you&#8217;ll notice in the section called <em>Adwords Information</em>, I talked about how the initial update by <a href="http://www.dannytalk.com/tag/google/">Google</a> on how their cost data import update affected traffic reports in <a href="http://www.dannytalk.com/category/google-analytics/">Google Analytics</a> and how we&#8217;ve been debating in the GAAC forums about accounts that don&#8217;t have cost data import enabled treat Adwords traffic as direct instead of cpc. This will affect the traffic reports by over inflating direct traffic and slowly diminishes cpc traffic.</p>
<p>This really isn&#8217;t good as it doesn&#8217;t give you an accurate representation on how your online marketing activities are performing. With high direct traffic, you&#8217;d probably think, &#8220;Holy cow! My website brand really rocks and I don&#8217;t have to spend much money on online advertising anymore. Thus, you decide to cut down your Adwords spend or other forms of online advertising.&#8221;</p>
<p>One way to overcome that was to manually utm tag your destination URLs which would&#8217;ve been a big pain in the butt if you&#8217;ve got a large Adwords account with many campaigns and adgroups.</p>
<p>So finally <a href="http://www.dannytalk.com/tag/google/">Google</a> made a post about a week ago about another <a href="http://analytics.blogspot.com/2009/06/update-regarding-adwords-cost-data.html" target="_blank">update to the adwords cost data reporting</a> that reverts back to how <a href="http://www.dannytalk.com/category/google-analytics/">Google Analytics</a> originally reported traffic from Adwords.</p>
<p>Now if you&#8217;ve got your Google Analytics account linked to Adwords, have auto tagging enabled but don&#8217;t have Adwords cost data applied, your Adwords traffic will now show as google/cpc, as it was originally.</p>
<p>What you should expect is a drop in direct traffic and a gradual increase in cpc traffic in your traffic reports.</p>
<img src="http://www.dannytalk.com/?ak_action=api_record_view&id=606&type=feed" alt="" /><h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.dannytalk.com/2009/04/02/google-analytics-individual-qualification-tips-i-just-passed-my-test/" title="Google Analytics Individual Qualification Tips &#8211; I Just Passed My Test">Google Analytics Individual Qualification Tips &#8211; I Just Passed My Test</a></li><li><a href="http://www.dannytalk.com/2009/08/29/google-organic-rankings-quality-score/" title="Google Organic Rankings Quality Score">Google Organic Rankings Quality Score</a></li><li><a href="http://www.dannytalk.com/2009/03/15/google-analytics-does-301302-redirect-preserve-referrer-information/" title="Google Analytics: Does 301/302 Redirect Preserve Referrer Information?">Google Analytics: Does 301/302 Redirect Preserve Referrer Information?</a></li><li><a href="http://www.dannytalk.com/2009/10/05/seo-implications-of-using-css-display-noneimage-replacement/" title="SEO Implications of using CSS Display None/Image Replacement">SEO Implications of using CSS Display None/Image Replacement</a></li><li><a href="http://www.dannytalk.com/2009/09/30/geo-targeting-localisation-on-google-bing-yahoo/" title="Geo Targeting / Localisation on Google Bing Yahoo">Geo Targeting / Localisation on Google Bing Yahoo</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dannytalk.com/2009/06/24/update-to-adwords-cost-data-import/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Goal &amp; Funnel Setup Guide in Google Analytics</title>
		<link>http://www.dannytalk.com/2009/05/26/goal-funnel-setup-in-google-analytics/</link>
		<comments>http://www.dannytalk.com/2009/05/26/goal-funnel-setup-in-google-analytics/#comments</comments>
		<pubDate>Tue, 26 May 2009 13:55:53 +0000</pubDate>
		<dc:creator>danny</dc:creator>
				<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[funnels]]></category>
		<category><![CDATA[goals]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[regular expressions]]></category>

		<guid isPermaLink="false">http://www.dannytalk.com/?p=564</guid>
		<description><![CDATA[Working in a Google Analytics Authorised Consultants (GAAC) accredited company and also having a Google Analytics Individual Qualification (GAIQ), it is essential that I master the art of setting up goals and funnels in Google Analytics for our clients. A goal can be a very important metric for a client to track such as sales, [...]]]></description>
			<content:encoded><![CDATA[<p>Working in a <a href="http://www.dannytalk.com/category/google-analytics/">Google Analytics</a> Authorised Consultants <a title="Google Analytics Authorised Consultants" href="http://www.google.com/analytics/authorized_consultants.html#asiapacific" target="_blank"> (GAAC)</a> accredited company and also having a <a title="Google Analytics Individual Qualification" href="http://www.dannytalk.com/2009/04/02/google-analytics-individual-qualification-tips-i-just-passed-my-test/">Google Analytics Individual Qualification</a> (<a title="GAIQ" href="http://www.dannytalk.com/tag/gaiq">GAIQ</a>), it is essential that I master the art of setting up goals and funnels in <a href="http://www.dannytalk.com/category/google-analytics/">Google Analytics</a> for our clients.</p>
<p>A goal can be a very important metric for a client to track such as sales, newsletter sign-ups, and registrations. Of course goals are not just limited to those but can be extended to whatever you would define as an important action on the website to track. Not only is tracking important, but it is also vital that you gain insight into what&#8217;s going on in the goal process from funnels.</p>
<p style="text-align: center;"><a title="Goal Graph" rel="lightbox" href="http://www.dannytalk.com/wp-content/uploads/2009/05/goal-graph.png"><img class="aligncenter size-large wp-image-589" title="goal-graph" src="http://www.dannytalk.com/wp-content/uploads/2009/05/goal-graph-1024x121.png" alt="goal-graph" width="574" height="68" /></a></p>
<p>A funnel is a visual representation of what&#8217;s happening during each step of your goal. It gives you great insights into the drop off rates of each step so that you can make informed decisions on improving your goal process and landing pages to increase conversion rates. You can accurately pinpoint which step of the goal process are you getting high drop off rates.</p>
<p>This can help you identify problems such as the checkout button not working, too many call to actions that lead to other goals, not best practice usability and so on.<br />
<span id="more-564"></span></p>
<h2>Before Going Ahead&#8230;</h2>
<p><strong>Identify</strong></p>
<p>First of all, you need to identify what goal you&#8217;re wanting to track. Make sure you identify each individual step of the goal conversion process. You will also need to identify the &#8216;conversion page&#8217; &#8211; the page where the goal can be counted as a conversion. This is usually the thank you or confirmation page.</p>
<p>Write out the goal steps in a logical way that will help you understand the entire process.</p>
<p><a href="http://www.dannytalk.com/tag/google/">Google</a> Analytics has a maximum of 10 steps &#8211; but seriously, if you have a goal that has more than 10 steps, you might want to rethink the goal process.</p>
<p><strong>Scope</strong></p>
<p>Once you&#8217;ve identified the goal steps, you will need to scope out the URLs of each step. Are they static or dynamic URLs?</p>
<p>If they are dynamic URLs, you may need to use virtual page views to simplify the tracking process without having to use complicated regular expressions (regex).</p>
<p>An example of using a virtual page view in <a href="http://www.dannytalk.com/tag/google/">Google</a> Analytics would be,</p>
<pre class="js" name="code">
<script type="text/javascript">
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"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-xxxxxxx-y");
pageTracker._trackPageview('/step1.html'); // change the parameter to the unique logical goal step
} catch(err) {}</script>
</pre>
<p>If you use the default <a title="Track Pageview" href="http://code.google.com/apis/analytics/docs/gaJS/gaJSApi.html#_gat.GA_Tracker_._trackPageview" target="_blank"><em>pageTracker._trackPageview()</em></a>, Google Analytics will use whatever request URI it sees in the address bar.</p>
<p>You will also need to find out whether this goal process requires <a href="http://www.dannytalk.com/2009/04/05/how-to-track-sub-domains-cross-domains-in-google-analytics/">cross/sub-domain tracking</a>.</p>
<p><strong>Dollar</strong></p>
<p>Unlike tracking e-commerce transactions that have dynamic values, goal values are static. You will need to figure out whether the goal has a dollar value or not to it.</p>
<p>For example, if I upsell/cross-sell products to my internal newsletter database and I get an average sale of $5, then I would define my newsletter subscription goal value to be $5.</p>
<p style="text-align: center;"><a title="Goal Information" rel="lightbox" href="http://www.dannytalk.com/wp-content/uploads/2009/05/goal-information.png"><img class="aligncenter size-full wp-image-581" title="goal-information" src="http://www.dannytalk.com/wp-content/uploads/2009/05/goal-information.png" alt="goal-information" width="585" height="261" /></a></p>
<p style="text-align: left;">Another example would be if a converted lead is worth $1000 and you have an average 5% offline conversion rate, then your goal value would be $50.</p>
<p style="text-align: left;"><strong>Match Types</strong></p>
<p>You will need to determine what kind of match types should Google Analytics use when matching against the content report. Google Analytics has 3 kinds of match types: head, exact and regular expression.</p>
<p style="text-align: center;"><a title="Goal Match Type" rel="lightbox" href="http://www.dannytalk.com/wp-content/uploads/2009/05/goal-match-type.png"><img class="aligncenter size-full wp-image-584" title="goal-match-type" src="http://www.dannytalk.com/wp-content/uploads/2009/05/goal-match-type.png" alt="goal-match-type" width="585" height="261" /></a></p>
<ul>
<li>Head Match &#8211; does not use regex and matches the &#8216;head&#8217; section of the request URI.
<p>E.g. If you want to match www.dannytalk.com/<strong>step1.html</strong>?id=123 and www.dannytalk.com/<strong>step1.html</strong>?id=321, then you would use <em>/step1.html</em>. Identify the common factor.</li>
<li>Exact Match &#8211; uses regex and is not suitable for dynamic URLs.
<p>E.g. If you want to match www.dannytalk.com/step1.html, then you would use <em>^/step1\.html$</em> as the regex.</li>
<li>Regular Expression Match &#8211; as the name says it, uses regex. Handy if you have more complicated matching requirements.
<p>E.g. If you want to match www.dannytalk.com/step1.html?source=google or www.dannytalk.com/step1.html?source=yahoo, then you would use <em>^/step1.html\?source=(google|yahoo)</em>.</li>
</ul>
<p>Therefore, it is important to plan and define the entire goal step process prior to implementing the goal so that you can determine which match type will work for you.</p>
<h2>Putting It All Together</h2>
<p>Wait wait! Before you do this, make sure you create an additional test profile to your main profile to test your goal to ensure it is working correctly. The reason for this is that once data is recorded in a profile, there&#8217;s no way to delete it. Yes you can filter the dates but that can be a hassle as you&#8217;d have to remember dates. I will write a profile step guide later on.</p>
<p>So once you&#8217;ve set up your test profile, go ahead in creating your goal.</p>
<p style="text-align: center;"><a title="Goal Setup" rel="lightbox" href="http://www.dannytalk.com/wp-content/uploads/2009/05/goal-setup.png"><img class="aligncenter size-full wp-image-586" title="goal-setup" src="http://www.dannytalk.com/wp-content/uploads/2009/05/goal-setup.png" alt="goal-setup" width="507" height="414" /></a></p>
<p style="text-align: left;">The checkbox &#8216;required step&#8217; informs Google Analytics to only record the goal if the visitor has been through step 1 which means they have to go through step 1 in order to be counted as a goal.</p>
<h2 style="text-align: left;">Goal Funnels</h2>
<p style="text-align: left;"><a title="Goal Funnel" rel="lightbox" href="http://www.dannytalk.com/wp-content/uploads/2009/05/goal-funnel1.png"><img class="aligncenter size-full wp-image-588" title="goal-funnel1" src="http://www.dannytalk.com/wp-content/uploads/2009/05/goal-funnel1.png" alt="goal-funnel1" width="570" height="421" /></a></p>
<p style="text-align: left;">Assuming you&#8217;ve setup your goal correctly, this is an example of how a goal funnel can look like. Obviously I did not check the &#8216;required step&#8217; checkbox and that&#8217;s why you&#8217;re seeing entrance paths at different goal steps &#8211; not just step 1.</p>
<p style="text-align: left;">You can see the entrance points, exit points and the drop off rate at each step of the goal. This will help you gain insight as to where the drop offs are occuring and to where they&#8217;re dropping off to.</p>
<p style="text-align: left;">Exit pages are the pages where the visitor exited to (internal pages) from the goal path and did not convert within that session. The exit page called (exit) is where the visitor left the site or closed the browser.</p>
<p style="text-align: left;">Note that a visitor does not necessarily have to go through the goal path in sequence to be considered a goal conversion. Essentially, if the visitor somehow skips certain steps and ends up in the thank you page, then Google Analytics will back fill the skipped goal steps.</p>
<p style="text-align: left;">Another thing to remember is that if within the same session a visitor converts the same goal more than once, it will only be counted once (unique per session).</p>
<p style="text-align: left;">Once you&#8217;re satisfied that the goal is working correctly, you can implement it in the main profile.</p>
<h2 style="text-align: left;">Debugging</h2>
<p>Things to look out for:</p>
<ul>
<li>Check the content reports to ensure that Google Analytics is tracking the URLs properly. If your goal step URLs aren&#8217;t there, it means Google Analytics can&#8217;t see it and therefore, can&#8217;t match it.</li>
<li>Once again, <a href="http://www.dannytalk.com/2009/04/05/how-to-track-sub-domains-cross-domains-in-google-analytics/">sub-domain/cross-domain tracking</a>. We want to maintain the same session and not create new ones.</li>
<li>Test your regular expressions to make sure they match correctly. I like using an <a title="Online Regex Tool" href="http://www.gskinner.com/RegExr/" target="_blank">online regex tool</a> to help me check if my regex is working or not.</li>
</ul>
<p>If you find this guide helpful, consider linking to it and sharing it around :)</p>
<p>Feedback and comments would be appreciated.</p>
<img src="http://www.dannytalk.com/?ak_action=api_record_view&id=564&type=feed" alt="" /><h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.dannytalk.com/2009/07/11/google-analytics-advanced-filters-guide/" title="Google Analytics: Advanced Filters Guide">Google Analytics: Advanced Filters Guide</a></li><li><a href="http://www.dannytalk.com/2009/04/05/how-to-track-sub-domains-cross-domains-in-google-analytics/" title="How To Track Sub-Domains / Cross-Domains in Google Analytics">How To Track Sub-Domains / Cross-Domains in Google Analytics</a></li><li><a href="http://www.dannytalk.com/2009/10/05/seo-implications-of-using-css-display-noneimage-replacement/" title="SEO Implications of using CSS Display None/Image Replacement">SEO Implications of using CSS Display None/Image Replacement</a></li><li><a href="http://www.dannytalk.com/2009/09/30/geo-targeting-localisation-on-google-bing-yahoo/" title="Geo Targeting / Localisation on Google Bing Yahoo">Geo Targeting / Localisation on Google Bing Yahoo</a></li><li><a href="http://www.dannytalk.com/2009/08/29/google-organic-rankings-quality-score/" title="Google Organic Rankings Quality Score">Google Organic Rankings Quality Score</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dannytalk.com/2009/05/26/goal-funnel-setup-in-google-analytics/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How To Track Sub-Domains / Cross-Domains in Google Analytics</title>
		<link>http://www.dannytalk.com/2009/04/05/how-to-track-sub-domains-cross-domains-in-google-analytics/</link>
		<comments>http://www.dannytalk.com/2009/04/05/how-to-track-sub-domains-cross-domains-in-google-analytics/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 13:20:09 +0000</pubDate>
		<dc:creator>danny</dc:creator>
				<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[Search Engine Optimisation]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[advanced filters]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[cross domain tracking]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[sub domain tracking]]></category>

		<guid isPermaLink="false">http://www.dannytalk.com/?p=504</guid>
		<description><![CDATA[First of all, let me explain why in Google Analytics you need to do some configurations to track sub-domains / cross-domains. Google Analytics does not do this by default, thus whenever you&#8217;re on sub1.domain.com and you go to sub2.domain.com, Google Analytics will record this as a referral rather than maintaining the same session and the [...]]]></description>
			<content:encoded><![CDATA[<p>First of all, let me explain why in <a href="http://www.dannytalk.com/category/google-analytics/">Google Analytics</a> you need to do some configurations to track sub-domains / cross-domains.</p>
<p><a href="http://www.dannytalk.com/category/google-analytics/">Google Analytics</a> does not do this by default, thus whenever you&#8217;re on sub1.domain.com and you go to sub2.domain.com, <a href="http://www.dannytalk.com/tag/google/">Google</a> Analytics will record this as a referral rather than maintaining the same session and the same campaign information. If you&#8217;re running e-commerce tracking and you use sub-domains during the e-commerce process, this will totally screw up your reports as it will attribute all transactions to referrals (from your own site) and you will have no idea how your other online marketing campaigns (i.e. direct, organic, cpc) are performing.</p>
<h2>Sub-Domain Tracking</h2>
<p>This one is fairly easy. The method you need to use is _setDomainName().</p>
<p style="text-align: center;"><a title="Google utma cookie" rel="lightbox" href="http://www.dannytalk.com/wp-content/uploads/2009/04/cookie.png"><img class="aligncenter size-full wp-image-505" title="Google utma cookie" src="http://www.dannytalk.com/wp-content/uploads/2009/04/cookie.png" alt="Google utma cookie" width="511" height="171" /></a></p>
<p style="text-align: left;">The <a title="_setDomainName() method" href="http://code.google.com/apis/analytics/docs/gaJS/gaJSApi.html#_gat.GA_Tracker_._setDomainName" target="_blank">_setDomainName() method</a> sets the <a href="http://www.dannytalk.com/tag/google/">Google</a> cookies to the domain name string parameter that it is given, otherwise it automatically resolves the domain name from the location object in the DOM if no parameter is given. This means that on sub-domains, the cookies will be set to separate sub-domains.</p>
<p style="text-align: left;">So to configure Google Analytics to set the cookies to the same domain name, simply use the domain name as the string parameter for the _setDomainName() method.</p>
<p style="text-align: left;">E.g. If I have a website called sub1.dannytalk.com and sub2.dannytalk.com, I would use _setDomainName(&#8216;dannytalk.com&#8217;) throughout all my pages (sub-domains and main domain).</p>
<pre class="js" name="code">&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-xxxxxx-x"); // replace this with your own account number
pageTracker._setDomainName("dannytalk.com");
pageTracker._trackPageview();
&lt;/script&gt;</pre>
<p style="text-align: left;">The Google API officially states to use the period at the start of the domain name. I have tried with and without and it seems to work fine but I prefer without period (looks nicer).</p>
<p style="text-align: left;">Once you&#8217;ve done this, Google Analytics should record all visits to these sub-domains as the same visit, maintaining the same campaign information. However, in your reports,you won&#8217;t be able to tell which request URI came from which sub-domain as the domain name is stripped out from the reports.</p>
<p style="text-align: left;">In addition, if you have two sub-domains that have the same page name (i.e. index.html), then Google Analytics will combine these two into one which will artificially inflate your page statistics.</p>
<p style="text-align: left;">A simple way around this is to implement what I call a sub-domain visibility filter which will prefix your request URI&#8217;s with the domain name. This will help you differentiate the pages as well as avoid inflating the page statistics.</p>
<p><span id="more-504"></span></p>
<p style="text-align: center;"><a title="Sub-Domain Visibility Filter" rel="lightbox" href="http://www.dannytalk.com/wp-content/uploads/2009/04/sub-domain-visibility-filter.png"><img class="aligncenter size-full wp-image-506" title="sub-domain-visibility-filter" src="http://www.dannytalk.com/wp-content/uploads/2009/04/sub-domain-visibility-filter.png" alt="sub-domain-visibility-filter" width="558" height="443" /></a></p>
<h2 style="text-align: left;">Cross Domain Tracking</h2>
<p>This one is a bit trickier as it involves sending your cookies across to the 3rd party domain so that all your cookie information is maintained throughout. A pre-condition to this is that you have permission to insert Google Analytics code onto the 3rd party domain. 3rd party domains such as Paypal won&#8217;t let you insert third party codes in the checkout process.</p>
<p>Assuming that you want to track from www.mydomain.com across to www.thirdpartydomain.com, on www.mydomain.com, on the page where you&#8217;ll be linking to the 3rd party domain use,</p>
<pre class="js" name="code">&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-xxxxxx-x"); // replace this with your own account number
pageTracker._setDomainName("mydomain.com"); // optional if you have sub-domains (refer to sub-domain tracking above)
pageTracker._setAllowLinker(true);
pageTracker._setAllowHash(false);
pageTracker._trackPageview();
&lt;/script&gt;</pre>
<p>The <a title="_setAllowLinker method" href="http://code.google.com/apis/analytics/docs/gaJS/gaJSApi.html#_gat.GA_Tracker_._setAllowLinker">_setAllowLinker() method</a> activates _link() and _linkByPost() when you&#8217;re sending cookie information across to the 3rd party domain and the <a title="setAllowHash() method" href="http://code.google.com/apis/analytics/docs/gaJS/gaJSApi.html#_gat.GA_Tracker_._setAllowHash" target="_blank">_setAllowHash() method</a> determines whether Google Analytics sets the unique domain hash to the cookie for integrity checking. You set the cookie integrity check to false because you&#8217;re tracking cross-domain, not within the same domain (which will fail the check).</p>
<p>If you&#8217;ve ever seen the ga.js file, you&#8217;ll find out that it is super cryptic and backwards engineering won&#8217;t be that easy. However, the <strike>_gat.t()</strike> _gat.s() method generates the unique hash for a domain. (<strong>[edit date=090923] Note: ga.js has recently updated the domain hash function to be s() instead of t()</strong>).</p>
<p style="text-align: center;"><a title="GA Domain Hash Method" rel="lightbox" href="http://www.dannytalk.com/wp-content/uploads/2009/04/domain-hash-function.png"><img class="aligncenter size-full wp-image-507" title="domain-hash-function" src="http://www.dannytalk.com/wp-content/uploads/2009/04/domain-hash-function.png" alt="domain-hash-function" width="293" height="87" /></a></p>
<p style="text-align: left;">You will see that 51787068 is the number that corresponds to the number before the first period of my utma cookie (see cookie screenshot above). This is how Google Analytics performs the domain hash integrity check.</p>
<p style="text-align: left;">On www.thirdpartydomain.com pages where you want to keep maintain the same visit,</p>
<pre class="js" name="code">&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-xxxxxx-x"); // replace this with your own account number
pageTracker._setDomainName("none");
pageTracker._setAllowLinker(true);
pageTracker._setAllowHash(false);
pageTracker._trackPageview();
&lt;/script&gt;</pre>
<h3>Linking The Cookies</h3>
<p>Ok, so now you&#8217;ve got the Google Analytics configuration all set up for cross-domain tracking. So now is the time to actually send the cookie information across to the 3rd party website.</p>
<p>If you go to www.thirdpartydomain.com from www.mydomain.com from an anchor link, you will need to use the _link() method.</p>
<pre class="html" name="code">&lt;a onclick="pageTracker._link(this.href); return false;" href="http://www.thirdpartydomain.com"&gt;Third Party Domain&lt;/a&gt;</pre>
<p>The _link() method will append the cookie information as query string parameters across to the 3rd party domain which Google Analytics will read and recreate the identical cookies.</p>
<p>If you go to www.thirdpartydomain.com from www.mydomain.com from form, you will need to use the _linkByPost() method.</p>
<pre class="html" name="code">&lt;form name="testform" action="http://www.thirdpartydomain.com" method="post" onsubmit="pageTracker._linkByPost(this);"&gt;
...
&lt;/form&gt;</pre>
<p>Similar to the _link() method, the <a title="_linkByPost() method" href="http://code.google.com/apis/analytics/docs/gaJS/gaJSApi.html#_gat.GA_Tracker_._linkByPost" target="_blank">_linkByPost() method</a> will include the form parameters into the query string as well.</p>
<h2>Debugging</h2>
<p>Here are some tips to making sure your sub-domain / cross-domain tracking is working properly.</p>
<ul>
<li>Check the Google Analytics reports to confirm what you&#8217;re expecting.</li>
<li>When cross-domain tracking, make sure you check the cookies of each step to make sure they&#8217;re the same cookies. Make sure you delete the cookies on both domains before doing this.</li>
<li>Check the cookie values in the query string to see if they&#8217;re the same.</li>
<li>You shouldn&#8217;t be getting two sets of Google cookies (i.e. duplicate utma, utmb, utmc, utmz cookies). If you are, most likely some pages don&#8217;t have the  _setDomainName() method (if you are using it).</li>
</ul>
<p>I hope these instructions and examples help you with your tracking!</p>
<img src="http://www.dannytalk.com/?ak_action=api_record_view&id=504&type=feed" alt="" /><h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.dannytalk.com/2009/03/15/google-analytics-does-301302-redirect-preserve-referrer-information/" title="Google Analytics: Does 301/302 Redirect Preserve Referrer Information?">Google Analytics: Does 301/302 Redirect Preserve Referrer Information?</a></li><li><a href="http://www.dannytalk.com/2009/07/11/google-analytics-advanced-filters-guide/" title="Google Analytics: Advanced Filters Guide">Google Analytics: Advanced Filters Guide</a></li><li><a href="http://www.dannytalk.com/2009/05/26/goal-funnel-setup-in-google-analytics/" title="Goal &#038; Funnel Setup Guide in Google Analytics">Goal &#038; Funnel Setup Guide in Google Analytics</a></li><li><a href="http://www.dannytalk.com/2009/04/02/google-analytics-individual-qualification-tips-i-just-passed-my-test/" title="Google Analytics Individual Qualification Tips &#8211; I Just Passed My Test">Google Analytics Individual Qualification Tips &#8211; I Just Passed My Test</a></li><li><a href="http://www.dannytalk.com/2009/10/05/seo-implications-of-using-css-display-noneimage-replacement/" title="SEO Implications of using CSS Display None/Image Replacement">SEO Implications of using CSS Display None/Image Replacement</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dannytalk.com/2009/04/05/how-to-track-sub-domains-cross-domains-in-google-analytics/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Google Analytics Individual Qualification Tips &#8211; I Just Passed My Test</title>
		<link>http://www.dannytalk.com/2009/04/02/google-analytics-individual-qualification-tips-i-just-passed-my-test/</link>
		<comments>http://www.dannytalk.com/2009/04/02/google-analytics-individual-qualification-tips-i-just-passed-my-test/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 10:24:17 +0000</pubDate>
		<dc:creator>danny</dc:creator>
				<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Search Engine Optimisation]]></category>
		<category><![CDATA[gaiq]]></category>
		<category><![CDATA[google adwords]]></category>
		<category><![CDATA[google analytics individual qualification]]></category>
		<category><![CDATA[linkedin]]></category>

		<guid isPermaLink="false">http://www.dannytalk.com/?p=498</guid>
		<description><![CDATA[I just passed my Google Analytics Individual Qualification (GAIQ) test today and scored 94%! Not bad eh? The passing score is 75%. So thought I&#8217;d post some tips here while the exam questions are still fresh in my mind. You have 2 hours to complete the exam (more than enough) and there&#8217;s 70 questions that [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a title="GAIQ Result" rel="lightbox" href="http://www.dannytalk.com/wp-content/uploads/2009/04/gaiq-result.png"><img class="aligncenter size-large wp-image-499" title="GAIQ Result" src="http://www.dannytalk.com/wp-content/uploads/2009/04/gaiq-result-1024x276.png" alt="GAIQ Result" width="590" height="159" /></a></p>
<p style="text-align: left;">I just passed my <a href="http://www.dannytalk.com/category/google-analytics/">Google Analytics</a> Individual Qualification (GAIQ) test today and scored 94%! Not bad eh? The passing score is 75%. So thought I&#8217;d post some tips here while the exam questions are still fresh in my mind.</p>
<p style="text-align: left;">You have 2 hours to complete the exam (more than enough) and there&#8217;s 70 questions that consist of multiple choice, true/false and select all that applies type questions. Basically the trickiest one I found was the select all that applies type questions.</p>
<h3 style="text-align: left;">Materials To Go Through &#8211; Conversion University</h3>
<p style="text-align: left;">Before you start the <a title="GAIQ Test" href="http://google.starttest.com/" target="_blank">GAIQ exam</a>, make sure you go through the materials at <a href="http://www.dannytalk.com/tag/google/">Google</a>&#8216;s <a title="Conversion University" href="http://www.google.com/support/conversionuniversity/" target="_blank">conversion university</a> &#8211; especially the ones that you don&#8217;t know much about. I didn&#8217;t go through all of them, just the ones I thought would be handy to refresh myself with.</p>
<p style="text-align: left;">The ones that I think will be handy are:</p>
<ul>
<li><a title="Profiles in Google Analytics" href="http://services.google.com/analytics/breeze/en/accounts_profiles/index.html" target="_blank">Profiles in Google Analytics</a></li>
<li><a title="Filters in Google Analytics" href="http://services.google.com/analytics/breeze/en/filters/index.html" target="_blank">Filters in Google Analytics</a></li>
<li><a title="Cookies and Google Analytics" href="http://services.google.com/analytics/breeze/en/ga_cookies/index.html" target="_blank">Cookies and Google Analytics</a></li>
<li><a title="E-Commerce Tracking" href="http://services.google.com/analytics/breeze/en/ecommerce/index.html" target="_blank">E-Commerce Tracking</a></li>
<li><a title="Domains &amp; Sub-Domains" href="http://services.google.com/analytics/breeze/en/domains_subdomains/index.html" target="_blank">Domains and Sub-Domains</a></li>
</ul>
<h3>Knowledge To Learn</h3>
<p>In my opinion, these are some of the things you should&#8217;ve had some experience implementing before doing the test. If you haven&#8217;t, go play around with it!</p>
<ul>
<li>E-Commerce Tracking (addTrans, addItem methods)</li>
<li>Cross Domain / Sub-Domain Tracking (link, linkByPost, setDomainName, setAllowLinker, setAllowHash methods)</li>
<li>Goal Setup (note: Multiple same goal conversions within a session are unique)</li>
<li>Profile Setup (note: What are the benefits of creating more than 1 profile? What can/can&#8217;t you do with profiles?)</li>
<li>Filter Setup (predefined, include/exclude, search &amp; replace and custom &#8211; advanced)</li>
<li>Integration with <a href="http://www.dannytalk.com/tag/google/">Google</a> Adwords (cost data import, auto-tagging)</li>
<li><a href="http://www.dannytalk.com/category/google-analytics/">Google Analytics</a> interface (reports, user/filter management)</li>
<li>Regular Expression (note: You don&#8217;t have to be a pro, but it definitely helps)</li>
<li>Cookies (note: Google uses first-party cookies and you cannot identify an individual through it)</li>
</ul>
<h3>Handy Links</h3>
<p>Here are some handy links that you should have open during the test:<span id="more-498"></span></p>
<ul>
<li><a title="Google" href="http://google.com" target="_blank">Google</a> (note: don&#8217;t think you can ace the exam just by Googling everything. You still need to know your stuff).</li>
<li><a title="Google Analytics" href="https://www.google.com/analytics" target="_blank">Google Analytics Interface</a> (d&#8217;oh) &#8211; make sure you&#8217;re logged in</li>
<li><a title="Google Analytics API" href="http://code.google.com/apis/analytics/docs/gaJS/gaJSApi.html" target="_blank">Google Analytics API</a> &#8211; you may need this for the e-commerce tracking questions</li>
<li><a title="IP Address Range Regex Tool" href="http://www.google.com/support/analytics/bin/answer.py?hl=en&amp;answer=55572" target="_blank">IP Address Range Regex Tool</a></li>
<li><a title="Cookie Reference" href="http://code.google.com/apis/analytics/docs/concepts/gaConceptsCookies.html" target="_blank">Cookie Reference</a></li>
</ul>
<h3>Adwords Information</h3>
<p>Google has announced that Adwords advertisers now need to link their Google Analytics together to ensure that Google Analytics will pick up Adwords traffic (google/cpc) or else it will show up as direct (direct/none) traffic. Stupid I know. We&#8217;re still having debates in the GAAC forums. [<strong>Note</strong>: This has been updated. See my post on '<a href="http://www.dannytalk.com/2009/06/24/update-to-adwords-cost-data-import/">Update to Adwords Cost Data Import</a>'.]</p>
<p>Once linked, you&#8217;ll need to go to Analytics&#8217; profile settings and check the apply cost data import check-box to ensure that Google Analytics imports cost data from Adwords (if auto-tagging is enabled).</p>
<p>In the exam, you&#8217;ll need to know what&#8217;s the purpose of auto-tagging and manual tagging. What happens if you don&#8217;t have auto-tagging on and what are the reasons you&#8217;d want to go manual tagging instead?</p>
<h3>Conclusion</h3>
<p>I hope this information helps guide you in preparation for the exam. It isn&#8217;t overly difficult so long as you&#8217;ve had sufficient experience with Google Analytics and brush up on the things you&#8217;re not knowledgable on.</p>
<p>Good luck and let me know how you go :)</p>
<img src="http://www.dannytalk.com/?ak_action=api_record_view&id=498&type=feed" alt="" /><h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.dannytalk.com/2009/06/24/update-to-adwords-cost-data-import/" title="Update to Adwords Cost Data Import">Update to Adwords Cost Data Import</a></li><li><a href="http://www.dannytalk.com/2009/03/15/google-analytics-does-301302-redirect-preserve-referrer-information/" title="Google Analytics: Does 301/302 Redirect Preserve Referrer Information?">Google Analytics: Does 301/302 Redirect Preserve Referrer Information?</a></li><li><a href="http://www.dannytalk.com/2009/08/29/google-organic-rankings-quality-score/" title="Google Organic Rankings Quality Score">Google Organic Rankings Quality Score</a></li><li><a href="http://www.dannytalk.com/2009/04/05/how-to-track-sub-domains-cross-domains-in-google-analytics/" title="How To Track Sub-Domains / Cross-Domains in Google Analytics">How To Track Sub-Domains / Cross-Domains in Google Analytics</a></li><li><a href="http://www.dannytalk.com/2009/03/05/google-analytics-qualified-individual-qualification/" title="Google Analytics Qualified Individual Qualification">Google Analytics Qualified Individual Qualification</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dannytalk.com/2009/04/02/google-analytics-individual-qualification-tips-i-just-passed-my-test/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Google Analytics: Does 301/302 Redirect Preserve Referrer Information?</title>
		<link>http://www.dannytalk.com/2009/03/15/google-analytics-does-301302-redirect-preserve-referrer-information/</link>
		<comments>http://www.dannytalk.com/2009/03/15/google-analytics-does-301302-redirect-preserve-referrer-information/#comments</comments>
		<pubDate>Sun, 15 Mar 2009 11:46:34 +0000</pubDate>
		<dc:creator>danny</dc:creator>
				<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[Search Engine Optimisation]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[301/302 redirects]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[google adwords]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[linkedin]]></category>

		<guid isPermaLink="false">http://www.dannytalk.com/?p=456</guid>
		<description><![CDATA[In case you&#8217;re wondering whether 301 redirects preserve the referrer information or not and how this may affect Google Analytic&#8217;s referrer information, I&#8217;ll show you a simple example. So pretty much what I did was I did a Google search for clothes and found some ads on the right hand side. I used firebug to [...]]]></description>
			<content:encoded><![CDATA[<p>In case you&#8217;re wondering whether 301 redirects preserve the referrer information or not and how this may affect <a href="http://www.dannytalk.com/tag/google/">Google</a> Analytic&#8217;s referrer information, I&#8217;ll show you a simple example.</p>
<p>So pretty much what I did was I did a <a href="http://www.dannytalk.com/tag/google/">Google</a> search for <em>clothes</em> and found some ads on the right hand side. I used firebug to extract the destination URL as I didn&#8217;t want to inflate their costs because I&#8217;m just doing an example. What I look for are obvious tracking URLs that track and monitor search engine marketing (SEM) campaigns such as DART (Double Click).</p>
<p>You can also figure this one out by seeing the domain of the URL. If this is different to the display URL, most likely this is a tracking URL because Google Adwords has enforced the policy that the <a title="Google Adwords Display URL Policy" href="https://adwords.google.com/support/bin/static.py?page=guidelines.cs&amp;topic=9271&amp;subtopic=9280&amp;answer=47173" target="_blank">destination and display URL must be the same</a> (it&#8217;s <a title="Display URL Policy" href="http://adwords.blogspot.com/2008/02/update-to-display-url-policy.html" target="_blank">ok to use tracking URLs</a> though as long as you land on the same domain as the display URL).</p>
<p style="text-align: center;"><a title="Adowrds Ad" rel="lightbox" href="http://www.dannytalk.com/wp-content/uploads/2009/03/clothes-adwords.png"><img class="aligncenter size-full wp-image-463" title="clothes-adwords" src="http://www.dannytalk.com/wp-content/uploads/2009/03/clothes-adwords.png" alt="clothes-adwords" width="211" height="240" /></a></p>
<p><span id="more-456"></span>So the URL I found was http://tsw0.com/2625/38659 . By typing this directly to your browser address bar, you&#8217;ll see that the referrer is empty (otherwise direct).</p>
<p style="text-align: center;"><a title="Referrer - Direct" rel="lightbox" href="http://www.dannytalk.com/wp-content/uploads/2009/03/referrer1.png"><img class="aligncenter size-full wp-image-465" title="referrer1" src="http://www.dannytalk.com/wp-content/uploads/2009/03/referrer1.png" alt="referrer1" width="357" height="86" /></a></p>
<p style="text-align: left;">Using firebug, you&#8217;ll see that the referrer information is empty. This will be registered <em>as direct</em> in Google Analytics. Now when I actually click on the ad,</p>
<p style="text-align: center;"><a title="Referrer - Google Search Engine" rel="lightbox" href="http://www.dannytalk.com/wp-content/uploads/2009/03/referrer2.png"><img class="aligncenter size-full wp-image-464" title="referrer2" src="http://www.dannytalk.com/wp-content/uploads/2009/03/referrer2.png" alt="referrer2" width="474" height="87" /></a></p>
<p style="text-align: left;">you&#8217;ll see that the referrer information shows my search for <em>clothes</em> on Google AU. This will be registered as <em>google/organic</em> in Google Analytics.</p>
<img src="http://www.dannytalk.com/?ak_action=api_record_view&id=456&type=feed" alt="" /><h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.dannytalk.com/2009/04/05/how-to-track-sub-domains-cross-domains-in-google-analytics/" title="How To Track Sub-Domains / Cross-Domains in Google Analytics">How To Track Sub-Domains / Cross-Domains in Google Analytics</a></li><li><a href="http://www.dannytalk.com/2009/04/02/google-analytics-individual-qualification-tips-i-just-passed-my-test/" title="Google Analytics Individual Qualification Tips &#8211; I Just Passed My Test">Google Analytics Individual Qualification Tips &#8211; I Just Passed My Test</a></li><li><a href="http://www.dannytalk.com/2009/08/29/google-organic-rankings-quality-score/" title="Google Organic Rankings Quality Score">Google Organic Rankings Quality Score</a></li><li><a href="http://www.dannytalk.com/2009/06/24/update-to-adwords-cost-data-import/" title="Update to Adwords Cost Data Import">Update to Adwords Cost Data Import</a></li><li><a href="http://www.dannytalk.com/2008/10/28/limitations-of-client-side-javascript-redirect-blogger-to-wordpress/" title="Limitations of Client-Side Javascript Redirect &#8211; Blogger to Wordpress">Limitations of Client-Side Javascript Redirect &#8211; Blogger to Wordpress</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dannytalk.com/2009/03/15/google-analytics-does-301302-redirect-preserve-referrer-information/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Google Analytics: Adding True Search Query Terms Using Advanced Filters</title>
		<link>http://www.dannytalk.com/2009/03/07/google-analytics-adding-true-search-query-terms-using-advanced-filters/</link>
		<comments>http://www.dannytalk.com/2009/03/07/google-analytics-adding-true-search-query-terms-using-advanced-filters/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 00:36:29 +0000</pubDate>
		<dc:creator>danny</dc:creator>
				<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[Search Engine Optimisation]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[advanced filters]]></category>
		<category><![CDATA[custom filters]]></category>
		<category><![CDATA[keywords report]]></category>
		<category><![CDATA[regular expressions]]></category>

		<guid isPermaLink="false">http://www.dannytalk.com/?p=402</guid>
		<description><![CDATA[In Google Analytics keywords report, you can only segment the keywords by total, paid and non-paid, which pretty much means total, non-cpc and cpc. Also in the keywords report, whenever someone arrives to your website via a cpc medium such as Google Adwords, it will only report the keyword matched in your adgroup keyword list, [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.dannytalk.com/category/google-analytics/">Google Analytics</a> keywords report, you can only segment the keywords by total, paid and non-paid, which pretty much means total, non-cpc and cpc. Also in the keywords report, whenever someone arrives to your website via a cpc medium such as <a href="http://www.dannytalk.com/tag/google/">Google</a> Adwords, it will only report the keyword matched in your adgroup keyword list, but not the true search query the visitor typed in.</p>
<p>With a little help of <a href="http://www.dannytalk.com/category/google-analytics/">Google Analytics</a>&#8216; custom advanced filters, you&#8217;re able to show in your reports what the true search query was and segment it by mediums.</p>
<p style="text-align: center;"><a title="Search Query Report" rel="lightbox" href="http://www.dannytalk.com/wp-content/uploads/2009/03/search-query-report.png"><img class="aligncenter size-full wp-image-403" title="search query report" src="http://www.dannytalk.com/wp-content/uploads/2009/03/search-query-report.png" alt="search query report" width="500" height="323" /></a></p>
<p>The screenshot above is an example of how the report will look like after the filters are applied. As you can see, within the brackets is the true search query used on search engines and other shopping portals (i.e. Lasoo, Shopping.com, Shopbot). Of course this example doesn&#8217;t show any cpc medium because I don&#8217;t run any cpc campaigns. Sponsor me and I will :)</p>
<p>This is pretty handy to see on your reports because now you&#8217;re able to segment your keywords by medium as well. Of course you could probably use advanced segments to do this but this incorporates true search query and segmentation at the same time.</p>
<p>So the first step I would recommend is to make sure you set up a test profile. You can skip this part and work on your main profile if you like.</p>
<p>To do so, go to your analytics overview dashboard and click on <em>Add Website Profile</em>. Make sure you select the <em>Add a Profile to an existing domain</em> and from the drop down menu, select your website domain.</p>
<p style="text-align: center;"><a title="New Website Profile" rel="lightbox" href="http://www.dannytalk.com/wp-content/uploads/2009/03/new-website-profile.png"><img class="aligncenter size-full wp-image-409" title="new website profile" src="http://www.dannytalk.com/wp-content/uploads/2009/03/new-website-profile.png" alt="new website profile" width="617" height="310" /></a></p>
<p>You can name it <em>test profile</em> or whatever you like as long as you know it&#8217;s a test profile. Pretty much this is your hack and abuse profile where you do experiments and tests on it so that it doesn&#8217;t affect your main profile&#8217;s reports. Once you&#8217;re happy it&#8217;s working correctly, you can move your filters etc. to your main profile.</p>
<p>Now the next step is to determine your regular expression to extract search query terms from your referral URLs.</p>
<p><span id="more-402"></span>There&#8217;s an online regex testing tool that I like to use done by <a title="Online Regex Testing Tool" href="http://www.gskinner.com/RegExr/" target="_blank">gskinner.com</a>. Below is a screen shot of the regex I use to extract the true search query terms on search engines and shopping portals. Of course you can extend this to whatever else you like and to add more search query string parameters within the second bracket.</p>
<p style="text-align: center;"><a title="Regex Search Query" rel="lightbox" href="http://www.dannytalk.com/wp-content/uploads/2009/03/regex_search_query.png"><img class="aligncenter size-full wp-image-404" title="regex search query" src="http://www.dannytalk.com/wp-content/uploads/2009/03/regex_search_query.png" alt="regex search query" width="460" height="166" /></a></p>
<p>Once you&#8217;re equipped with your working regex, next step is to create custom advanced filters within your <a href="http://www.dannytalk.com/tag/google/">Google</a> Analytics profile. In your Google Analytics overview dashboard and click on <em>edit</em> on the chosen profile row. You will see various sections and on the third section is the filters section. Click on <em>Add Filters</em>.</p>
<p>The first custom advanced filter to create is to extract the true search query from the referral URL and set it to the a custom field to be used for the second custom advanced filter. In Field A, I have just used the regular expression I&#8217;ve tested above. For Field B, I&#8217;ve decided to apply this to cpc, organic and referral mediums. In the output field, I&#8217;ve decided how it&#8217;s going to look in the reports: <em>search query &#8211; campaign medium</em>. Click on <em>Save Changes</em>.</p>
<p style="text-align: center;"><a title="Custom Advanced Filter 1" rel="lightbox" href="http://www.dannytalk.com/wp-content/uploads/2009/03/search-query-filter-1.png"><img class="aligncenter size-full wp-image-405" title="search query filter 1" src="http://www.dannytalk.com/wp-content/uploads/2009/03/search-query-filter-1.png" alt="search query filter 1" width="560" height="443" /></a></p>
<p>Now create another custom advanced filter. This time I&#8217;m going to append the new data (from filter 1) to the campaign term (keyword). Basically for Field A and Field B, I&#8217;m just grabbing everything and rewriting the campaign term that appends the new data. Click <em>Save Changes</em>.</p>
<p style="text-align: center;"><a title="Custom Advanced Filter 2" rel="lightbox" href="http://www.dannytalk.com/wp-content/uploads/2009/03/search-query-filter-2.png"><img class="aligncenter size-full wp-image-407" title="search query filter 2" src="http://www.dannytalk.com/wp-content/uploads/2009/03/search-query-filter-2.png" alt="search query filter 2" width="560" height="443" /></a></p>
<p>Now make sure your filters are in order, that is filter 1 is above filter 2 otherwise it will not work properly. If it&#8217;s not in order, you can click on <em>Assign Filter Order</em>.</p>
<p style="text-align: center;"><a title="Filter Order" rel="lightbox" href="http://www.dannytalk.com/wp-content/uploads/2009/03/filter-order.png"><img class="aligncenter size-full wp-image-408" title="filter order" src="http://www.dannytalk.com/wp-content/uploads/2009/03/filter-order.png" alt="filter order" width="595" height="22" /></a></p>
<p>That&#8217;s pretty much it! Give it some time to gather data and you will see in your keywords report the newly added information: true search query terms and the medium.</p>
<p>If you want to read more into Google Analytics&#8217; advanced filter fields, visit <a title="Google Analytics help" href="http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&amp;answer=55588" target="_blank">Google Analytics help page</a>.</p>
<p><strong>[edit date=13/07/09]</strong></p>
<p>One of my colleagues at First Rate has pointed out that field B in the first filter is not necessary as the variables aren&#8217;t even used in the constructor. What will be required is an include filter to only include traffic from a cpc/ppc medium.</p>
<p>You will need to ensure that this filter is placed <span style="text-decoration: underline;">before</span> the filter that extracts the search query so that the search query extraction filter will only apply to cpc traffic.</p>
<p style="text-align: center;"><a title="Include CPC Traffic Filter" rel="lightbox" href="http://www.dannytalk.com/wp-content/uploads/2009/03/include-cpc-filter.png"><img class="aligncenter size-full wp-image-633" title="include-cpc-filter" src="http://www.dannytalk.com/wp-content/uploads/2009/03/include-cpc-filter.png" alt="include-cpc-filter" width="452" height="338" /></a></p>
<p><strong>[/edit]</strong></p>
<img src="http://www.dannytalk.com/?ak_action=api_record_view&id=402&type=feed" alt="" /><h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.dannytalk.com/2009/07/11/google-analytics-advanced-filters-guide/" title="Google Analytics: Advanced Filters Guide">Google Analytics: Advanced Filters Guide</a></li><li><a href="http://www.dannytalk.com/2009/05/26/goal-funnel-setup-in-google-analytics/" title="Goal &#038; Funnel Setup Guide in Google Analytics">Goal &#038; Funnel Setup Guide in Google Analytics</a></li><li><a href="http://www.dannytalk.com/2009/04/05/how-to-track-sub-domains-cross-domains-in-google-analytics/" title="How To Track Sub-Domains / Cross-Domains in Google Analytics">How To Track Sub-Domains / Cross-Domains in Google Analytics</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dannytalk.com/2009/03/07/google-analytics-adding-true-search-query-terms-using-advanced-filters/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google Analytics Qualified Individual Qualification</title>
		<link>http://www.dannytalk.com/2009/03/05/google-analytics-qualified-individual-qualification/</link>
		<comments>http://www.dannytalk.com/2009/03/05/google-analytics-qualified-individual-qualification/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 03:08:59 +0000</pubDate>
		<dc:creator>danny</dc:creator>
				<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Search Engine Optimisation]]></category>
		<category><![CDATA[google analytics individual qualification]]></category>
		<category><![CDATA[website analysis]]></category>

		<guid isPermaLink="false">http://www.dannytalk.com/?p=395</guid>
		<description><![CDATA[Google has finally made available individual qualifications for Google Analytics called well, Google Analytics Individual Qualification. This is great because before, there were only qualifications for companies called Google Analytics Authorised Consultants (GAAC). All you have to do is pay USD$50 to sit for the IQ test and you&#8217;ll need a passing mark of at [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dannytalk.com/tag/google/">Google</a> has finally <a href="http://analytics.blogspot.com/2009/03/what-is-your-google-analytics-iq.html" target="_blank">made available individual qualifications for Google Analytics</a> called well, <a title="Google Analytics Individual Qualification - FAQ" href="http://www.google.com/support/conversionuniversity/bin/static.py?page=iq_faq.cs" target="_blank">Google Analytics Individual Qualification</a>. This is great because before, there were only qualifications for companies called <a href="http://www.dannytalk.com/category/google-analytics/">Google Analytics</a> Authorised Consultants (GAAC).</p>
<p>All you have to do is pay USD$50 to sit for the <a title="Google Analytics IQ test" href="http://google.starttest.com/" target="_blank">IQ test</a> and you&#8217;ll need a passing mark of at least 75%. Once you&#8217;ve passed, you&#8217;ll be registered as  <a href="http://www.dannytalk.com/category/google-analytics/">Google Analytics</a> qualified and this qualification lasts for 18 months.</p>
<p>If you fail, you&#8217;ll be able to re-take the test (max twice within 30 days).</p>
<p><span id="more-395"></span>To prepare, <a href="http://www.dannytalk.com/tag/google/">Google</a> has made available <a title="Conversion University" href="http://www.google.com/support/conversionuniversity/" target="_blank">online courses</a> that will help equip with the knowledge and skills necessary to be qualified. This will most definitely add value to yourself when looking for jobs as well as add value to the company you&#8217;re working for, showing that your company have employees individually qualified with a high skill set and knowledge.</p>
<p>What this qualification means is that you&#8217;re a proficient user of Google Analytics and your skills are complete and up to date. Basically, you know what you&#8217;re doing when it comes to Google Analytics, be it basic or advanced configurations.</p>
<p>This is similar to the <a title="Google Adwords Professional" href="http://adwords.google.com/support/select/professionals/bin/answer.py?hl=en&amp;answer=12241" target="_blank">Google Adwords Professional (GAP) qualification</a>, but for Google Analytics.</p>
<p>If you&#8217;re working for a company that&#8217;s already GAAC qualified, Google will be issuing 2 free test vouchers per company. By the second quarter, each GAAC qualified company must have at least 2 qualified individuals in the company.</p>
<p>So get cracking and rummage through the online courses right away! I know I&#8217;ll be doing so :)</p>
<img src="http://www.dannytalk.com/?ak_action=api_record_view&id=395&type=feed" alt="" /><h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.dannytalk.com/2009/04/02/google-analytics-individual-qualification-tips-i-just-passed-my-test/" title="Google Analytics Individual Qualification Tips &#8211; I Just Passed My Test">Google Analytics Individual Qualification Tips &#8211; I Just Passed My Test</a></li><li><a href="http://www.dannytalk.com/2009/06/24/update-to-adwords-cost-data-import/" title="Update to Adwords Cost Data Import">Update to Adwords Cost Data Import</a></li><li><a href="http://www.dannytalk.com/2009/04/05/how-to-track-sub-domains-cross-domains-in-google-analytics/" title="How To Track Sub-Domains / Cross-Domains in Google Analytics">How To Track Sub-Domains / Cross-Domains in Google Analytics</a></li><li><a href="http://www.dannytalk.com/2009/03/15/google-analytics-does-301302-redirect-preserve-referrer-information/" title="Google Analytics: Does 301/302 Redirect Preserve Referrer Information?">Google Analytics: Does 301/302 Redirect Preserve Referrer Information?</a></li><li><a href="http://www.dannytalk.com/2008/09/27/updated-tracking-exit-links-in-google-analytics/" title="Updated: Tracking Exit Links in Google Analytics">Updated: Tracking Exit Links in Google Analytics</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dannytalk.com/2009/03/05/google-analytics-qualified-individual-qualification/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Updated: Tracking Exit Links in Google Analytics</title>
		<link>http://www.dannytalk.com/2008/09/27/updated-tracking-exit-links-in-google-analytics/</link>
		<comments>http://www.dannytalk.com/2008/09/27/updated-tracking-exit-links-in-google-analytics/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 03:37:20 +0000</pubDate>
		<dc:creator>danny</dc:creator>
				<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.dannytalk.com/?p=221</guid>
		<description><![CDATA[I&#8217;ve just updated my code on tracking exit links in Google Analytics to skip applying the code if the href of an anchor tag is &#8216;#&#8217;. This is usually the case when the anchor tag is there to execute javascript or to scroll to the top of the page, thus does not contain any exit [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just updated my code on <a title="Tracking exit links in Google Analytics" href="http://www.dannytalk.com/2008/08/30/tracking-exit-links-in-google-analytics/">tracking exit links in Google Analytics</a> to skip applying the code if the href of an anchor tag is &#8216;#&#8217;. This is usually the case when the anchor tag is there to execute <a href="http://www.dannytalk.com/tag/javascript/">javascript</a> or to scroll to the top of the page, thus does not contain any exit liks.</p>
<p>This can be found on line 29 with the addition of a condition in the condition statement, <span><em><span>anchors[i].href != (document.location + </span><span class="string">&#8216;#&#8217;</span></em><span><em>)</em>.</span></span></p>
<p>I&#8217;ve seen a few other scripts that tracks exit links but some of them I don&#8217;t think are very good as they lack error checking and also some of them overwrite the existing onclick attribute which I guess could break the site&#8217;s functionality.</p>
<p>Also to prove to you that my script is working, I&#8217;ve included a screenshot of the report found in <a href="http://www.dannytalk.com/category/google-analytics/">google analytics</a>.</p>
<p><a href="http://www.dannytalk.com/wp-content/uploads/2008/09/google-analytics-exit-links-report.jpg"><img class="aligncenter size-full wp-image-222" title="Google Analytics Exit Links Report" src="http://www.dannytalk.com/wp-content/uploads/2008/09/google-analytics-exit-links-report.jpg" alt="" width="500" height="141" /></a></p>
<p>Of course you can click through to the individual links and analyse the dimensions for further analysis. I will be working on more <a href="http://www.dannytalk.com/category/google-analytics/">google analytics</a> custom scripts to help bring and enhance more meaningful reports.</p>
<img src="http://www.dannytalk.com/?ak_action=api_record_view&id=221&type=feed" alt="" /><h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.dannytalk.com/2009/03/15/google-analytics-does-301302-redirect-preserve-referrer-information/" title="Google Analytics: Does 301/302 Redirect Preserve Referrer Information?">Google Analytics: Does 301/302 Redirect Preserve Referrer Information?</a></li><li><a href="http://www.dannytalk.com/2008/08/30/tracking-exit-links-in-google-analytics/" title="Tracking Exit Links in Google Analytics">Tracking Exit Links in Google Analytics</a></li><li><a href="http://www.dannytalk.com/2009/04/05/how-to-track-sub-domains-cross-domains-in-google-analytics/" title="How To Track Sub-Domains / Cross-Domains in Google Analytics">How To Track Sub-Domains / Cross-Domains in Google Analytics</a></li><li><a href="http://www.dannytalk.com/2009/04/02/google-analytics-individual-qualification-tips-i-just-passed-my-test/" title="Google Analytics Individual Qualification Tips &#8211; I Just Passed My Test">Google Analytics Individual Qualification Tips &#8211; I Just Passed My Test</a></li><li><a href="http://www.dannytalk.com/2009/03/05/google-analytics-qualified-individual-qualification/" title="Google Analytics Qualified Individual Qualification">Google Analytics Qualified Individual Qualification</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dannytalk.com/2008/09/27/updated-tracking-exit-links-in-google-analytics/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Tracking Exit Links in Google Analytics</title>
		<link>http://www.dannytalk.com/2008/08/30/tracking-exit-links-in-google-analytics/</link>
		<comments>http://www.dannytalk.com/2008/08/30/tracking-exit-links-in-google-analytics/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 04:27:57 +0000</pubDate>
		<dc:creator>danny</dc:creator>
				<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.dannytalk.com/?p=172</guid>
		<description><![CDATA[I&#8217;ve been spending my time writing a script that will help track exit links (external links) in Google Analytics. This script will traverse through all anchor tags within the body and apply tracking codes on tags with the href attribute. If the anchor tag has an onclick attribute already, it appends the tracking code to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been spending my time writing a script that will help track exit links (external links) in <a href="http://www.dannytalk.com/category/google-analytics/">Google Analytics</a>. This script will traverse through all anchor tags within the body and apply tracking codes on tags with the href attribute.</p>
<p>If the anchor tag has an onclick attribute already, it appends the tracking code to it and it shouldn&#8217;t affect the functionality.</p>
<p>I will try to post screenshots of how it looks in <a href="http://www.dannytalk.com/category/google-analytics/">Google Analytics</a> once I gather some data. To use it, simply paste the following code after the <a href="http://www.dannytalk.com/tag/google/">google</a> analytics code and before the &lt;/body&gt; tag.</p>
<pre class="js" name="code">
&lt;script type="text/javascript" src="&lt;PATH-TO-SCRIPT&gt;"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
	dtalk_ga.applyVirtualExits();
&lt;/script&gt;</pre>
<p>You can view the source code here,</p>
<pre class="js" name="code">/**
 *	@author:	Danny Ng (http://www.dannytalk.com)
 *	@date:		30/08/08
 *	@updated:	26/09/08
 *	@notes:		Free to use and distribute without altering this notice. Would appreciate a link back.
 *	@usage:		Place the following code before the &lt;/body&gt; tag and after <a href="http://www.dannytalk.com/tag/google/">google</a> analytics code,
 *
 *				&lt;script type="text/javascript" src="&lt;PATH-TO-SCRIPT&gt;"&gt;&lt;/script&gt;
 *				&lt;script type="text/javascript"&gt;
 *					dtalk_ga.applyVirtualExits();
 *				&lt;/script&gt;
 */

var dtalk_ga = {
	applyVirtualExits: function() {
		var trackPage = function(a)
		{
			var domain_name = document.location.toString().toLowerCase().split('/')[2];
			var exit_domain = a.href.split('/')[2].toLowerCase();
			if (domain_name.toLowerCase().indexOf(exit_domain) == -1)
			{
				if (typeof pageTracker != 'undefined')
					pageTracker._trackPageview('/exit/' + a.href);
			}
		};
		var anchors = document.getElementsByTagName('a');
		for (var i = 0; i &lt; anchors.length; i++)
		{
			if (anchors[i].href &amp;&amp; anchors[i].href != (document.location + '#'))
			{
				if (typeof anchors[i].onclick == 'undefined')
					anchors[i].onclick = function(e) {
						trackPage(this);
					};
				else if (typeof anchors[i].onclick == 'function')
				{
					var old_onclick = anchors[i].onclick;
					anchors[i].onclick = function(e) {
						old_onclick();
						trackPage(this);
					};
				}
			}
		}
	}
};
</pre>
<p>Hopefully I can find more ways of writing scripts that will help with Google Analytics.</p>
<img src="http://www.dannytalk.com/?ak_action=api_record_view&id=172&type=feed" alt="" /><h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.dannytalk.com/2009/03/15/google-analytics-does-301302-redirect-preserve-referrer-information/" title="Google Analytics: Does 301/302 Redirect Preserve Referrer Information?">Google Analytics: Does 301/302 Redirect Preserve Referrer Information?</a></li><li><a href="http://www.dannytalk.com/2008/09/27/updated-tracking-exit-links-in-google-analytics/" title="Updated: Tracking Exit Links in Google Analytics">Updated: Tracking Exit Links in Google Analytics</a></li><li><a href="http://www.dannytalk.com/2009/04/05/how-to-track-sub-domains-cross-domains-in-google-analytics/" title="How To Track Sub-Domains / Cross-Domains in Google Analytics">How To Track Sub-Domains / Cross-Domains in Google Analytics</a></li><li><a href="http://www.dannytalk.com/2009/04/02/google-analytics-individual-qualification-tips-i-just-passed-my-test/" title="Google Analytics Individual Qualification Tips &#8211; I Just Passed My Test">Google Analytics Individual Qualification Tips &#8211; I Just Passed My Test</a></li><li><a href="http://www.dannytalk.com/2009/03/05/google-analytics-qualified-individual-qualification/" title="Google Analytics Qualified Individual Qualification">Google Analytics Qualified Individual Qualification</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.dannytalk.com/2008/08/30/tracking-exit-links-in-google-analytics/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.827 seconds -->
<!-- Cached page served by WP-Cache -->
